Getting .xu030 index constituents and weights daily for a time interval, Python

Hi,

I am trying to get the index constituents and their weights for .xu030 (BIST30 Index)


I already have the following code to get the index constituents and their weight for a single date:

df_constituents, err = ek.get_data(#0.xu030, "TR.IndexConstituentWeightPercent",{'Sdate':'2019-10-01})

This works fine for 2019-10-01.

However, I am trying to get all index constituents and weights for,

start date: 2019-10-01, end date: 2019-11-04

Ideally, I'd like to get all index constituents and their weights in 1 pandas dataframe, if I can.

Thank you in advance.

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    Index constituents weights can only be retrieved one date at a time, so the only option is to retrieve the constituents and weights for each day in your date range and combine the results.

Answers

  • Hi Alex,

    Thank you. Taking index constituents and weights day by day takes such a long time... It's a bummer that Refinitiv isn't providing this in one go. I was hoping that maybe this existed as a time series.

    Thanks

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.