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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 0 0

How to sort an ek.get_data request by instrument and fiscal period (absolute)?

Hello,

I am requesting the following data in Excel:

=TR("GOOGL.OQ";"TR.BSPeriodEndDate.fperiod;TR.BSPeriodEndDate;TR.ISPeriodEndDate;TR.EPSActValue;TR.EPSActValue.date";"Period=FQ0 Frq=FQ SDate=1982-01-01 EDate=2019-12-31 CH=Fd RH=IN";B2)

And I use the following code to do the exact same via API:

data,err = ek.get_data("GOOGL.OQ", ['TR.BSPeriodEndDate.fperiod', 'TR.BSPeriodEndDate', 'TR.ISPeriodEndDate', 'TR.EPSActValue', 'TR.EPSActValue.date'], {'SDate':'1982-01-01', 'EDate':'2019-12-31', 'Period' : 'FQ0', 'Frq' : 'FQ'})


The trouble I have can be seen in this picture:

There is a missmatch in "time" as the date of EPS-actual (last column), which is the earnings announcement date, does not possibly fit the fiscal quarter (third column) in the same row.


I know how to fix this in Excel:

... CH=Fd RH=IN;fperiod"...


However, I do not know how to fix it in terms of the API. As far as I am aware CH and RH parameters are disregarded in the eikon python package.

Still I need to find a way to match the data in the API correctly.

Can you help?


Additionally: Do I get it right that ek.get_timeseries is limited to HIGH, CLOSE, LOW, OPEN and VOLUME?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
1582895664993.png (41.5 KiB)
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.

Upvote
Accepted
18k 21 12 20

Hi @MisterM

Please be advised that when you're mixing fields from different categories (see the illustration of TR.ISPeriodEndDate and TR.EPSActValue falling under different categories in Formula Builder wizard in Eikon Excel) the timeseries returned for these fields are not guaranteed to be aligned on the date.


ahs1.png (93.8 KiB)
ahs2.png (93.9 KiB)
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 for the clue that this behavior is linked to the mix of different categories.

Yet, the occurence does not seem arbitrary to me at all, as it is evitable in Excel. From what I have read and understood, Excel and the API syntax should offer the same options, that is why I ask how to realize the described "sort-feature" in the Eikon API.

Hi @MisterM

I understand your concern.

You can give your feedback by contacting Refinitiv Helpdesk at https://my.refinitiv.com

So your feedback will be raised to an appropriate technical support team.

Additionally, the same problem occurs within categories as well (ISperiodenddate, BSperiodenddate -> Reuters Fundamentals), which can also be seen from the snapshot I posted.

This would be the correct dates via Excel:


1583313485491.png (13.4 KiB)

Hi @MisterM

They are from different categories

data,err = ek.get_data("GOOGL.OQ",
                       ['TR.BSPeriodEndDate.Date', 'TR.BSPeriodEndDate',
                        'TR.BSUpdateType.Date', 'TR.BSUpdateType',
                        'TR.ISPeriodEndDate.Date','TR.ISPeriodEndDate'],
                       {'SDate':'1982-01-01', 'EDate':'2019-12-31', 'Period' : 'FQ0', 'Frq' : 'FQ'})
data


ahs2.png (449.5 KiB)
ahs1.png (78.3 KiB)
Upvotes
18k 21 12 20

Hi @MisterM

Additionally: Do I get it right that ek.get_timeseries is limited to HIGH, CLOSE, LOW, OPEN and VOLUME?

Please refer to this document for the fields parameter.

You can include fields='*' in your code to get every available field (from default view).


ahs.png (19.9 KiB)
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.

Click below to post an Idea Post Idea