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

Rhistory to Python conversion

I am a bit confused as to which queries are currently supported by the python timeseries API. For example, can the following be translated to python "get_timeseries" or "get_data" :

=RHistory("KR10YT=RR","SWAP_SPRD.Timestamp;SWAP_SPRD.Value","START:01-Jan-2020 END:12-Sep-2020 INTERVAL:1D",,"TSREPEAT:NO CH:IN;Fd")

?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apieikon-com-apitime-series
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.

Upvote
Accepted
78.1k 246 52 72

@mika.kastenholz1

The get_timeseries method can be used to retrieve the same data as the RHistory function. However, the get_timeseries method can retrieve only the default view of RHistory. For KR10YT=RR, the default view is the Common view.


Therefore, you can't use the get_timeseries method to get SWAP_SPRD.Value in the Swap spread view.

The get_data method can be used to retrieve the same data as the =TR function. I found that TR.SWAPSPREAD returns NULL for KR10YT=RR.

You need to contact the Eikon support team via MyRefinitv and ask for the TR formula which can be used to retrieve the historical swap spread values. If it is available, you can apply it to the get_data method.



1586749684694.png (36.5 KiB)
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.

Upvotes
3 0 0 1

Thanks for your reply. However, I can confirm that the query above works

=RHistory("KR10YT=RR","SWAP_SPRD.Timestamp;SWAP_SPRD.Value","START:01-Jan-2020 END:12-Sep-2020 INTERVAL:1D",,"TSREPEAT:NO CH:IN;Fd")

in excel. How would the respective get_data query then look like?

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.

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.