For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
6 0 2 2

Historical fundamental data with multiple periods

I am trying to make a request for quarterly historical actual revenue, and return the full fundamental backhistory for each calcdate.

below the request for the current and previous fiscal quarter data works, but adding any further relative quarters does not work.

I would also like to know how I could make the call to request all of the previous fundamental data, e.g. FQ0,FQ-1,FQ-2,...,FQ-N for all N quarters available.

# FQ0, FQ-1 WORKS
raw_ids, err = ek.get_data(
            ['EYE.OQ'], 
            ['TR.RevenueActValue', 'TR.RevenueActValue.calcdate','TR.RevenueActValue.date','TR.RevenueActValue.fperiod','TR.RevenueActValue.periodenddate','TR.RevenueActValue.announcedate'
], 
            {
                'SDate':'2000-01-01',
                'EDate':'2022-01-01',
                'Period':'FQ0,FQ-1',# pull past quarters data
                'Frq':'FQ'
            }
    )
# FQ0,FQ-1,FQ-2 DOES NOT WORK
raw_ids, err = ek.get_data(
            ['EYE.OQ'], 
            ['TR.RevenueActValue', 'TR.RevenueActValue.calcdate','TR.RevenueActValue.date','TR.RevenueActValue.fperiod','TR.RevenueActValue.periodenddate','TR.RevenueActValue.announcedate'
], 
            {
                'SDate':'2000-01-01',
                'EDate':'2022-01-01',
                'Period':'FQ0,FQ-1,FQ-2',# pull past quarters data
                'Frq':'FQ'
            }
    )
eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonhistorical
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
39.2k 75 11 27

@reid

I can't say I quite understand what you're looking to achieve. Nevertheless, the notation "FQ0,FQ-n" for the Period parameter is interpreted as the range of quarters between FQ0 and FQ-n. So, try 'Period':'FQ0,FQ-4' for example. Does it give you what you're looking for? If not, could you please elaborate on what you're trying to achieve? It strikes me as rather odd to combine in the same request a range of fiscal quarters using Period parameter and a range of dates (using SDate and EDate).

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thanks, that is helpful.

To clarify, let's say a company has had 16 quarters. They restated their financials once after 4 quarters, and again after 10 quarters. I want to pull the full backhistory of fundamentals on each announce date.

Ideally there would be something like Period:'All', so I don't need to specify 'FQ0,FQ-16'. Is there something like this that I can pass in?

Otherwise, what is the maximum relative quarter you can pass in, e.g. Period: 'FQ0,FQ-36'?

I see. There's no 'Period':'All' parameter. I also don't believe there's a max value for n in FQ-n. I just tried FQ-256, which presumably is more than what you'd ever need in practice for this use case, and it worked. There's a downside to using a large value of n like 256, which is the increased retrieval time because of additional processing on the backend and lots of empty rows returned in the result set.

Click below to post an Idea Post Idea