For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 1

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.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
39.2k 75 11 27

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 1 1

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea