How to get historical holdings and allocation data for funds?

How to get monthly or quarterly changes in a fund holdings, sector and country allocations? With the below code I'm only able to get the recent holdings and not the historical holdings.


Python

column_fields = [
    "TR.FundHoldingRIC",
    "TR.FundHoldingName",
    "TR.FundPercentageOfFundAssets",
]
refinitiv_data, err = ek.get_data(["SPY"], column_fields, date_paremters)
refinitiv_data


How to get the same historical weights for the below allocations?

Asset allocation -> ["TR.FundAssetAllocation", "TR.FundAllocationName"]

Country allocation -> ["TR.FundCountryAllocation", "TR.FundAllocationName"]

Sector allocation -> ["TR.FundIndustrySectorAllocation", "TR.FundAllocationName"]

Best Answer

  • bob.lee
    Answer ✓

    Hi @BlackBird, I do not think the Eikon data API for Lipper (i.e. field name starts with "TR.Fund") can provide historical data currently. Because I do not see date parameters for these fields from Data Item Browser.

    I know the RDP Funds API can can provide that.

    However, if you only interested in ETFs, I am aware the constituent data is available from the Refinitiv's exchange data (not from Lipper I believe). Below is a sample code you can try. The sample is getting the data as of the month-end date 2 months ago. You can put in the exact date if you want, and I think they got daily data for most of ETFs. I am not sure if you can specify a date range. Also, I do not think the "allocations" data is available from Exchange data set, as allocations is likely only available from Lipper database.


    df, err = ek.get_data(
        instruments = ['SPY'],
        fields = [
            'TR.ETPConstituentRIC',
            'TR.ETPConstituentName',
            'TR.ETPConstituentWeightPercent',
            'TR.ETPConstituentWeightPercent.Date'
        ],
        parameters = {'SDate': '-2M'}
    )
    df

Answers

  • Hi, regarding what was written above "I know the RDP Funds API can can provide that." could you please let me know how this could be done? I.e. reproduce the code you provided above with an SDate of -2M but for a non-ETF product, such as the following ID: LP40065886, and using the RDP Funds API? Many thanks in advance

  • Below is the REST GET query to get the holdings latest data for your sample fund:

    https://api.refinitiv.com/data/funds/v1/assets?symbols=LP40065886&properties=holdings

    You can add the start and end dates to get historical data like:


    https://api.refinitiv.com/data/funds/v1/assets?symbols=LP40065886&properties=holdings[start:2024-03-31;end:2024-07-31]

    ** The queries above did escape the special characters for URL, you need to escape these characters such as ";", "[" and "]", etc, if you want to try in API Playground.

    Notes, the full holdings data is very large, if you try to get historical data, it may be better to do multiple queries for smaller chuck of periods.

  • Thanks
    @bob.lee , that's very helpful, I'll test it and come back in case I need more help.
  • Actually
    @bob.lee could you please point me to further documentation on how to use the REST GET query above in the context of the RDP? I've been using the Eikon API for some time but am just starting to get familiar with the RDP, and am not sure how to test the above query (in Python). Thanks a lot in advance
  • Hi @AAMZ , Firstly, I need to clarify, the Lipper Funds API is separate from the Eikon/Workspace API. It is part of the RDP API platform. Do you have the access to the RDP Funds API? If you already have, then you can use the API Playground to check the samples and some documentations there:

    API Playground (refinitiv.com)

    Check with your account manager serving you, he/she should offer the on-boarding process to guide you to use the API.

  • Thanks
    @bob.lee , I'll indeed check with the account manager. Thanks again for your help.