Is it possible to download historical ETF holdings

I would like to be able to download historical holdings for the etf ticker IWV as of a few specific dates (e.g. 12/31/2020, 12/31/2019). Ideally I'd like to amend the following code to achieve this:


hldgs, err = ek.get_data(instruments = 'IWV',
fields =['TR.FdSecurityOwnedRIC;TR.FdInvestorFilingDate;TR.FundPercentageOfFundAssets(EndNum=5000)'])


Can you advise if and how I can adjust this code to get this data as of one of the dates above?

Thanks!

Best Answer

  • [Deleted User]
    [Deleted User] Newcomer
    Answer ✓

    Hi @ajalden ,


    Is this in Python? If so, I found that the below works well:


    hldgs, err = ek.get_data(instruments='IWV',
                             fields=["TR.FdSecurityOwnedRIC",
                                     "TR.FdInvestorFilingDate",
                                     "TR.FundPercentageOfFundAssets(EndNum=5000)"],
                             parameters={'SDate': '2019-12-31',
                                         'EDate': '2020-12-31'})


    Otherwise, using the Data Item Browzer (DIB):

    1624609833520.png


    I found the following worked well (using 'FdInvestorFilingDate' as an e.g.) :


    hldgs, err = ek.get_data(instruments='IWV',
                             fields=["TR.FdInvestorFilingDate(SDate=0,EDate=-5,Frq=FY)",
                                     "TR.FdInvestorFilingDate(SDate=0,EDate=-5,Frq=FY).calcdate",
                                     "TR.FdInvestorFilingDate(SDate=0,EDate=-5,Frq=FY).date",
                                     "TR.FdInvestorFilingDate(SDate=0,EDate=-5,Frq=FY).effectiveTo",
                                     "TR.FdInvestorFilingDate(SDate=0,EDate=-5,Frq=FY).instrument",
                                     "TR.FdInvestorFilingDate(SDate=0,EDate=-5,Frq=FY).instrumentid",
                                     "TR.FdInvestorFilingDate(SDate=0,EDate=-5,Frq=FY).SecurityOwnedRIC"])


    Does this answer your question?

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.