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
43 2 4 8

How to retrieve MSCI index constituents & weights (index shares + weights) in Datastream?

Hello.

I want to retrieve the same informations like in this post in Datastream.

Here is the formula I'm using to retrieve this information.

=@DSGRID($B$1,"RIC,NAME,NOSH,NOSHFF","Latest Value","","","RowHeader=true;ColHeader=true;DispSeriesDescription=true;DispDatatypeDescription=true")


I tried with the following list constituents (LFRCAC40, LDJSTOXX and LMSWRLDD) but the results are not correct.

The returned data are at the company level and not at the index level

1687969991688.png


Expected values returned by Refinitiv Data Library:

import refinitiv.data as rd

rd.open_session()

INDEX_CONSTITUENT_SHARES_FLD = "TR.IndexConstituentShares"
INDEX_CONSTITUENT_RIC = "TR.IndexConstituentRIC"
INDEX_WEIGHT = "TR.IndexConstituentWeightPercent"

df = rd.get_data(".FCHI", [INDEX_CONSTITUENT_RIC, INDEX_WEIGHT, INDEX_CONSTITUENT_SHARES_FLD])
df


1687970429617.png


can someone have a look, please ?

Thanks




#contentdatastream-apipython apiexceldatastream
1687969991688.png (24.2 KiB)
1687970429617.png (86.5 KiB)
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
79.2k 251 52 74

@yaokoffi.kouassi

Thank you for reaching out to us.

It should be these data types:

  • WTIDX: % Weight Of Each Constituent Within The List
  • FNSIDX: Number Of Shares Used In The Index Based On Free Float
df = ds.get_data("LFRCAC40",["RIC","WTIDX","FNSIDX"],kind=0)
df.pivot(index='Instrument', columns='Datatype')['Value']

1688010365415.png

Typically, you can use the Datastream Navigator tool to search for instruments and data types.

Otherwise, you can contact the Datastream support team directly via MyRefinitiv to find data types for you.

I hope that this information is of help.


1688010365415.png (34.6 KiB)
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
43 2 4 8

Thank you so much @Jirapongse .

Your code works fine!

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.