
Python Script to Monitor When Billionaires Change Their Stock Portfolios
Every quarter, hedge funds and institutional investors managing over $100M are required to disclose their stock holdings to the SEC via 13F filings. This is public data — and it reveals exactly what Warren Buffett, Ray Dalio, Michael Burry, and thousands of other big players are buying and selling. In this tutorial, we'll build a Python script that monitors these filings and detects portfolio changes — new positions, exits, and significant increases or decreases. How 13F Filings Work The SEC requires institutional investment managers to file Form 13F quarterly. Each filing lists every equity position the fund holds, including the number of shares and market value. By comparing consecutive filings, you can see exactly what changed. The catch? The SEC's EDGAR system is notoriously difficult to work with — inconsistent formats, XML parsing, rate limiting, and CIK number lookups. We'll skip all that pain by using an API that handles it for us. Setup We'll use the SEC EDGAR Financial Data A
Continue reading on Dev.to Python
Opens in a new tab


