How to retrieve the entire mutual fund universe trading in the US market?
With the below code I can only retrieve upto 10k mutual funds. I can use IssueLipperGlobalSchemeName filter but there are too many lipper schemes in this PDF and some of the lipper schemes are not exactly matching with the Python output (Eg: In the PDF one of the schemes is called "Equity Sector Information Technology " but in Python output its showing "Equity Sector Information Tech").
Is there any other filter that I can apply so that I can retrieve all the mutual funds (including all the share classes) trading in the US market without missing any of the funds? If this is not possible, how can I get all the lipper global scheme names using python code so that I can use that as a filter in a loop? I need all equity, bond and alternative mutual funds trading in the US market.
Python code
import refinitiv.dataplatform as rdp
rdp.open_desktop_session('<API key>')
df = rdp.search(
view = rdp.SearchViews.FundQuotes,
filter = """IssuerCountry eq 'USA' and ExchangeCode eq 'LIP' and AssetStateName eq 'Active'""",
select = """RIC,TickerSymbol,DocumentTitle,ExchangeCode,AssetStateName,CommonName,ExchangeName,FundType,
FundClassLipperID,FundClassCurrency,IssueLipperGlobalSchemeName,IssuerCountry,AssetType""",
top = 10_000
)
print(df)
Best Answer
-
Thanks for reaching out to us.
The output is limited to 10,000 entries. You may need to add more conditions in the filter.
For example, you can add the endswith(RIC,'x') condition in the filter. x represents 0 to 9.
Therefore, it requires 10 requests to get all entries. For example:
df = search.Definition(
view=search.Views.FUND_QUOTES,
select="RIC,TickerSymbol,DocumentTitle,ExchangeCode,AssetStateName,CommonName,ExchangeName,FundType,FundClassLipperID,FundClassCurrency,IssueLipperGlobalSchemeName,IssuerCountry,AssetType",
filter="IssuerCountry eq 'USA' and ExchangeCode eq 'LIP' and AssetStateName eq 'Active' and endswith(RIC,'0')",
top=10000
).get_data()
df.data.dfThe output is:
You can use other conditions.
Regarding the IssueLipperGlobalSchemeName, you can use navigators to get the list of all IssueLipperGlobalSchemeName values.
df = search.Definition(
view=search.Views.FUND_QUOTES,
select="RIC,TickerSymbol,DocumentTitle,ExchangeCode,AssetStateName,CommonName,ExchangeName,FundType,FundClassLipperID,FundClassCurrency,IssueLipperGlobalSchemeName,IssuerCountry,AssetType,",
filter="IssuerCountry eq 'USA' and ExchangeCode eq 'LIP' and AssetStateName eq 'Active'",
top=0,
navigators="IssueLipperGlobalSchemeName"
).get_data()
df.data.raw["Navigators"]['IssueLipperGlobalSchemeName']The output is:
I am using the Refinitiv Data Library for Python.
1
Answers
-
Hi @BlackBird,
I can only comment on getting such fund list using RDP Funds API. Your screening should use fund's status and registered for sale attributes rather than the fund classifications in the PDF you mentioned. Basically, I assume you want the funds meets the following criteria:
1. Active (i.e. funds are not liquidated nor merged).
2. Mutual funds only (not including hedge funds, insurance funds, pension funds, ETF, etc)
3. Registered for sale in USA.
Then the following RDP Funds API query will return the funds (share-class level) identifiers and it currently got 25,181 funds:
https://api.refinitiv.com/data/funds/v1/assets?screen={criteriaItems:[{"selectedItem":"n10016","compareValue":"25349","operation":"Equal","logicalOperator":"AND"},{"selectedItem":"n12328","compareValue":"381","operation":"Equal"},{"selectedItem":"n11011","compareValue":"1005","operation":"Equal"}]}&properties=codes
Basically the above REST request will get the results in JSON:
{
"assets": [
{
"id": "40000007",
......
],
"totalRecords": 25181,
"fromIndex": 0,
"toIndex": 9,
"pageNumber": 1
}You need to loop the request to get all the data as the data is too long to be included in a single result JSON.
I checked the returned funds and there are about 40 funds domiciled in USA but not registered for sale in US and also some funds registered for sale in USA but domiciled in Ireland. I am not sure if that is correct, but if you have doubts on the contents, you need raise that to the Lipper US data team to confirm.
0 -
Thanks. This reduced the universe from 38k to 28k.0
-
If I remove the criteria to include only Mutual Funds, i.e. including other types of funds such as Pension funds, ETFs, etc, Lipper got 33,392 funds (share-class level). I do not know where is the 38K reference count come from. Maybe it includes funds that are merged or liquidated?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 中文论坛