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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 0 0 1

Retrieval of Parent equity close prices via Bond RIC

Hi,


I am using the python interface to the API to retrieve corporate bond data, I have a list of their RICs. Now, I need data about close prices of their issuers equity. The question is: is there a best practice for that? For instance, for the RIC "DEA162A2=" the ultimate parent id is not listed, while the immediate parent it is. But in general? Any solution?


Thanks a lot

Emanuele

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonbondsequities
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.

Upvote
Accepted
9.7k 49 38 60

Hi @ema.belli93,

Here is a simple Python function that will route the bond to equity RIC based on the above recommendations:

def get_ric(bond):
    # Retrieve the preferred RIC for the bond - which could be a RIC or ISIN
    pf,err = ek.get_data(f'{bond}', ['TR.PreferredRIC'])
    of,err = ek.get_data(f"{pf.iloc[0][1]}", ['TR.FiParentOrgID'])
    df,err = ek.get_data(f"{(of.iloc[0][1])}", ['TR.PrimaryRIC'])
    if df.isnull().values.any():
        df, err = ek.get_data(f"{pf.iloc[0][1]}", ['TR.FiParentImmedOrgID'])
        df, err = ek.get_data(f"{df.iloc[0][1]}", ['TR.PrimaryRIC'])
    
    return df

Obviously, you can tweak it to suit your workflow.

And the following screenshot is me using it with multiple bond:


ahs.png (33.3 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.

Upvotes
9.7k 49 38 60

Hi @ema.belli93,

There are a number of questions in there. It's probably best if you elaborate and provide code samples of what you have done thus far and what isn't working. For example, you stated there is no ultimate parent ID listed for DEA162A2=

Is part of your question looking for this:

df, err = ek.get_data(['DEA162A2='],['TR.UltimateParentId', 'CF_CLOSE']) 
df


ahs.png (7.9 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.

Upvotes
5 0 0 1

Hello @nick.zincone.1,


sorry for being unclear. Given a bond RIC, say "DEA162A2=", I want to retrieve the RIC and close price of it's equity (or of the closest listed company which is linked to the debt instrument). So first I would run:

ek.get_data(['DEA162A2='], 'TR.UltimateParentId')

to find the parent and then

ek.get_data(instruments=['parent_id_name'],
        fields=['TR.PriceClose.calcdate', 'TR.PriceClose'])

to get the price. Now the problem: sometimes the UltimateParentId is not listed (maybe is some kind of holding), but it may be the case that the debt instrument is linked to some company which is listed. How to make sure to retrieve the "right company ticker". Maybe something like "closest_equity_instrument_id"...


Hopefully now it is clearer what I mean.


Thanks!

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.

Upvote
9.7k 49 38 60

Hi @ema.belli93,

Perhaps it is a misunderstanding of the language used. For example, what do you mean by: "...sometimes the UltimateParentId is not listed"? Based on the specific example you used, which I'm assuming was the unlisted UltimateParentID, I can do this:

df, err = ek.get_data(['5000057211'],['TR.CommonName', 'TR.F.TotAssets', 
                                      'TR.PriceClose'])

Which will result in data coming back, but not all fields will be populated, i.e.

For this instrument, I couldn't find the closing price. It's important to note, this Q&A forum is dedicated to API-related questions. And while we will attempt to help find the data you are looking for, sometimes you may need to ask a content specialist via our Refinitv Helpdesk.

I did look for a PriceClose field within the Data Item Browser (DIB), but none exists. Perhaps, the closing price may not be relevant for this particular asset - something a content specialist will be able to provide.

I also attempted to locate, via the DIB, the RIC of its equity (or of the closest listed company which is linked to the debt instrument), but nothing was obvious to me.

What I would suggest is to utilize the DIB to see if there is a RIC linked to the debt instrument. If this fails, then I would suggest reaching out to a content specialist via the helpdesk.


ahs.png (10.7 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.

Upvote
9.7k 49 38 60

Hi @ema.belli93,

I've reached out to the content specialists to get a better understanding of your question. Here are the responses:

"As far as I can see none of the entities this bond rolls up to is a public company. Eikon has an app named Company Tree Structure, which provides a convenient view and filtering options to view the company's parents, subsidiaries, affiliates, and joint ventures.

This bond's issuer's immediate parent Landesbank Berlin Holding AG (permID 5000006301) used to be a public company, but it was delisted in 2013. The delisted equity RIC is BEBG.F^I13"

df, err = ek.get_data(['BEBG.F^I13'],['TR.CommonName', 'TR.PriceClose'])

The challenge with the above example is that the immediate parent used to be a public company, but was delisted - which I believe you already discovered. Here is a recommended approach to determine the preferred RIC:

"The general route from bond RIC to equity RIC I would recommend is as follows on an example of a random Apple bond (Eikon4 Excel):"

 =@TR(TR(TR("037833BT6=","Tr.PreferredRIC"),"TR.FiParentOrgID"),"TR.PrimaryRIC") 

"The assumption here is that it's the parent that is listed, which is usually the case. If the RIC that is chosen is a composite (ending with"="), TR.Preferred RIC intermediary is not necessary, but if the client happens to use a contributed RIC or ISIN, it becomes essential. By the above logic, for DEA162A2=, if you go via TR.FiParentOrgID, you will end up with Erwerbsgesellschaft ..which is not listed. If you go via TR.FiParentImmedOrgID, so immediate parent, you end up with delisted Landesbank Berlin Holding AG."

df, err = ek.get_data(['DEA162A2='],['TR.UltimateParentId', 
                                     'TR.FiParentOrgID', 
                                     'TR.FiParentImmedOrgID'])

Although it wasn't clear from your example, you do imply you are able to extract the immediate parent. So, I assume you have already derived the above. And I also am assuming you were able to retrieve the Close Price from the immediate parent.


ahs.png (7.5 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.

Upvotes
5 0 0 1

Thanks a lot for the detailed answer @nick.zincone.1. So, just to wrap up, what is the general route from bond RIC to equity RIC you would recommend in the python api?

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