Get EPS historical data for stocks
Hello.
I'm trying to retrieve the historical quarterly earnings per share (EPS), - the exact earnings annoument dates and values - for US stocks (let's say google) by using the python eikon API.
I'm having some issues to find a solution for this (i also used the eikon python formula creator as support but i didn't manage to find a solution).
So far I could only get what i guess it's the latest quarterly EPS. (example for google)
df,e = ek.get_data('GOOG.O',['EARNINGS'])
I've also not managed to attached a date to the EPS, much less the entire historical timeseries.
Many thanks in advance.
Best regards
Filipe
Best Answer
-
@f.janeiro So the parameters settings are available in the Data Item Browser tool - see below:
So the Period is the financial period referred to FY0 is the most recent actual, FY1 is the first year forecast (where the field are forward looking as in estimates), and FY-1 is the previous year actual etc. The period parameter can accept absolute as well as relative references including specific dates.
Frequency is the frequency of observation so FY is fiscal year, FQ is fiscal quarter, and then there are also CY for Calender Year etc More information is available in the data item browser tool.
So to look at quarterly data you need to be selecting a period of FQ0 and a frequency of FQ - to get the last 5 quarters just specify -5 in the EDate parameter which understands that you want -5 FQ as you have a frequency of FQ:
df2,e = ek.get_data('GOOGL.O',['TR.RevenueActValue.date','TR.RevenueActValue','TR.EPSActValue'],parameters = {'SDate':'0','EDate':'-5','Period':'FQ0','Frq':'FQ'})
I hope this can help
0
Answers
-
@f.janeiro Please see the code below. You can use the Data Item Browser app to discover all the fields and parameters you can use (type DIB into eikon search bar).
df2,e = ek.get_data('GOOGL.O',['TR.RevenueActValue.date','TR.RevenueActValue','TR.EPSActValue'],parameters = {'SDate':'0','EDate':'-5','Period':'FY0','Frq':'FY'})
df2I hope this can help.
0 -
Dear Jason.
Thank you for such a quick reply. It works and also thank you for the DIB tip. Seems quite useful.
BestFilipe
1 -
@f.janeiro my pleasure! Those are for the actuals - but we also provide consensus IBES estimates for these things as well - check out these as well as these are updated much more frequently (whenever any analyst changes or confirms their forecasts) - obviously there are also many more estimate fields you can request - these can provide a more responsive series - and are followed by many market participants.
df5, err =ek.get_data(['VOD.L'],['TR.RevenueMean(Period=FY1).calcdate',
'TR.RevenueMean(Period=FY1)',
'TR.RevenueNumIncEstimates(Period=FY1)',
'TR.GrossIncomeMean(Period=FY1)',
'TR.GrossIncomeNumIncEstimates(Period=FY1)',
'TR.PreTaxProfitMean(Period=FY1)',
'TR.PreTaxProfitNumIncEstimates(Period=FY1)',
'TR.NetProfitMean(Period=FY1)',
'TR.NetProfitNumIncEstimates(Period=FY1)',
'TR.EPSMean(Period=FY1)',
'TR.EPSNumIncEstimates(Period=FY1)',
'TR.DPSMean(Period=FY1)',
'TR.DPSNumIncEstimates(Period=FY1)',
'TR.CLOSEPRICE(Adjusted=1)'],
{'SDate':'-2000','EDate':'0', 'Frq':'D'})
df5I hope this can help. I am also about to publish an article on this area soon so keep an eye out for that.
0 -
@jason.ramchandani Thank you for the extra details. I'm having a bit of troubles to get details on how to use the "parameters" field. I tried to check the documentation in the help(ek.get_data) but I'm still having problems on this, especially with the data frequency.
parameters = {'SDate':'0','EDate':'-5','Period':'FY0','Frq':'FY'}
In your code i get the actual earnings beginning of the year. How do I change the the frequency to get the quarterly actual earnings? Companies report earnings quartely if I'm not mistake and I would like to get that data.
df2,e = ek.get_data('GOOGL.O',['TR.RevenueActValue.date','TR.RevenueActValue','TR.EPSActValue'],parameters = {'SDate':'0','EDate':'-5','Period':'FY0','Frq':'FY'})
Regarding your second post, the "Period=FY1" argument is what makes the data forward looking, right?
So, in your fetching, when I see that earning per share is 0.0753 on the 2021-02-18, does it mean that this is what the analysts foresee as EPS in the next quarter earnings report or in one year from today?
Thank you in advance for your help.
Best
Filipe
0 -
Hello.
Any thoughts on the above inquiry?
Thank you in advance.
Best
FJ
0 -
Extremely helpful. Thank you!
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛