[0.2.59] How to fetch all holdings of an index fund #2490
Answered
by
jcmiii
lucy2329
asked this question in
Yahoo's data
-
Hi there, I want to fetch all holdings of the SPY and am unable to find anything in the documentation regarding holdings of a particular index fund. Does any one know how I can reliably achieve this? |
Beta Was this translation helpful? Give feedback.
Answered by
jcmiii
May 10, 2025
Replies: 1 comment 6 replies
-
I believe you would need to assemble the constituents of SPY outside of yfinance. Once you did that, you could use yfinance to download price data for each. Maybe build a web scraper for a website like: https://en.wikipedia.org/wiki/List_of_S%26P_500_companies ? |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
lucy2329
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe you would need to assemble the constituents of SPY outside of yfinance. Once you did that, you could use yfinance to download price data for each. Maybe build a web scraper for a website like: https://en.wikipedia.org/wiki/List_of_S%26P_500_companies ?