← All Projects
Deployed

Prediction Market Bots

Automated trading on prediction markets using mathematical strategies, machine learning, and cross-platform arbitrage.

The Problem

Prediction markets like Kalshi and Polymarket are full of pricing inefficiencies — emotional premiums, mispriced spreads, and arbitrage windows where YES + NO contracts cost less than $1.00. Capturing these opportunities manually is impossible at speed and scale.

What I Built

A multi-bot system with different strategies: a Smart Bettor that uses ML scoring to find high-confidence directional bets, a market maker for two-sided spread capture, and a cross-platform arbitrage engine that detects price discrepancies between Kalshi and Polymarket. The ML model (LightGBM) was trained on 744K+ historical markets and retrains nightly.

ML Pipeline & 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
🔄Nightly Retrain3am PST cron · Validates new model vs current · Auto-deploy if AUC +1%
⚖️Arbitrage ScannerYES + NO < 99¢ detection · Cross-platform spread monitoring

Tools & Stack

PythonLightGBMKalshi APIPolymarket APISQLiteCron JobsJSONL Loggingdotenv

Strategies

  • Arbitrage Farming: Capturing 7–11¢ spreads during volatility
  • Sports Value Extraction: Exploiting emotional premiums on favorites
  • 15-Min Panic Fading: Absorbing panic-sell liquidity on BTC/ETH/SOL
  • TA-Based Scalping: RSI + MACD + VWAP confluence signals

Challenges & Lessons

Market making at small scale isn't profitable — the spread capture doesn't cover losses. The pivot to directional ML-scored bets was critical. I also learned the importance of observation mode: running the bot in "watch only" mode first, logging what it would have traded, then analyzing those decisions before enabling real execution. The nightly retrain pipeline with automatic validation-before-deploy prevents model regression.

← PreviousTrading Fleet