Congress passed the STOCK Act to stop insider trading. They still beat the market by 12%. This tool shows you exactly how — and lets you follow along.
This project maps the full value chain from government contracts to publicly traded companies, cross-references SEC-disclosed insider trades by members of Congress, and flags when committee assignments overlap with trading activity. When the system spots a match, you get a WhatsApp alert.
Built for investors who want to follow the smart money, journalists investigating conflicts of interest, and watchdogs holding Congress accountable.
- Contract-to-ticker mapping -- every federal government contract analyzed, matched to publicly traded companies in the supply chain
- Congressional trade scoring -- flags members whose stock trades cluster in industries their committees oversee
- Insider trade cross-referencing -- SEC disclosures layered against committee jurisdiction for conflict-of-interest detection
- WhatsApp alerts -- get notified when the system spots a high-signal opportunity
- Full audit trail -- every data point sourced and reproducible
git clone https://github.com/joelcedric2/congress-stock-trades-blueprint.git
cd congress-stock-trades-blueprint
pip install -r requirements.txt
jupyter notebookOpen any notebook in the analysis/ folder to start exploring.
| Notebook | What It Does |
|---|---|
congress-stock-trades-committees-merge |
Merges congressional stock trades with subcommittee assignments using string-matching algorithms |
Stock-Watchers-Categories |
Combines Senate and House Stock Watcher data with stock descriptions from YFinance |
Congress-Committee-Assignments |
Extracts each member's committee assignments from nested JSON |
YFinance-scratchpad |
Explores available financial data per ticker via YFinance |
Stock-Watchers-Scratchpad |
Explores the raw Stock Watcher datasets |
string-algorithms-scratchpad |
Benchmarks string-matching algorithms for entity resolution |
| Source | URL |
|---|---|
| Senate Stock Watcher API | https://senatestockwatcher.com/api |
| House Stock Watcher API | https://housestockwatcher.com/api |
| Yahoo Finance (YFinance) | https://pypi.org/project/yfinance/ |
| Committee Assignments | https://theunitedstates.io/congress-legislators/committee-membership-current.json |
| Committee Descriptions | Hand-curated from official .gov committee sites |
| GICS Industry Classification | https://www.msci.com/our-solutions/indexes/gics |
- Ingest -- pull trade disclosures from Senate and House Stock Watcher APIs
- Enrich -- attach sector, industry, and company metadata via YFinance and GICS
- Match -- resolve congressional committee assignments and map jurisdictions to GICS sectors
- Score -- rank members by overlap between trading activity and committee jurisdiction
- Alert -- surface high-signal trades via WhatsApp notifications
- Investment research -- identify sectors getting unusual congressional attention before earnings moves
- Investigative journalism -- find potential conflicts of interest with reproducible evidence
- Policy analysis -- quantify how committee assignments correlate with personal financial activity
- Civic transparency -- hold elected officials accountable for trading patterns
Pull requests welcome. If you have access to additional data sources (lobbying disclosures, campaign finance, etc.), open an issue.
All rights reserved by the author until a license is specified.