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
5 1 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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apihistorical
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
Accepted
39.4k 77 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 512.0 KiB each and 1.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 512.0 KiB each and 1.0 MiB total.

Upvotes
18.2k 21 13 21

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