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 -
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛