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.

Best Answer

  • Zhenya Kovalyov
    Answer ✓

    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'})

Answers