Skip to content

[0.2.59] How to fetch all holdings of an index fund #2490

Answered by jcmiii
lucy2329 asked this question in Yahoo's data
Discussion options

You must be logged in to vote

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 ?

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@lucy2329
Comment options

@jcmiii
Comment options

@ValueRaider
Comment options

@lucy2329
Comment options

@jcmiii
Comment options

Answer selected by lucy2329
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2484 on May 11, 2025 20:20.