Download total return series via Eikon API

Hi,

What is the best way of downloading total return time series data for an ETF using Eikon API, for example 'AGG'.

Thanks

Rupert

Best Answer

  • @Rupert.Geyang Thanks for your question. You can try using the total return field - please see the code below:

    df, err =ek.get_data(['AGG'],fields=['TR.TotalReturn(SDate=2020-08-27,EDate=2018-12-01,Frq=D).date','TR.TotalReturn(SDate=1D,EDate=2018-12-01,Frq=D)'])

    df

    image

    I hope this can help.