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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 0 0 2

Eikon Data API - Error requesting TR.IndexConstituentWeightPercent

I'd like to request the constituents of an index via:

df, err = ek.get_data('.SPX', ['TR.IndexConstituentRIC', 'TR.IndexConstituentWeightPercent'])

However the weight fileds don't contain any value:

>>> df
    Instrument Constituent RIC  Weight percent
0         .SPX         POOL.OQ            <NA>
1         .SPX         CHRW.OQ            <NA>
2         .SPX           AJG.N            <NA>
3         .SPX           CNP.N            <NA>
4         .SPX          AMCR.N            <NA>
..         ...             ...             ...
500       .SPX           DXC.N            <NA>
501       .SPX         SNPS.OQ            <NA>
502       .SPX             J.N            <NA>
503       .SPX         SIVB.OQ            <NA>
504       .SPX           AVY.N            <NA>

[505 rows x 3 columns]

Furthermore I get this error for every single row in the result:

>>> len(err)
505
>>> err[0]
{'code': 415, 'col': 2, 'message': 'Unable to collect data for some field(s).', 'row': 0}


My overall goal is to request the TRBC sector weights of an index, so if there is another way to directly request the sector weights (rather than manually computing them via constituents) that would solve my problem as well.


I've noticed that another person in 2018 had quite a similar problem (see https://community.developers.refinitiv.com/questions/23018/eikon-data-api-trindexconstituentweightpercent-thr.html), hoewever it is not clear what solved the issue back then.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonindexconstituents
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

This may be related to your Eikon account entitlements. For S&P indices access to the list of constituents is included with base Eikon subscription, while access to weights is fee liable and requires additional entitlements. See if you can view constituent weights for .SPX in Eikon application's Constituents Analysis app. Try the Summary or Index Sector report in Constituents Analysis app. If you see "NP" in the Weights column, this indicates that your Eikon account is not entitled for this data.

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
5 0 0 2

I just use the base subscription and can confirm that the concrete constituents weights are not shown when looking at the index overview in Eikon Desktop App - so this must indeed be the reason I cannot retrieve them.

However, since I'm actually looking for the current consolidated sector weights of the .SPX, which are actually shown in the index constituents analysis window in the Eikon Desktop App, is there any way to retrieve them via Eikon Data API?

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.

I'm afraid not. You can download them as an Excel spreadsheet from Constituents Analysis app, but they're not available through Eikon Data APIs.

Click below to post an Idea Post Idea