How can I find the RIC for green bond ISIN to download historical prices?

eikonpb3
eikonpb3 Newcomer
edited January 6 in Refinitiv Data Platform

I obtained a list of green bond ISIN via rdp.search() tool using python. For this list I then wanted to download historical prices. This also worked for most of the green bonds. I obtained prices between 2018 and 2023 using rdp.get_data(). However for some ISIN only bid prices are returned and no ask prices or spreads.
I identified the ISIN as follows:
['JP376280AG96','JP525003CH18','KR6064311899','FR0013188067','JP342980AJA5','JP344040AJA6',
'JP344040BJA4','FR0013398229','KR60298889G8','KR60298899G7','KR6065904981',
'KR6138094992','KR6138093994','KR60050829A5','CND100009PX8','CND10000LT35','XS1197336263','XS1434560642','JP316572BMA4','FR0013301074','PLO343300011','JP324640AN50','NO0011160368']
Someone from the helpdesk told me that the ISIN is not linked to the prices and that I need to use the RIC. So I tried to obtain the correct RIC for the ISIN. RIC only with suffix "=" often does not work but "=RRPS" seems to have historical prices.

data = rdp.get_data(
    universe=['JP376280AG96'],
    fields=['TR.BondRIC','TR.FiParentImmedOrgID'],
)
data
rrps_bondrics = data[data['TR.BondRIC'].str.endswith('=RRPS')]
unique_rrps_bondrics = rrps_bondrics['TR.BondRIC'].unique()

Result: ['JP00034307=RRPS', 'JP00044307=RRPS', 'JP00064307=RRPS', 'JP00084307=RRPS', 'AUNOM0232=RRPS', 'JP00094307=RRPS', 'JP00104307=RRPS', 'JP00114307=RRPS' 'JP00134307=RRPS', 'JP00124307=RRPS', 'JP00144307=RRPS']

I guess the =RRPS suffix is the correct one but for the example ISIN I get several RIC with =RRPS suffix and only one contains prices
data = rdp.get_data(   
universe=['JP00034307=RRPS'],   
fields=['TR.ASKPRICE.date', 'TR.BIDPRICE.date', 'TR.ASKPRICE', 'TR.BIDPRICE'],   
parameters={'SDate': '2020-02-01', 'EDate': '2020-02-06', 'Frq': 'D'})
data

My questions are: Why can I not simply use the ISIN to request prices for these bonds? How can I identify the correct RIC that has prices available and download the prices efficiently?
Thank you for the support.

Best Answer

  • eikonpb3
    eikonpb3 Newcomer
    Answer ✓

    I have resolved the issue. I needed to open another session using "rd.open_session()" and then the symbol conversion worked.

    Still, the RIC returned is not the BondRIC that has historical pricing infromation stored. Is there any advide how to obtain the RIC with suffix "=RRPS"?

    See an example of multiple BondRIC below. I am still trying to figure out the differences with the help desk team, in case anyone has information on that.

    grafik.png

Answers

  • Hi @eikonpb3 ,

    I would advise using the LDL (more about it on this site).

    Have you tried the below?

    response = symbol_conversion.Definition(
    symbols=["US5949181045", "JP376280AG96"],
    from_symbol_type=symbol_conversion.SymbolTypes.ISIN,
    to_symbol_types=[
    symbol_conversion.SymbolTypes.RIC]).get_data()
    response.data.df

    ld.get_data(
    universe=response.data.df.RIC.to_list(),
    fields=['TR.ASKPRICE.date', 'TR.BIDPRICE.date', 'TR.ASKPRICE', 'TR.BIDPRICE'])

    .

    I tried on CodeBook :

    image.png


    If there is any data missing, please look into another field on the DIB.

    Failing that, please reach out to myaccount.lseg.com. This is because, if you are after a specific field you cannot find on the DIB, this would be a content question, for which our agents on myaccount.lseg.com would be better suited to answer you.

  • eikonpb3
    eikonpb3 Newcomer

    Dear @jonathan.legrand

    thank you for the provided solution. I tried the code you provided and the following works:

    grafik.png grafik.png

    What is not working is the symbol conversion. I get the following error: "AttributeError: No default session created yet. Please create a session first!" I am unsure because Workspace is running and the session is opened.

    grafik.png

    My original issue was also that it seems for the RICs that you received via the conversion no "Ask Price" (this is the correct field, no other fields can be used) is returned. This is the case, because the RIC only has the "=" suffix but it needs to be the RIC with the "=RRPS" suffix. Apparently, bonds can have several RIC. Thats what I have learned from the helpdesk. They also told me it is a coding question and not a content question anymore, so I should ask here. Is it possible to convert the ISIN to the BondRIC or a RIC with a specific suffix?

    Thank you!

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @eikonpb3

    You can use the Search API to get a RIC that ends with '=RRPS'. The code looks like this:

    response = search.Definition(
        view=search.Views.SEARCH_ALL,    
        filter="IssueISIN eq 'JP376280AG96' and endswith(RIC,'=RRPS')",
        select="BusinessEntity,DocumentTitle,RIC",
    ).get_data()
    response.data.df
    

    The output is:

    image.png