Skip to content

Repository files navigation

Congress Stock Trades Blueprint

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.

Python Jupyter


What You Get

  • 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

Quick Start

git clone https://github.com/joelcedric2/congress-stock-trades-blueprint.git
cd congress-stock-trades-blueprint
pip install -r requirements.txt
jupyter notebook

Open any notebook in the analysis/ folder to start exploring.

Analysis Notebooks

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

Data Sources

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

How It Works

  1. Ingest -- pull trade disclosures from Senate and House Stock Watcher APIs
  2. Enrich -- attach sector, industry, and company metadata via YFinance and GICS
  3. Match -- resolve congressional committee assignments and map jurisdictions to GICS sectors
  4. Score -- rank members by overlap between trading activity and committee jurisdiction
  5. Alert -- surface high-signal trades via WhatsApp notifications

Use Cases

  • 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

Contributing

Pull requests welcome. If you have access to additional data sources (lobbying disclosures, campaign finance, etc.), open an issue.

License

All rights reserved by the author until a license is specified.

About

Track government contracts, map insider trades to public companies, get WhatsApp alerts for investment opportunities.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages