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

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @BlackBird

    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.df

    The output is:

    1674632943582.png

    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:

    1674632759944.png

    I am using the Refinitiv Data Library for Python.

Answers