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
- 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 中文论坛