How can I find the component of indexes like the S&P 500 or the Sub Index and access them in Python through the jupyter notebook?
How can I write a define a screener and have the results returned in a jupyter notebook?
For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
How can I find the component of indexes like the S&P 500 or the Sub Index and access them in Python through the jupyter notebook?
How can I write a define a screener and have the results returned in a jupyter notebook?
Hi @nikolas - Thank for your question. Refinitiv maintains a number of chain RICs which provide the constituents of many indices as well as options and futures chains. Please use the following code to get the constituents of the SPX.
df,err = ek.get_data(['0#.SPX'], ['CF_NAME']) df
To find the chain RICs for subsectors you can just add a 0# infront of say .SPLRCTELP which is the Integrated Telecommunications Services sub index.
I hope this can help.
@nikolas just add the fields in as you want - you can see a full list of fields available using the Data Item Browser App (type DIB into Eikon search bar):
df,err = ek.get_data(['0#.SPLRCTELP'], ['CF_NAME','TR.CompanyMarketCap']) df