get_timeseries returns full DataFrame when queried for holidays

Hello,
First of all, thanks a lot for this API that is helping us a lot in our daily work.
We are using the get_timeseries to retrieve historical closing prices for different products, and we stumbled upon a weird behaviour.
When we query the method with a start_date and end_date which are holidays (week-ends or official closed days), we get a lot of results instead of an empty Dataframe.
For example :
> python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import eikon as ek
>>> import datetime as dt
>>> ek.set_app_id('TRUNCATED')
>>> ek.get_timeseries('UEN.L', start_date=dt.datetime(year=2017,month=1,day=1), end_date=dt.datetime(year=2017,month=1,day=2))
UEN.L HIGH LOW CLOSE OPEN COUNT VOLUME
Date
2006-02-21 7750.00 7700.00 7700.0 7750.0 -1.0 10551.30
2006-02-22 7700.00 7400.00 7550.0 7700.0 -1.0 10163.20
2006-02-23 7550.00 7550.00 7550.0 7550.0 -1.0 2772.00
2006-02-24 7550.00 7550.00 7550.0 7550.0 -1.0 908.55
2006-02-27 7800.00 7550.00 7800.0 7550.0 -1.0 5851.05
[...]
2018-01-03 60.00 58.20 60.0 60.0 2.0 7600.00
2018-01-04 NaN NaN NaN 60.0 -1.0 NaN
As you can see, we receive a full DataFrame of 3000 rows, which I guess is the max results you can provide in one call.
Changing the end_date with a date that is not a holiday gives us the expected result :
>>> ek.get_timeseries('UEN.L', start_date=dt.datetime(year=2017,month=1,day=1), end_date=dt.datetime(year=2017,month=1,day=3))
UEN.L HIGH LOW CLOSE OPEN COUNT VOLUME
Date
2017-01-03 73.88 64.0 67.5 65.0 7.0 12893.3
Doing the same calls with strings instead of datetime gives the same results.
Is it an expected behaviour on your side ?
Thanks in advance,
Grégoire Bärtschi
Best Answer
-
Hi Gregoire! This is a bug with an underlying time series service, thanks for reporting it.
0
Answers
-
Hi @Zhenya Kovalyov, I think I ran into a similar issue: when querying for time ranges when the series has no data, an entire time series is returned:
>>> df = ek.get_timeseries(['ROGV1YDP=SM'], ['VALUE'], start_date='1980-01-01', end_date='1980-01-10')
>>> df.head()
ROGV1YDP=SM VALUE
Date
2010-01-31 4.794667
2010-02-28 4.959043
2010-03-31 14.834607
2010-04-30 12.778536
2010-05-31 12.649895
>>> df.tail()
ROGV1YDP=SM VALUE
Date
2018-01-19 0.887557
2018-01-22 0.887162
2018-01-23 0.887162
2018-01-24 0.838863
2018-01-25 0.838449Do you have a timeline when this bug will be fixed? It would be much appreciated!
Thanks,
Algirdas0 -
I just tested again both examples and it seems that the issue was fixed.
First example:
>>> import eikon as ek
>>> ek.set_app_key(‘xxxxxxxxxxxxxxxxx’)
>>> import datetime as dt
>>> ts=ek.get_timeseries('UEN.L', start_date=dt.datetime(year=2017,month=1,day=1), end_date=dt.datetime(year=2017,month=1,day=2))
Error with UEN.L: No data available for the requested date range
UEN.L: No data available for the requested date range |
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\site-packages\eikon\time_series.py", line 184, in
get_timeseries
raise EikonError('Error', message=ts_error_messages)
eikon.eikonError.EikonError: 'Error code Error | UEN.L: No data available for the requested date range | 'Second example:
>>> df = ek.get_timeseries(['ROGV1YDP=SM'], ['VALUE'], start_date='1980-01-01', end_date='1980-01-10')
Error with ROGV1YDP=SM: No data available for the requested date range
ROGV1YDP=SM: No data available for the requested date range |
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\site-packages\eikon\time_series.py", line 184, in
get_timeseries
raise EikonError('Error', message=ts_error_messages)
eikon.eikonError.EikonError: 'Error code Error | ROGV1YDP=SM: No data available for the requested date range | '0 -
Hi @Zhenya Kovalyov, Hi @loic.guezennec,
In case you did not notice it yet, this issue has been fixed in the Eikon time series service in May 2018.
Olivie
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 中文论坛