S&P 500 constituents list

Hi,


I'm trying to download the S&P 500 constituents list for the year 2002 using the following code:

sp2002, err = ek.get_data('.SPX(20020101)',

'TR.IndexConstituentRIC'

)


the code was working before but is not working now; I get the "JSONDecodeError: Expecting value" error.

I was wondering why this happens now, could anyone help me with this?


Thanks in advance,

Mahdieh

Best Answer

  • @mahdiehvg ek.get_data('.SPX',['TR.IndexConstituentRIC(SDate=2002-01-01)']) should work. However, i dont know if the constituent data is being retained for a period so long ago.