How can I get ETF constituent changes? (USMV.K, QQQ.OQ, SPY.P,etc)
The following posting/code works for index but not ETFs.
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
How can I get ETF constituent changes? (USMV.K, QQQ.OQ, SPY.P,etc)
The following posting/code works for index but not ETFs.
Hello @newuser
Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.
Thanks,
AHS
Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,
AHS
Hi @newuser
I could not find any fields carrying constituent changes for ETF.
However, you can use this sample code to retrieve the holding on "that day" and compare it in your Python code to find out what has been changed.
cols1 = ['TR.ETPConstituentRIC(SDate=2020-02-04)', 'TR.ETPConstituentName(SDate=2020-02-04)', 'TR.ETPConstituentShares(SDate=2020-02-04)', 'TR.ETPConstituentWeightPercent(SDate=2020-02-04)'] df1, e = ek.get_data('USMV.K',cols1) df1
cols2 = ['TR.ETPConstituentRIC(SDate=2020-01-01)', 'TR.ETPConstituentName(SDate=2020-01-01)', 'TR.ETPConstituentShares(SDate=2020-01-01)', 'TR.ETPConstituentWeightPercent(SDate=2020-01-01)'] df2, e = ek.get_data('USMV.K',cols2) df2
Then find the differences between df1 and df2 in your Python code.