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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 0 2

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.

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonbondsyield
1.png (259.8 KiB)
2.png (152.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
Accepted
644 2 6 7

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")


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
1 0 2 2

Hi @Nate.Kim,


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

The code would be:

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

capture.png (77.0 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.