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

  • chavalit-jintamalit
    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

    image


    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/

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_suha01

  • 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)