Future Option time series data using Python EikonDesktopData API
Hi, I am trying to build historical volatility surface using Python EikonDesktopData API. I'd need to extract the following fields
PREMIUM, SPOT, STRIKE_PRC, STRIKE_PRC, DELIVERY MONTH, INTRST_RTE,
I am getting Null values for all the queries in the code below. Could you please help here, where I'm making mistake? Thanks.
import eikon as ek
ek.set_app_id('<my app id>')
strike = ek.get_timeseries(["LCO100N1MO=R"], start_date = "2018-05-01T15:04:05", end_date = "2018-05-05T15:04:05", interval="daily", fields=["STRIKE_PRC.Timestamp","STRIKE_PRC.Value"])
interest = ek.get_timeseries(["LCO100N1MO=R"], start_date = "2018-05-01T15:04:05", end_date = "2018-05-05T15:04:05", interval="daily", fields=["INTRST_RTE.Timestamp","INTRST_RTE.Value"])
spot = ek.get_timeseries(["LCO100N1MO=R"], start_date = "2018-05-01T15:04:05", end_date = "2018-05-05T15:04:05", interval="daily", fields=["SPOT.Timestamp","SPOT.Value"])
Best Answer
-
@Sanjit.Rath you can get a snapshot using the get_data Python API call using the following:
fields1 = ['PREMIUM', 'STRIKE_PRC', 'RISK_FREE', 'CF_CLOSE', 'EXPIR_DATE']
newins = ek.get_data('LCO100N1MO=R', fields=fields1)[0]
newins.head()
But as Zhenya states, you will have to wait for the history to be available in Q2 to calculate the historical vol surface.
0
Answers
-
@Sanjit.Rath none of the views that you need ('STRIKE_PRC', 'INTRST_RTE' and 'SPOT') are supported by the beta timeseries API. You can only get the close price, that refers to the default view ('LAST_QUOTE'):
This functionality will be added in the first official release some time in Q2.
0 -
Hi @Zhenya Kovalyov, Thanks for the explanation. Is it possible to get the the values using COM API . I tried AdxRtHistory but it expects fields in the old format not as shown below.. Do you know if we have old field names for the below?
["STRIKE_PRC.Timestamp, "STRIKE_PRC.Value"]
0 -
@Sanjit.Rath if you are using it outside of Excel, the best choice would be the .NET API, as with AdxRtHistory you might run into a completely different set of issues. Have a look at Views and Intervals section of the time series tutorial, if you can use .NET for this task.
If you can do VBA inside of Excel, I can recommend RHistory COM API, here is the tutorial.
0 -
If you're looking to retrieve the data into Excel VBA you can use RHistory COM API. Here's the link to the tutorial. For custom applications the only API that can currently provide these values is Eikon .NET API. Here's the tutorial for retrieving this data into .NET application.
0 -
Hi @Alex Putkov., Thanks for the reply. Yes I was looking at RHistory COM API but it is not registered by default. This is required for loading it into python win32com. I tried to call "regsvr32 RhistoryAPI.dll" but it fails with an error. I presume DllRegisterServer function is not implemented or there are other issues preventing registration.
Regarding the .NET API, it is much better than the COM APIs but client is interested in keeping all coding to Python. It would be possible to use python if RHistoryApi.Dll can be registered.
Do you know if is possible to register?
0 -
RHistory COM library can only be used in Excel VBA. It has dependencies on components provided only by Eikon Excel add-in.
If the data retrieval must be done in Python, then you can try using .NET assemblies in Python with either pythonnet or IronPython. I personally have not used either one of them. But I have used Eikon .NET API successfully in other dev environments including Java and Matlab. Whenever you need to bridge two development environments the project is significantly complicated. But at the moment there's no alternative.0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 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
- 367 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
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛