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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
1 0 1 1

Historical bond yield and duration

Hi

How can i get historical bond yield and duration

Didn't find one under Data Item Browser.

Got those for excel from support

=RHistory("03785EAT1=","DURATION.Timestamp;DURATION.Value","START:01-Dec-2021 END:12-Dec-2021 CODE:ISIN INTERVAL:1D",,"TSREPEAT:NO CH:Fd")

=RHistory("03785EAT1=","BID_YIELD.Timestamp;BID_YIELD.Close","START:01-Dec-2021 END:12-Dec-2021 CODE:ISIN INTERVAL:1D",,"TSREPEAT:NO CH:Fd")

How can i get this data with python?

Thnaks

eikon-data-apipythonbonds
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.

1 Answer

Upvote
38.1k 71 35 53

@elie

The RHistory function is similar to the get_timeseries method in Eikon Data API. However,

the get_timeseries method can only retrieve the default view of historical data. The default view of 03785EAT1= is the BID_YIELD view.

df = ek.get_timeseries('03785EAT1=',
            start_date = '2021-12-01',
            end_date   = '2021-12-12',
            interval   = 'daily')

This is the data that the get_timeseries method provides.

1639387496108.png


The DURATION.Value is available in the RDP library ( https://api.refinitiv.com/data/historical-pricing/v1/views/interday-summaries/03785EAT1=).

1639388085911.png

For more information, please refer to the Refinitiv Data Platform Libraries.


1639387496108.png (17.2 KiB)
1639388085911.png (64.0 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.

Click below to post an Idea Post Idea