Market Edge#
An autonomous prediction market trading agent that scans Polymarket for mispriced markets, estimates probabilities using a multi-pass Claude pipeline, sizes positions with Kelly criterion, and executes trades against a local portfolio.
Status: Research / paper trading — no confirmed out-of-sample edge yet.
Architecture#
The agent runs three concurrent loops:
- Research (async) — web search, news gathering, price history
- Strategy (daily) — scan markets, screen with Haiku, build candidate list
- Tactical (15 min) — full analysis with Sonnet, Kelly sizing, trade execution
4-pass LLM probability pipeline#
Each market estimate goes through four passes:
- Base Rate — historical/domain prior (Sonnet), no market price visible
- Bayesian Update — incorporates a web-searched research dossier
- Adversarial — stress-tests the estimate against counterarguments
- Calibration — optional Brier score correction from historical performance
Haiku handles cheap screening; Sonnet handles full analysis.
Data#
Two SQLite databases: a live portfolio DB tracking trades, positions, and predictions, and a backtest DB with 90K+ resolved Polymarket markets for simulation and hypothesis testing.
Stack#
Python, Claude (Haiku + Sonnet), Polymarket Gamma API / CLOB, Kelly criterion, SQLite, FastAPI dashboard.