ek.get_timeseries() miss lots of timesptes
hi
I am trying to get historical price of a list of RICS from 2000-01-01 to 2004-12-31.
But returned data only start from 2004-05-28.
Get_timeseries() function didn't throw any error and this happens every time when passing a list of RICS.
All the history price of all RICS in the list can be found in eikon desktop up to 2000. But even if they can't be found, shouldn't they be filled with nan?
BTW, may I ask what does 'expired' means in index joiner/leaver list. For example, JC penny is indicated as expired in s&p500 list. I cannot find any price information of this stock on eikon, but it is still publicly traded and price history can be found on yahoo finance.
Best Answer
-
The get_timeseries method has limitations, as mentioned in the EIKON DATA API USAGE AND LIMITS GUIDELINE.
get_timeseries: The current limit value (10-Oct-2019) is 3,000 data points (rows) for interday intervals and 50,000 data points for intraday intervals. This limit applies to the whole request, whatever the number of requested instrument.
Your request hits 3,000 data points which is a limitation of interday interval.
To get all data, there are two options.
1. Using the get_data method to get time-series data
df, err = ek.get_data(['IBM.N'],['TR.OPENPRICE.Date','TR.OPENPRICE','TR.CLOSEPRICE'],
{'Sdate':'2000-01-01', 'EDate':'2004-12-31','Frq':'D'})2. Using the get_timeseries method with multiple requests. For example, the below code uses multiple get_timeseries requests by splitting requests by start_date and end_date.
import datetime
import math
ic, err = ek.get_data('.GDAXI','TR.IndexConstituentRIC(SDate=2016-12-31)')
riclist = ic['Constituent RIC'].tolist()
startDate = datetime.datetime(2016, 12, 31)
numberOfDays = math.floor(3000 / len(riclist))
endDate = startDate + datetime.timedelta(days=numberOfDays)
#print(startDate, endDate, numberOfDays)
field_list = ['OPEN', 'CLOSE']
df = []
while startDate < datetime.datetime.now():
#print(startDate, endDate)
hist = ek.get_timeseries(riclist,fields=field_list, interval='daily',start_date = startDate, end_date=endDate)
df.append(hist)
startDate = endDate + datetime.timedelta(days=1)
endDate = startDate + datetime.timedelta(days=numberOfDays)
if endDate > datetime.datetime.now():
endDate = datetime.datetime.now()
result = pd.concat(df)
result0
Answers
-
Thanks for the information about limitations.
I have tried ek.get_data(), but it returns a df with data points beyond end date.
(I could simply drop them, but its nice to know what went wrong)
0 -
You need to use 'TR.PriceOpen.Date' instead of 'TR.OPENPRICE.Date'.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 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 中文论坛