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
1 4 4 6

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

@elie

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

1 Answer

· Write an Answer
Upvote
Accepted
78.9k 250 52 74

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