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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
35 1 1 3

How do I get the list of the S&P500 constituents on any given date?

I can get the current list of the S&P constituents using this: ek.get_data('0#.SPX',['TR.CommonName', 'TR.InstrumentIsActive', 'TR.CompanyMarketCap', 'TR.PriceClose']).

But I would like to be able to get the list on any given date that I would pass on to the code. Is there any way to do this? Thank you.

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikondate
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
4.6k 26 7 22

There is, but the depth of historical data depends on the index provider. Try this for the snapshot of the constituents for January 1st, 2016:

tr.get_data(instruments=".SPX", fields=["TR.IndexConstituentRIC","TR.IndexConstituentName"], parameters={'SDate':'2016-01-01'})
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.

This works for me, thank you very much.

I tired this, but It seams that it does not return data before 2014. Is this data not avaalible?

The available data depend on the index that provides it

I would suggest calling Thomson Reuters Support Desk with this, they would be able to provide you more asset specific information.

Upvotes
39.3k 76 11 27

Here's another method that I find to produce much better results:
tr.get_data("0#.SPX(2012-01-01)", ["TR.CompanyName"])

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. And yes, that's an easier method. Also if you want to get the close price (I am sure it works for other fields but i have not tried) for that specific date you can do:

tr.get_data("0#.SPX(2017-07-01)", ["TR.CompanyName","TR.PriceClose(2017-07-01)"])

Why does this does not return any RIC if supplied with 'TR.IndexConstituentRIC' ?

Two reasons.

  1. Incorrect syntax.
    To retrieve index constituents using TR.IndexConstituentRIC field you need to use index RIC not the chain RIC, i.e. ".SPX" instead of "0#.SPX", and the date needs to be passed in the parameters of get_data method rather than in the instrument.
  2. Index constituent history available through TR.IndexConstituentRIC field only goes back to 2016.

See the discussion on this thread for more details and alternative ways to retrieve historical index constitutes.

Hi there, where could I find the depth information about apis or fields such your said "TR.IndexConstituentRIC field only goes back to 2016"? Thanks