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
75 4 5 6

Retrieve inactive related companies

Hello guys,

I couldn't find a similar question.

Let's say I would like to retrieve a list of all related companies of a RIC.

For that purpose I have built the following formula:

equity, e = ek.get_data(ric, ['TR.RelatedOrgId', 'TR.RelatedOrgName', 'TR.RelatedOwnPct', 'TR.RelatedOrgType'])

As I expected, I have recieved a very well dataframe with related companies. However, to my best knowledge, the dataframe doesn't contain inactive companies, to which the RIC was related in the past.

1. Is it possible to adjust the code, so that the query also includes inactive companies?

2. As an alternative: Is it possible to define a timeframe? For instance the related companies between 2005-2019?

Please let me know if I can improve my question. :D

Thank you in advance!

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

hi @Statistik Dude ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Upvotes
Accepted
5.8k 21 2 6

Hi @Statistik Dude ,


Have you tried using the search API? This article shows you how you could use it, and I think it fits your needs perfectly.

To add a time period to your EDAPI request, you can use the 'parameters' argument, e.g.:


SPX = ek.get_data(instruments=".SPX",  # Looking at the S&P 500, thus the ' SPX '; indecies are preceded by a full stop ' . '.
                  fields=["TR.CLOSEPRICE.timestamp",
                          "TR.CLOSEPRICE"],
                  parameters={'SDate': '2018-01-01',
                              'EDate': '2019-01-01',
                              'FRQ': 'D'}
                 )[0]  # ' ek.get_data ' returns 2 objects, the 0th is the data-frame that we're interested in, thus the ' [0] '.
SPX = SPX.dropna()  # We want to remove all non-business days, thus the ' .dropna() '.
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.

Upvote
75 4 5 6

Hi,


I have managed to answer the question by my self.


If I have an ultimate parent ID given, the followoing screen works to my knowledge:


syntax = 'SCREEN(U(IN(Equity(active,public,primary))), IN(TR.UltimateParentId, "%s"))'%(ult_id)   

fields = ['TR.CommonName']
df,e = ek.get_data(syntax, fields)


I still would like to thank @jonathan.legrand for his help.

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.

Hello @Statistik Dude,

Thanks for sharing your answer with the community!

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.