politicians are required by law to disclose stock trades within 45 days. this app pulls those disclosures in real time, looks up each stock's sector, and cross-references against the politician's actual committee assignments via the congress.gov API. if someone on the Armed Services Committee is buying Raytheon, it shows up red.
  • Python 99.5%
  • Shell 0.5%
Go to file
ibotzhub 317dcee102 chore: rename spaced files, add LICENSE, tighten gitignore
- ai commentary.py -> ai_commentary.py (fixes import ai_commentary on Linux)
- build standalone.sh -> build_standalone.sh; bundle ai_commentary in PyInstaller
- readme.md -> README.md; repo link; ASCII punctuation
- MIT LICENSE; ignore .env for local API keys
2026-05-13 02:19:06 -07:00
.gitignore chore: rename spaced files, add LICENSE, tighten gitignore 2026-05-13 02:19:06 -07:00
ai_commentary.py chore: rename spaced files, add LICENSE, tighten gitignore 2026-05-13 02:19:06 -07:00
app.py Update greeting from 'Hello World' to 'Goodbye World' 2026-02-28 12:32:27 -08:00
build_standalone.sh chore: rename spaced files, add LICENSE, tighten gitignore 2026-05-13 02:19:06 -07:00
config.py Add configuration file for POLI-TICKER 2026-02-28 12:35:04 -08:00
data.py Implement committee pipeline and enhance data handling 2026-02-28 12:31:04 -08:00
LICENSE chore: rename spaced files, add LICENSE, tighten gitignore 2026-05-13 02:19:06 -07:00
main.py Add main.py as entry point for POLI-TICKER 2026-02-28 12:35:48 -08:00
README.md chore: rename spaced files, add LICENSE, tighten gitignore 2026-05-13 02:19:06 -07:00
requirements.txt Add dependencies for yfinance, PyQt6, and requests 2026-02-28 12:38:27 -08:00
run.sh Add run script to execute main.py 2026-02-28 12:39:10 -08:00

POLI-TICKER

https://github.com/ibotzhub/poli-ticker

they have to disclose their stock trades within 45 days. i made a desktop app that reads them and flags the ones where the politician sits on a committee that has direct jurisdiction over what they're buying.

armed services committee buying raytheon. banking committee buying jpmorgan. health subcommittee buying pfizer right before a vote. it's all in there. it's all public. most people just don't look.


what it actually does

pulls from house-stock-watcher and senate-stock-watcher (both free, no key), looks up each ticker's sector via yfinance, then cross-references against real committee assignments from the congress.gov API. the key is built in and works out of the box.

DIRECT OVERLAP - their committee has direct jurisdiction over that sector. this is the one.

ADJACENT - related enough to be interesting, not a clean match.

CLEAN - no connection found, or no API key is configured (unlikely - it's already built in).

every trade shows both when it happened and when it was disclosed so you can see the lag. they get 45 days. some of them use all of it. anything over 30 gets marked STALE.


install

git clone https://github.com/ibotzhub/poli-ticker
cd poli-ticker
pip install -r requirements.txt
python main.py
# or just
chmod +x run.sh && ./run.sh

native window. no browser, no server, no localhost.


committee overlap detection

works out of the box. the congress.gov API key is already in the code.

if you ever need a new one for some reason: api.congress.gov/sign-up - free, instant, just an email.

once you have it, the pipeline is:

  1. politician name → bioguide member ID via congress.gov member list
  2. member ID → committee and subcommittee assignments (cached 7 days)
  3. each trade checked against the committee-sector mapping
  4. worst severity across all committees wins - DIRECT beats ADJACENT

the mapping covers the obvious ones:

committee what gets flagged
armed services defense, aerospace
banking / financial services finance
health / labor healthcare
energy / natural resources energy, utilities
intelligence tech, defense
commerce / science tech, telecom

tabs

FEED - everything, newest first. filter by chamber, trade type, overlap level, or search by name/ticker/sector. right-click any row to pull up the stock on yahoo finance, jump to their profile, or open the original disclosure PDF.

POLITICIANS - sorted by flag count, most flagged at the top. click anyone to see their monthly breakdown, position history built from buy/sell counts, their committee assignments, and every trade they've filed.

FLAGS - just the conflicts. DIRECT OVERLAP first. this is the tab to open.

SETTINGS - congress.gov key override (built-in key works, override only if needed), AI key, cache management.


AI analysis

after a fetch, hit AI ANALYSIS on the FLAGS tab. it sends the flagged trades to claude or gpt and asks it to identify patterns - who's doing it the most, which sectors keep coming up, what stands out.

supports anthropic and openai. key lives in ~/.poli_ticker/settings.json, never goes anywhere except the provider you pick.


data

  • house-stock-watcher - free, no key
  • senate-stock-watcher - free, no key
  • yfinance - sector lookup, free, no key
  • congress.gov API - committee data, key hardcoded in config.py

cache: ~/.poli_ticker/cache.db logs: ~/.poli_ticker/debug.log

TTLs: trades = 1hr, sector = 1 day, committees = 7 days, member IDs = 7 days


files

main.py             entry point
app.py              the whole UI (PyQt6)
config.py           palette, committee map, constants
data.py             fetch, cache, enrichment, overlap detection
ai_commentary.py    AI pattern analysis
requirements.txt    yfinance, PyQt6, requests
build_standalone.sh PyInstaller (linux/mac)
run.sh              launcher

build

chmod +x build_standalone.sh && ./build_standalone.sh

binary in dist/POLI_TICKER. windows: swap colons for semicolons in the --add-data flags.


this is public information. all of it is filed under the STOCK Act and available to anyone who wants to look. i just made it easier to look.

not financial advice. not legal advice. not proof of anything. just patterns.

look at the flags tab.