Contract expiry - python api

Is there a published list of fields that can be used with ek.get_data()? I am trying to query the contract expiry that appears on the quote screen in Eikon for a specific futures contract.

Best Answer

  • image

    You can use Data Item Browser (or, simply, DIB) app on Thomson Reuters Eikon for reference.

Answers

  • Hi Zhenya, Thank you, DIB suggests EXPIR_DATE, which works for non-expired contracts (e.g ATWMZ8) but not for expired contracts (ATWMZ7^1) Is there a way to retrieve the expiry of expired futures contracts? Maybe the only other option is to query the timeseries & assume the last datapoint is correct...

  • I'm afraid the only option other than to retrieve the last datapoint from the timeseries, which for liquid future contracts is pretty much guaranteed to be the expiry date, is to calculate the expiry date using exchange rules from the expiry month and year. You can get the expiry month and year from the last 3 characters of the RIC, e.g. Z in ATWMZ7^1 stands for December and 7^1 stands for 2017. For this future the expiry date is the last Friday of the expiry month. Eikon provides functions that can help with this type of date calculation, but getting the last date from timeseries is easier.