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
1 0 1 3

Historical Index constituents Python API

Hello, I am looking to build a query that returns an Index constituents for a given date, historically, using the Python API eikon package.

I am using the following code:

df, err = ek.get_data(
    instruments = ['0#.SPX'],
    fields = ['TR.IndexConstituentRIC',
              'TR.IndexConstituentName'],
    parameters = {
        'SDate':'1996-01-02'
    }
)

However, the above works up to year 2000 or so, but returns bad request for, e.g., 1996.

The objective for me is to retrieve the components, yearly, all the way back to 1980's and for the SP500 and FTSE All World Indexes.

How would i do so?


Many thanks

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspace-data-apiindexconstituents
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 @mihalis.panczyk ,

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 on the left side of the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

@mihalis.panczyk

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
10.2k 18 6 9

@mihalis.panczyk Thanks for your question - so historical index constituent coverage varies by index - this is a more detailed content question and is best checked with the appropriate content team by raising a ticket on Contact Us marking it a Content Query. Be sure to put all the RICs you want the earliest dates for and they will be able to check those for you. Your code is of course working fine. I hope this can 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.

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.