New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
43 4 5 11

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




#contentpython apidatastream-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
87.8k 294 53 79

@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 4 5 11

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.