Prediction Market Bots
Bots that traded on the Kalshi and Polymarket prediction markets, using math-based strategies, machine learning and arbitrage between the two.
Retired · since October 18, 2026
The problem
Prediction markets like Kalshi and Polymarket are often mispriced: emotional premiums, spreads that are off, and moments when a YES and a NO contract together cost less than $1.00. These come and go too fast to trade by hand.
What I built
Several bots, each with its own strategy: a Smart Bettor that uses a machine-learning score to pick high-confidence directional bets, a market maker that quotes both sides to earn the spread, and an arbitrage bot that spots price gaps between Kalshi and Polymarket. The model (LightGBM) was trained on 744K+ past markets and retrained every night.
ML pipeline and bot architecture
- Market DataKalshi · Polymarket · ~450 markets/cycle
- ML ScorerLightGBM · 744K samples · 8 features · AUC 0.6
- Smart Bettor70%+ confidence filter · 1% position sizing
- ExecutionAPI orders · Trade logging
Tools and stack
Python · LightGBM · Kalshi API · Polymarket API · SQLite · Cron Jobs · JSONL Logging · dotenv
Strategies
- Arbitrage: taking 7–11¢ spreads when markets are volatile
- Sports value: betting against the emotional premium on favorites
- Fading panics: buying from panic sellers in 15-minute windows on BTC, ETH and SOL
- Scalping on technical analysis: trading when RSI, MACD and VWAP agree
Challenges and lessons
At small scale, market making wasn't profitable: the spread didn't cover the losses, so I switched to directional bets scored by the model. I also learned to run each bot in "watch only" mode first, logging what it would have traded, and to review those trades before letting it trade for real. And the nightly retrain deploys a new model only after it passes the test, so a worse model doesn't replace a better one.