historical option strike chain

I'm using below code for getting historical option chain data for AAPL....Please provide the symbol for US Stock BRK.B to get the below data :


df, err = ek.get_data(

instruments = ['0#AAPL*.U'],

fields = ['PUTCALLIND','STRIKE_PRC','EXPIR_DATE']

)

Best Answer

  • aramyan.h
    aramyan.h admin
    Answer ✓

    Hi @peeush


    For the active ones you can either use chain from Refinitiv Data Libraries as advised here in your previous question or use Eikon as suggested above:

    df, err = ek.get_data(
    instruments = ['0#CL+'],
    fields = ['PUTCALLIND','STRIKE_PRC','EXPIR_DATE']
    )
    df

    This will return the monthly contract chains. Then for each chain:

    df, err = ek.get_data(
    instruments = ['0#/CLJ24+'],
    fields = ['PUTCALLIND','STRIKE_PRC','EXPIR_DATE']
    )
    df


    screenshot-2024-03-07-at-093727.png

    As for the expired ones, those are not accessible directly and you need to reconstruct them following the RIC construction Rules. You can reach out to Helpdesk for more details by posting a question.

    I have build similar workflows for equity options and futures here and here which might be useful when attempting to build one for options on futures yourself. You may need help from Helpdesk to learn the construction Rules.


    Hope this helps.


    Best regards,

    Haykaz

Answers