Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by MisterM · Feb 28, 2020 at 01:45 PM · pythoneikon apiget_dataget_timeseries

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?

1582895664993.png (41.5 KiB)

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by chavalit.jintamalit · Feb 28, 2020 at 05:38 PM

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)
Comment
MisterM

People who like this

1 Show 4 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
MisterM · Mar 02, 2020 at 08:27 AM 0
Share

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.

avatar image
REFINITIV
chavalit.jintamalit ♦♦ MisterM · Mar 02, 2020 at 09:37 AM 0
Share

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.

avatar image
MisterM · Mar 04, 2020 at 09:20 AM 0
Share

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)
avatar image
REFINITIV
chavalit.jintamalit ♦♦ MisterM · Mar 04, 2020 at 01:37 PM 0
Share

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)
avatar image
REFINITIV
Answer by chavalit.jintamalit · Mar 02, 2020 at 10:00 AM

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)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.

Related Questions

Data point limit for get_data and get_timeseries?

get_timeseries and ticks in eikon python api

Eikon API access to historical volume and other financial data

Adding year/qtr/date to data frame retrieved from get_data function

1. get_timeseries cuts off historic data 2. get_data not working for all tickers

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges