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
242 3 4 2

Get Relevant Stock Index

How do I get the relevant stock index closing price starting from a Ultimate Parent Id in order to get Abnormal Returns? Is there a field I can add that I am unable to find on DIB?


bonds, err = ek.get_data(
    identifiers,
    ['TR.ClosePrice.date', 'TR.ClosePrice'],
    {'SDate': starting_date,
     'EDate': ending_date})


eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apitime-seriesindexmarket-by-price
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.

@lorenzo.cerreta

Thank you for your participation in the forum.


Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the reply that best answers your question.


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

Upvotes
Accepted
18.2k 21 13 21

Hi @lorenzo.cerreta

I am not sure of the "relevant" meaning but if you mean peers of a stock.

You can use PEERS() function on ADC.

Here is an example to get list of peers of "PTT.BK":


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

Thanks for the reply. What I mean is that if the parent ID is listed in the USA, I would like to get the S&P500 closing prices or even simply '#0.SPX', so that I can get the prices from the right code.

I would like to get it automatically because I need to do the same for many companies listed in

  
                   
  1. ['Australia', 'Austria', 'Belgium', 'Bermuda', 'Brazil', 'Canada', 'Cayman Islands', 'Chile', 'China (Mainland)', 'Colombia', 'Denmark', 'Finland', 'France', 'Germany', 'Hong Kong', 'India', 'Italy', 'Japan', 'Lithuania', 'Luxembourg', 'Mexico', 'Morocco', 'Netherlands', 'New Zealand', 'Nigeria', 'Norway', 'Peru', 'Philippines', 'Portugal', 'Singapore', 'South Africa', 'South Korea', 'Spain', 'Sweden', 'Switzerland', 'Taiwan', 'Thailand', 'Turkey', 'United Arab Emirates', 'United Kingdom', 'United States']

and I don't know the right index (nor the right code required by Refinitiv) for them

Upvote
18.2k 21 13 21

Hi @lorenzo.cerreta

I think you have to have your own mapping.

I found this TR.MemberIndexRic field from Data Item Browser.

But a RIC can be a member of multiple indexes.


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