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

  • jason.ramchandani01
    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.

Answers