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
36 4 4 11

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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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
18.2k 21 13 21

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 512.0 KiB each and 1.0 MiB total.

Thanks, this makes sense!

Upvotes
10.2k 18 6 9

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 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.