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?