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
20 0 2 8

How to get historical bond price of matured expired bonds from ISIN to RRPS RIC?

How can I obtain historical prices for expired bonds in an automated way? Obviously, it works if I do it manually (by looking up the RIC in Refinitiv Workspace’s user interface)


Using script below, it does not get the RRPS RIC of these matured expired ISINs:


import refinitiv.data as rd

from refinitiv.data.content import symbol_conversion


rd.open_session()


response = symbol_conversion.Definition(

symbols=["DE000A13SHV1", "AT0000A1EZR1", "AT0000332853", "DE000HSH40E5", "US459200HU86"],

from_symbol_type=symbol_conversion.SymbolTypes.ISIN,

to_symbol_types=[

symbol_conversion.SymbolTypes.RIC

],

).get_data()


response.data.df


What the client wanted to achieve is by using the ISINs of these matured expired bonds, he wants to get the RRPS RICs then eventually use them in another script similar to below to get the historical data. Can you please advise the best way to do this? Or if this is even doable? Thank you.


import refinitiv.data as rd

rd.open_session()

df = rd.get_history(

universe = ['DEHSH40E=RRPS'],

start = "2021-12-15",

end = "2021-12-31"

)


df[::-1]

#productapi
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.

1 Answer

· Write an Answer
Upvote
Accepted
6.2k 18 2 8

Hi @dianne.palmario ,


Thank you for your question. I would suggest using Search capabilities of RD Library. Please see below:

df = rd.discovery.search(
    view = rd.discovery.Views.GOV_CORP_INSTRUMENTS,
    filter = "SnSISIN in ('DE000A13SHV1' 'AT0000A1EZR1' 'AT0000332853' 'DE000HSH40E5' 'US459200HU86')",
    select = "SnSISIN, RRPSRic"
)
df

screenshot-2023-05-26-at-113859.png

Hope this helps.


Best regards,

Haykaz


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.