question

Upvotes
Accepted
38 4 9 17

Search API cannot find US ESG equity indices from US indices

Using the Search API, I want to identify (standard and ESG) equity indices by location (starting from US, then Europe…). But I am not getting back the expected list of indices. The list changes if use filter or query parameters.

If I use filter to find the indexes within the USA, following this previous threat:

    filter = "RCSIndexCountryGroupLeaf eq 'United States' and RCSAssetCategoryLeaf xeq 'Equity Index'",

the search doesn’t returns any “ESG” labelled indices. For example, I would expect that S&P 500 ESG Index USD, Equity Index be in included in the list, but is not.

If I use query for ESG,

    query = “ESG”,

the search returns all “ESG” labelled indices, irrespective of the country or region, But CountryGroup is empty so I cannot select US ESG indices.

If I use both query and filter,

query = “ESG”,
filter = "RCSIndexCountryGroupLeaf eq 'United States' and RCSAssetCategoryLeaf xeq 'Equity Index'",

The search returns nothing.


This is the full code

import refinitiv.data as rd
from refinitiv.data.content import search
import pandas as pd

response = search.Definition( 
    view=search.SearchViews.INDEX_INSTRUMENTS,
    filter = "RCSIndexCountryGroupLeaf eq 'United States' and RCSAssetCategoryLeaf xeq 'Equity Index'",
    query = “ESG”,
    select ="DocumentTitle,CommonName,RIC,RCSIssuerCountryLeaf,IssuerCommonName, IndexCountryGroupName, RCSIndexCountryGroupLeaf,IndexCountryGroup, Region, RIC,IndexCountryGroup",
    top=10000 
).get_data()
response.data.df.to_excel("esg_us_benchmarks.xlsx")

Any ideas on how to identify and select US ESG indices from US indices?

python apiesgrdp searchindices
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.

@ricardo.henriquez

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
17.2k 82 39 63

Hi @ricardo.henriquez

I believe you will need to use the 'RCSIssuerCountryLeaf' as a means to locate US ESG Indices. For example, if I query for 'ESG', these are the available properties with the word country:

ahs.png


ahs.png (46.2 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.

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.