Dear Sirs, Is it possible to download mid of month historical data for constituents or index. If yes
Dear Sirs, Is it possible to download mid of month historical data for constituents or index? Using ek.get_data()? If yes, how to do it? Please let me know.
Best Answer
-
I assume you made a typo in the example get_data call you provided. The value of Frq parameter you meant to have there is 'M', right? If you retrieve timeseries with 'Frq':'M', monthly values will indeed be the close prices for the last day of each month. If you'd like to construct monthly timeseries of close prices for say the 15th of each month, you have two options. One is to retrieve the close prices separately for each date in your timeseries, i.e. in a loop separately call
ek.get_data(constituent, ['TR.PriceClose.Date','TR.PriceClose'], {'SDate' : '2010-01-15'})
ek.get_data(constituent, ['TR.PriceClose.Date','TR.PriceClose'], {'SDate' : '2010-02-15'})
etc., and concatenate the results.
Or you can retrieve daily price history using 'Frq':'D' parameter, as in the get_data example in your previous response, and then use pandas indexing and selecting capabilities to extract from the result the values you're interested in using whatever logic you want to use.
0
Answers
-
You can retrieve the constituents of an index as of any historical date using
ek.get_data('0#.SPX(2021-02-16)','TR.CommonName')
And then, if you're interested, you can retrieve historical prices for the constituents as of a given date. Or you can retrieve both in a single call, e.g.
ek.get_data('0#.SPX(2021-02-16)','TR.ClosePrice(SDate=2021-02-16)')
Is this what you were looking for?
0 -
Thank you Alex. It does not answer my question in full. Assume I have start dat = 2010-01-15, end dat = 2021-01-15. I want to download monthly data from start date to end date. I am using something like this:
ek.get_data( constituent, ['TR.PriceClose.Date','TR.PriceClose'], {'SDate' : start_date, 'EDate' : end_date, 'Frq': 'D'})
However, I usually get right values but say end of month values. How do I get a time series of mid-month values?
Thanks in advance,
Stanislav
0 -
Hi Alex,
Thanks a lot for your answer. Yes, it was a small eror, I should have put M, instead of D. So, this holds for any daily data that I might be interested in. For example:
'TR.TotalReturn(SDate=2020-01-15,EDate=2010-01-15,Frq=M)'
would also yield end of month results?
If I go along with your suggestion, and download for each date separately, what would happen if, say, 15th of Feb 2007 was Sunday? Would it give me empty field, or automatically move to Monday (the next available day), or, maybe Friday (previously available day), the 13th?
Thanks in advance,
Stanislav
0 -
Yes, daily timeseries summarized into monthly intervals are always anchored to the end of the month.
When requesting daily timeseries, if you only specify SDate and the value of SDate corresponds to a non trading day, the values from the previous trading day are returned.0 -
Great, thanks a lot Alex.
Regards,
Stanislav
0 -
Hi Alex,
Before I accept your answer, just a quick note that I am a bit surprised that we can not download monthly data on any given date. I seem to remember that before, when I was using excel, it was possible to set the date and download monthly data mid month. Or maybe I mixed up something?
0 -
You must be mixing up things. I'm not aware of any Refinitiv products that have the capability to return monthly timeseries representing a given date of the month (e.g. anchored to the 15th of each month). Certainly Eikon never had that capability.
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 中文论坛