Get Information for equity indices?
Hello,
I would like to get equity index information, including the begin date, and data on their weighting calculations, issuer, index series type… Where can I find this information? I am assuming it exists since there are fields with these names.
Using the advanced search tool, I filtered US Large equity indices. However, I couldn't get the additional fields values.
On the DIB tool, for a given index, I couldn't find that info neither.
Also on the RDP API, there is no such data.
df, err = ek.get_data(
instruments = [
'.SOSGUSSP',
'.SOSGUSSN',
'.SOSGUSST'
],
fields = [
'TR.IndexHistoryBeginDate',
'TR.IndexBeginDate',
'TR.IndexName',
'TR.IndexVariants',
'TR.IndexIssuerName',
'TR.IndexMktCapVendor',
'TR.IndexWeightingSource',
'TR.IndexWeightingType',
'TR.IndexWeightingName',
'TR.IndexWeightingName',
'TR.IndexTotalReturn1Wk'
]
)
Best Answer
-
You can filter to look for what you're after in DIB, as per this video. E.g.: I could find the Country Headquarters by filtering datatypes:
and filtering with the gear symbol:
You can use the Search API to find the Indices you're after:
import refinitiv.data as rd
from refinitiv.data.content import search
rd.open_session()
# Fields we can collect with INDEX_INSTRUMENTS in Search API
fieldsResponse = search.metadata.Definition(
view = search.SearchViews.INDEX_INSTRUMENTS
).get_data()
# Export metadata to a spreadsheet for easy viewing
fieldsResponse.data.df.to_excel("INDEX_INSTRUMENTS.xlsx")
# Send Search request
response = search.Definition( # for more on this: `help(search.Definition)`
view=search.SearchViews.INDEX_INSTRUMENTS, # for more on this: `help(search.SearchViews)`
query="USA",
top=20 # 10000 max if memory serves me right
).get_data()
response.data.df
rd.close_session()1
Answers
-
You can then use the below to collect constituents:
df1 = rd.get_history(
universe=["0#.SPX"],
fields=["TR.PE"],
interval="1D",
start="2021-10-01",
end="2021-10-03",
)
display(df1)Then use the DIB for each instrument's data:
0 -
@jonathan.legrand, thanks for the helpful comments and code. This is what I needed and facilitates my index selection process x100 (however, I couldn't find in INDEX_INSTRUMENTS.xlsx all the variables that I was looking for). But that's ok, at least I know I cannot access such info.
0 -
I have an additional question regarding the Search API, and the use between filter and query.
If I use filter instead of query to find the indexes within the USA,
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 will 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 indices.
If I use both query and filter,
query = “ESG”,
filter = "RCSIndexCountryGroupLeaf eq 'United States' and RCSAssetCategoryLeaf xeq 'Equity Index'",The search returns nothing.
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")0 -
`INDEX_INSTRUMENTS.xlsx` is outputted by the code from the object `fieldsResponse` itself created via the search API.
0 -
Hi @ricardo.henriquez , Have you tried different SearchViews ?
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛