Pulling timeseries for a set of RICs do not give the expected output

Hi Team,
My client is trying to pull up the first available data point for a set of RICs. Using the ff gives him NaN list and the earliest data point pulled up is 05-27-2013:
df = ek.get_timeseries(bills, fields='CLOSE', start_date='1994-06-01', interval='Daily')
As you can see, it should give him the earliest data point available in the database which is 1994 and this is available in Eikon desktop and Eikon Excel.
Now, running the formula below, gives me the timeseries of JP6MT=RR and JP3MT=RR, where both of them automatically starts at 2013-05-27 (as per the screenshot above)
df_combined = ek.get_timeseries(['JP6MT=RR','JP3MT=RR'], fields='CLOSE', start_date='1994-06-01', interval='daily').
However, if he uses the formula below:
df = ek.get_timeseries('JP6MT=RR', fields='CLOSE', start_date='1994-06-01', interval='daily'), first available point is 04-11-2007. If he runs JP3MT=RR on its own, he will get it to start at 2007-04-11 as well. So logically speaking, if he is to run them as a combined function, he should get both of them to start at at 2007-04-11, and not 2013-05-27.
Also, why is he not able to pull up the actual first available data point which is 1994?
Thank you for your help!
Best Answer
-
To avoid limitations and you can consider using ek.get_data() and provide wider time window.
df,err = ek.get_data('JP3MT=RR',['TR.BIDYIELD.date','TR.BIDYIELD'],{"Sdate":'1970-05-01', "Edate":'2019-07-17'})
df.dropna(inplace=True)
df.head(1)0
Answers
-
If I try
df = ek.get_timeseries(['JP6MT=RR','JP3MT=RR'],fields='CLOSE', start_date='1994-06-01', interval='daily')
print('Return Row=',len(df.index))it return
Return Row=1513But and if I change it to request just one RIC
df = ek.get_timeseries(['JP6MT=RR'],fields='CLOSE', start_date='1994-06-01', interval='daily')
print('Return Row=',len(df.index))Return Row= 3000
I guess that it may relate with 3000 limit of points for inter-day data mentioned in the following post. And it looks like the problem still exists.
https://community.developers.refinitiv.com/questions/6355/bug-in-get-timeseries.html
0 -
Refer to this discussion thread, for the interday timeseries interval, it is limited to 3K rows for a single request.
From the raw output, the first returned data point for JP3MT=RR is '2013-05-27' while the first returned data point for JP6MT=RR is '2013-06-05'. For this reason, when the data was displayed on the dataframe, you see the NaN value for JP6MT=RR between '2013-05-27' and '2013-06-04'.
To avoid this issue, you need to specify end_date. The range could be 3-4 years for 2 RICs.
bills=['JP3MT=RR','JP6MT=RR']
df = ek.get_timeseries(bills, fields='CLOSE', start_date='1994-06-01', end_date='1998-12-31',interval='daily')0 -
Thank you @Jirapongse @moragodkrit.chumsri_1 Will relay this to the client.
0 -
You can refer to this document for the limitation and how to handle it.
0 -
@Jirapongse
thanks for your help. After running the below code, what do you get? I don't think you will get the time series from the specified start date to the end date either. Could you confirm?
bills=['JP3MT=RR','JP6MT=RR']
df = ek.get_timeseries(bills, fields='CLOSE', start_date='1994-06-01', end_date='1998-12-31',interval='daily')0 -
0
-
Is it possible to write a loop to pull these RICs to get 3000 points for all of them?
0 -
Yes, it is possible to write a loop to full all data points from 1994-06-01. However, it is unable to get the exact 3000 rows for each request. The code looks like:
import eikon as ek
import pandas as pd
import datetime
bills=['JP3MT=RR','JP6MT=RR']
dfList = []
startDate = datetime.datetime(1994, 6, 1)
while startDate < datetime.datetime.now():
endDate = startDate + datetime.timedelta(days=1500)
df = ek.get_timeseries(bills, fields='CLOSE', start_date=startDate, end_date=endDate,interval='daily')
dfList.append(df)
startDate = endDate + datetime.timedelta(days=1)
result = pd.concat(dfList)
result0 -
This is wonderful, thank you!
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 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
- 248 ETA
- 552 WebSocket API
- 37 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.8K Refinitiv Data Platform
- 625 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 83 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛