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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 0 2 5

Historical Component Stocks of s&p 500 Index

Hello,

I look for the full list of all the companies that have ever entered the S&P 500 Index for the last 25 years. I tried many modifications of this line, but none of them worked by far. Sometimes I get the 505 companies that are the in the Index now, but that is not what I need. Any suggestions? Thank you!

rics, err = ek.get_data(instruments=".SPX", fields=["TR.IndexConstituentRIC"], 
			parameters={'SDate':'1993-01-01', 'EDate': '2018-06-13'})
eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonhistorical
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
39.2k 75 11 27

See the following previous thread on this forum, which explains how to retrieve the list of stocks that left an index in a given time period. Combine the list of leavers in the last 25 years with the current constituents of the index and you should have what you're looking for.
https://community.developers.refinitiv.com/questions/28201/how-to-get-list-of-leaver-companies-of-the-asx-100.html

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

How to create a list of S&P 500 Companies with all updated data like weight, market cap etc. similar to this - https://finasko.com/sp-500-companies/

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
18k 21 12 20

Hi @hindihappy

Please avoid posting a new question on an answered question.

Please try this code:


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

Click below to post an Idea Post Idea