Python or ordinary SQL
Query it locally
Hugging Face can load the reconciled event table directly:
from datasets import load_dataset events = load_dataset( "austin-starks/congressional-stock-trades", "political_trade_events", split="train", ) pelosi = events.filter( lambda row: row["filerLast"].lower() == "pelosi" )
The npm package has two paths. Use download --sqlite when you want the ready-made audited snapshot as a local database without API keys or extraction infrastructure. Use sync when you want to build and maintain SQLite from the official filings yourself:
# Fast path: audited public data as SQLite npx congressional-disclosures@latest download --sqlite # Ownership path: extract the official filings into SQLite npx congressional-disclosures@latest doctor npx congressional-disclosures@latest sync \ --db ./congress.db \ --since 2024 \ --accept-senate-terms npx congressional-disclosures@latest audit --db ./congress.db
The first command creates ./congressional-stock-trades/congressional-disclosures.sqlite. This query finds the five tickers that appear most often in Pelosi's currently active disclosed events:
SELECT ticker, COUNT(*) AS disclosed_events FROM political_trade_events WHERE lower(filer_last) = 'pelosi' AND superseded_at IS NULL AND ticker IS NOT NULL GROUP BY ticker ORDER BY disclosed_events DESC, ticker LIMIT 5;
| Ticker | Disclosed events |
|---|---|
| AAPL | 34 |
| NVDA | 15 |
| V | 14 |
| AMZN | 13 |
| AB | 9 |
These counts describe disclosure events in the current snapshot. They are not share counts, dollar totals, or investment returns.
The package's model and OCR providers can cost money when you build from the source filings. Downloading the already-published Hugging Face dataset is free.
Skip the plumbing
NexusTrade uses the same data as a research and portfolio system
The download is for people who want the rows. NexusTrade uses the same audited political lake to answer questions, screen securities, generate portfolio variants, backtest the rules, optimize them, and deploy the version you choose.
That means you can move from “which politicians were consistently strong?” to several Pelosi-inspired portfolios without writing the ingestion, market-price joins, or portfolio engine yourself.
NexusTrade is the layer for turning it into repeatable research and a portfolio you can test.
Inspect the machinery
Rebuild it from official sources
The public congressional-disclosures repository owns House and Senate discovery, document downloads, PDF decryption, scan detection, OCR, independent extraction reads, disagreement reconciliation, ticker resolution, amendments, resumable receipts, and integrity checks.
The CLI gives an individual researcher working defaults. The TypeScript library exposes the same pieces as replaceable boundaries for an application that already has its own model transport, OCR provider, cache, scheduler, or object store.
The public dataset is a mirror of the manifest-selected production lake, not a second extraction. Each successful refresh publishes internally, runs the integrity audit, and then updates Hugging Face. That keeps the free download and the data used by NexusTrade on the same audited rows.
Use restriction
Congressional financial disclosures are public records, but 5 U.S.C. 13107(c) restricts some uses. Read the dataset's data-use notice before redistributing or commercializing the records. The extraction software is separately MIT-licensed.
Download the verified public snapshot for free. When you want the research, testing, and deployment layer, open NexusTrade.
Build in NexusTrade Download the dataset
No comments yet.