Hi,
I would like to download all companies that were part of the CDAX between 2000 and now. I am using an API (Python) but I have no clue what data to pull. I would appreciate all help. Thank you
Hi,
I would like to download all companies that were part of the CDAX between 2000 and now. I am using an API (Python) but I have no clue what data to pull. I would appreciate all help. Thank you
Hi @researhcer42 ,
Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.
Thanks,
AHS
Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,
AHS
Hi @jiri.tresl ,
The code below will provide index constituent changes for your requested period:
df = rd.get_data('.CDAX', ['TR.IndexJLConstituentRIC' , 'TR.IndexJLConstituentName', 'TR.IndexJLConstituentChangeDate', 'TR.IndexJLConstituentChangeDate.change'], parameters = {'SDate': '2000-01-01', 'EDate':'2023-10-30'}) df
And the code below will show you the current constituents where you can also add parameters = {'EDate': '2023-10-30'} to request for a specific date:
df = rd.get_data('.CDAX', ['TR.IndexConstituentRIC' , 'TR.IndexConstituentName']) df
Hope this helps.
Best regards,
Haykaz
Hi @jiri.tresl ,
The code below can be used with the Eikon Data API to retrieve the data of the current index constituent
df, err = ek.get_data(['.CDAX'], ['TR.IndexConstituentRIC']) df
and this code can be used to get the constituent change of this index (joiner and leaver) since
df, err = ek.get_data('.CDAX', ['TR.IndexJLConstituentChangeDate', 'TR.IndexJLConstituentRIC.change', 'TR.IndexJLConstituentRIC'], {'SDate':'2000-01-01', 'EDate':'2023-10-30', 'IC':'B'}) df
By combining these two dataframe, you will get all of the constituents of this index. Hope this helps and please let me know in case you have any further questions.