Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 5

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-apirefinitiv-dataplatform-eikonworkspaceworkspace-data-apidata
icon clock
10 |1500

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

1 Answer

· Write an Answer
Upvotes
Accepted
5.8k 21 2 6

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 512.0 KiB each and 1.0 MiB total.

Thanks a lot

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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