Hi,
Is there a way to get expiration dates for already expired options? E.g. for 1C110C9^C19
Upgrade from Eikon -> Workspace. Learn about programming differences.
For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
Hi,
Is there a way to get expiration dates for already expired options? E.g. for 1C110C9^C19
Thank you for your participation in the forum.
Is the reply below satisfactory in resolving your query?
If yes please click the 'Accept' text next to the reply.
This will guide all community members who have a similar question.
Otherwise please post again offering further insight into your question.
Thanks,
AHS
Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,
AHS
@vaidotas.gulbinas Sorry I couldn't find the RIC you posted - but I took another valid RIC that expired. Unfortunately once the RIC is expired it is archived and only the price history is available for it. The RIC does contain some details that allow you to try to get some price data and from there you can figure out what the date was for the last settlement price. Let me show you:
df,err = ek.get_data('LCOQ9^1', ['TR.SETTLEMENTPRICE.date','TR.SETTLEMENTPRICE'], {'SDate':'-24M', 'EDate':'0D' }) df.set_index("Date", inplace = True) df
We know that LCOQ9^1 refers to the year 2019 - so as long as we request data that was there whilst the instrument was active we can then simply:
df['Settlement Price'].last_valid_index()
'2019-06-28T00:00:00Z'
I hope this can help.
Similar to @jason.ramchandani approach I think that you can use an RDP library that is already available in Eikon. You can get the timeseries of the Implied Volatility field and choose the last available item.
df = rdp.get_historical_price_summaries("1C110C9^C19", fields = ["IMP_VOLT"]) df['IMP_VOLT'].last_valid_index()
Timestamp('2019-02-22 00:00:00')