Collected implied volatility using Eiklon Python package

I am trying to collect AUDCAD 1 month implied volatility using pyton's Eikon package.

ek.get_data('AUDCAD1MO=R', 'IMP_VOLT')

Here is the error returned.

( Instrument IMP_VOLT 0 AUDCAD1MO=R NaN, [{'code': 251658244, 'col': 1, 'message': "Error: Field 'IMP_VOLT' was not found in response for the instrument 'AUDCAD1MO=R'", 'row': 0}])

I am able to collect its implied volatility from excel function. What is the correct way to fetch the data?

Best Answer

  • Alex Putkov.1
    Answer ✓

    You say you can retrieve what you need into Excel. What is the call you use in Excel?
    Field IMP_VOLT does not exist for RIC AUDCAD1MO=R. RIC AUDCAD1MO=R provides several implied volatilities: bid volatility can be found in field "BID", ask volatility can be found in field "ASK", mid volatility can be found in field "PRIMACT_1".

Answers

  • I am using Build Formula function and select implied volatility in the search data item.

    The script only returns bid/ask price by using ek.get_data('AUDCAD1MO=R', 'BID')

    I am still new to Eikon package. Do you know what I need to replace 'IMP_VOLT' for implied volatility? A sample code can be great.

    Thanks

  • The script returns implied volatility by using ek.get_data('AUDCAD1MO=R', 'BID'). Thanks Alex!

  • I tried ek.get_data('AUDCAD3MO=R','TR.IMPLIEDVOLATILITY')

    This time, implied volatility column shows NAN.