How can I get historical data for the constituents of an index on Python?

How can I get historical data for the constituents of an index on Python?

Best Answer

  • Hi @reshma.palackan

    Here is an example how you can make it. The best approach to find the fields and necessary parameters is using Eikon Excel Build Formula tool.

    df_tmp,err= ek.get_data("0#.STOXX50","TR.RIC")
    instruments = df_tmp['RIC'].tolist()
    df,err = ek.get_data(instruments,["TR.WasteTotal.date","TR.WasteTotal"],{"Period":"FY0", "Frq":"FY", "SDate":"0", "EDate":"-10"})
    df

Answers