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

Best Answer

  • Hi @tr105

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

    image


    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:

    image

    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/

Answers