Python API - Bond Yield Data

/Hi,

Is there a way to download the yield data using Python API for a specific date? For example, if I'm trying to download '075887BX6=FINR' bond's yield as of 8/22/2019 (which is 3.57%), what would be the python syntax?

Thank you.

image

image

Best Answer

  • The default bond time series field in Eikon DAPI for contributed pricing sources is price, not yield... i.e. currently the yield field for =FINR RICs is not available as a time series (although you can snap individual values as Pedro mentioned in previous response).

    However, for composite RICs the defalut field is in fact yield, so while not exactly the same; since it's a composite pricing source rather than from FINRA (TRACE) it will provide a historical yield trail.

    ts = ek.get_timeseries(['075887BX6=FINR'], fields = ['CLOSE'], start_date = "2019-08-06", end_date = "'2019-09-06", interval="daily") 
    ts1 = ek.get_timeseries(['075887BX6='], fields = ['CLOSE'], start_date = "2019-08-06", end_date = "'2019-09-06", interval="daily")

    image

    image

Answers

  • Hi @Nate.Kim,



    You can use the APP, DIB (Data item browser) to find the syntax for different
    information and syntax on Eikon.

    image

    The code would be:

    yield0, err = ek.get_data(['075887BX6=FINR'],
    ['TR.CLOSEYIELD(SDate=2019-08-22)'])
    print(yield0)
    d,