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

question

Upvotes
Accepted
3 0 0 1

Retrieving historical swaption volatility with ek.get_data

Hello,

I am trying to retrieve historical BasisPoint OIS-discounted swaption volatility in Python. I managed to retrieve the latest values with the following command for example for EUR 1m10y volatility:

ek.get_data('EUR1MX10Y=ICAP', 'GEN_VAL1')

But when I try adding the start date and end date parameters

ek.get_data('EUR1MX10Y=ICAP', 'GEN_VAL1',{'SDate':'2018-08-21','EDate':'2018-08-23'})

the function returns exactly the same thing i.e. latest values.

If that is of any help, the way I retrieve this data in Excel is with the following function:

=RHistory(ric,"BP_VOLT.TIMESTAMP;BP_VOLT.VALUE","START:"& start_date &" END:"& end_date &" INTERVAL:1D",,"SORT:DESC TSREPEAT:N", target_cell)

Thank you.

Mickael

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apihistoricalvolatilityswaps
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
4.6k 26 7 22

@mickael.sabet

It is a little bit confusing, but I will try my best to explain.

Eikon Data API gives you the access to several data sources. The following request will connect to the real-time data system and give you the latest snapshot of the field:

ek.get_data('EUR1MX10Y=ICAP', 'GEN_VAL1')

In order to access the time series for the value (which may or may not be present) you will need to use the ek.get_timeseries() call. The bad news is that this functionality is not yet available in the beta API. At the moment you can only get the data for the default view (.TIMESTAMP, .VALUE in RHistory) and is physically the BID price from EUR1MX10Y=ICAP.

Hope this helps.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you Zhenya, that's very helpful. Do you know when this functionality will become available?

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.