For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
27 2 1 5

Retrieve historic yield/swap spread data of Bonds

For e.g. US208152246= we'd like to be able to retrieve the following fields:

RT_YIELD_1

SWAP_SPRD

at a specific date in the past. Can you suggest how to do this with the Python API?

Thanks in advance

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

Upvote
Accepted
18k 21 12 20

Hi @tr105

RT_YIELD_1 and SWAP_SPRD are on realtime dataset so they do not support timeseries.


I think you can use the following fields:

df, err = ek.get_data("US208152246=",
                      ['TR.MIDYIELD.Date','TR.MIDYIELD',
                       'TR.SWAPSPREADBID.Date','TR.SWAPSPREADBID']
                      ,parameters={'SDATE':'2020-02-10'})
df

Here is the sample output:

If these TR.MIDYIELD and TR.SWAPSPREADBID fields are not what you are looking for, you can try searching for fields in "Data Item Browser".

To launch "Data Item Browser" type in "DIB" on Eikon Search Bar and press enter.


If you need further help on the data field, you can contact Refinitiv Content Helpdesk at https://my.refinitiv.com/


ahs1.png (100.3 KiB)
ahs2.png (10.6 KiB)
icon clock
10 |1500

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

Thanks, this makes sense!

Upvotes
6.7k 8 6 7

Hi @tr105 please try the following code - I hope this can help you.

df, err = ek.get_data("US208152246=", ['RT_YIELD_1','SWAP_SPRD'],parameters={'SDATE':'20200217'})
df
icon clock
10 |1500

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

Click below to post an Idea Post Idea