I built https://nancypelosistocktracker.org/ — a site that automatically tracks and visualizes U.S. Congresswoman Nancy Pelosi’s stock transactions using official House disclosure filings.
*Why I built it* I was curious about the recurring headlines claiming “Pelosi’s portfolio outperforms the market.” The raw data is public but buried inside PDFs/TXT bundles on the House Clerk’s website. I wanted a clean, automated way to parse the disclosures, highlight trades, and show positions over time.
*What it does* - Pulls new Periodic Transaction Reports (PTRs) from the House disclosure portal on a schedule - Parses TXT/XML files, normalizes tickers and amounts, and links the original PDFs - Displays recent trades, historical totals, and sector/position breakdowns - Exposes a simple JSON endpoint so others can programmatically reuse the data
*Tech stack* - Scraper: Python + Requests + lxml, scheduled via a small cron container on a VPS - Data store: PostgreSQL for structured trades, Redis for cache - Backend/API: FastAPI - Frontend: Next.js + TanStack Table for fast filtering & sorting - Deployment: Docker Compose on a cheap cloud VM + Cloudflare for caching
*Challenges* - Disclosures are inconsistent (typos, naming differences). I built ticker-mapping heuristics and a manual override table. - The House site occasionally changes file structures, so I added alerting when parsing fails. - Some positions are only visible in annual filings; I’m still refining how to estimate “current holdings.”
*What’s next* - Add charts for performance vs SPY/QQQ - Expand to more politicians (or let users pick who to track) - Consider open-sourcing the parser if people find it useful
*Feedback I’d love* - Parser accuracy: any suggestions on better entity/ticker matching? - Front-end usability: which tables or charts are missing? - Data licensing: anyone done something similar and learned the hard lessons?
Site: https://nancypelosistocktracker.org/ (GitHub repo is private for now; happy to open specific parts if there’s demand.)
Thanks for reading — I’ll be around to answer questions!