For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 1

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!

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikondata
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
1.4k 6 2 2

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?


1624609833520.png (94.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thanks a lot
Click below to post an Idea Post Idea