Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
18 1 1 2

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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

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

Upvotes
Accepted
39.4k 77 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 512.0 KiB each and 1.0 MiB total.

Upvote
18 1 1 2

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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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