Retrieving historical data of option prices on the S&P500
Hello,
I am looking for a way to retrieve historical data of option prices on the S&P500.
Previously, I was able to retrieve option data via "get_data()", using the RIC chain:
['0#SPX*.U']
The RIC chain gave a table of Instruments over various maturities and strikes.
As an experiment with "get_timeseries()", I did the below API request for a arbitrarily chosen RIC gave me only the data items: "HIGH", "CLOSE", "LOW", "OPEN", "VOLUME", but only 45 items for the selected time interval.
test01 = ek.get_timeseries(["/SPXg172030000.U"],
start_date="2020-01-01",
end_date="2020-05-01",
interval = "daily")
Instead, I was looking for the following -- previously mostly functioning with get_data() -- items:
['PUTCALLIND', 'PUT_CALL', 'CF_ASK', 'CF_BID', 'MID_PRICE', 'STRIKE_PRC', 'EXPIR_DATE', 'CF_CLOSE', 'IMP_VOLT']
What is the best way to retrieve complete historical option data over all available maturities and strikes?
Thanks and regards
s_suha01
Best Answer
-
Hi @s_suha01
['PUTCALLIND', 'PUT_CALL', 'CF_ASK', 'CF_BID', 'MID_PRICE', 'STRIKE_PRC', 'EXPIR_DATE', 'CF_CLOSE', 'IMP_VOLT']
These fields are from realtime database, meaning that they do not support historical data on these fields on get_data() function.
On get_timeseries() function, you can get historical data from a default view on an instrument.
And in this case, they are not the data you are looking for.
From your question:
What is the best way to retrieve complete historical option data over all available maturities and strikes?
I do not fully understand your question, but if you mean that you would like to retrieve the realtime fields but the value comes from historical.
Then you need to find if there are any fields carrying this information and also support historical to be used with get_data() function
For example:
ASK price on SPXg172030000.U
Using field from realtime database(do not support historical):
TR.ASKPRICE field on SPXg172030000.U
support historical
You can use Data Item Browser to explore all the fields. Please review this tutorial.
Or you can also contact Refinitiv Content Helpdesk to clarify if there is any fields carrying the same information but support historical data at https://my.refinitiv.com/
0
Answers
-
Thanks a lot, @"" chavalit.jintamalit.
The following code delivers a list of all currently observable instruments on the S&P500:
df0, e = ek.get_data(['0#SPX*.U'],['PUTCALLIND', 'PUT_CALL', 'STRIKE_PRC'])
rics = list(df0['Instrument'])
rics.pop(0)However, I am interested in histroical, i.e. expired option prices, up to e.g. 2010-01-01. I tried to modify my rics list, but I was yet unsuccessful.
How can I obtain these data?
Thanks,
s_suha010 -
Hi @s_suha01
These fields do not support historical data.
['PUTCALLIND', 'PUT_CALL', 'STRIKE_PRC']
I am not a content export so I am not quite sure about the field/data you are looking for.
You can contact Refinitiv Content Helpdesk(https://my.refinitiv.com/) to clarify if there are fields that can be used with Eikon Excel with =TR function to retrieve the data you are looking for.
Then you can replicate it to Eikon Data API(Python)
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 中文论坛