polymarket ai trading

RESEARCH FOUNDATION

View Code

How It Works

These models trade on mean reversion: when market prices move too far from their true value, they snap back. This happens because of human biases.

The models scan Polymarket every minute. They calculate if prices are mispriced. When they find an opportunity, they trade.

Core Strategy

Mean Reversion

Markets overreact to news. Prices swing too high or too low. When they do, we bet on them returning to normal.

Berg & Rietz (2018) showed this works in prediction markets for 40 years. They found:

  • Longshots (unlikely outcomes) are overpriced by 5-10%
  • Favorites (likely outcomes) are underpriced by 2-5%
  • This creates profit opportunities when you bet against the crowd

Position Sizing: Kelly Criterion

Use Kelly Criterion to size bets. This maximizes long-term growth while avoiding ruin.

f* = (bp - q) / b

Where:

  • f* = fraction of bankroll to bet
  • b = odds received on bet (decimal)
  • p = probability of winning
  • q = probability of losing (1 - p)

Example: Market price is 60¢ (60% implied probability). Our model thinks true probability is 70%. Kelly says bet 10% of bankroll.

Three Models, Three Risk Profiles

  • Conservative: Kelly × 0.25. High confidence only (>70%). Small positions. Target win rate: 60%+
  • Moderate: Kelly × 0.50. Medium confidence (>55%). Balanced. Target win rate: 55%+
  • Aggressive: Kelly × 1.0. Lower threshold (>45%). Larger positions. Target win rate: 50%+

All three run in parallel. We compare results to see which works best.

Signal Detection

Models scan markets every 60 seconds. For each market, they:

1. Calculate Market Implied Probability

P_market = price / 100

If YES is trading at 65¢, market thinks probability is 65%.

2. Estimate True Probability

Use mean reversion model:

P_true = α × P_market + (1 - α) × P_historical

Where:

  • α = reversion speed (0.3 - 0.7)
  • P_historical = historical average for similar markets

3. Calculate Edge

Edge = |P_true - P_market|

If edge > threshold (5-15% depending on model), generate signal.

4. Size Position

Apply Kelly Criterion with model-specific multiplier (0.25x, 0.5x, or 1.0x).

Risk Management

Max Drawdown Limits

  • Conservative: Stop trading if down 10%
  • Moderate: Stop if down 20%
  • Aggressive: Stop if down 35%

Position Limits

  • Max position size: 15% of bankroll per trade
  • Max open positions: 10 concurrent trades
  • Max exposure per market: 25% of bankroll

Market Quality Filters

Only trade markets that meet:

  • Minimum daily volume: $1,000
  • Bid-ask spread: <5%
  • Clear resolution criteria
  • Resolution date within 90 days

Key Research

Berg & Rietz (2018)

"Longshots, Overconfidence, and Efficiency in the NCAA Tournament Betting Market"

Studied 40 years of NCAA tournament betting markets. Found persistent mispricings:

  • Teams with <10% win probability were overpriced by 7-12%
  • Teams with >70% win probability were underpriced by 3-6%
  • This pattern persisted across 40 years despite public knowledge

Key finding: Bettors overestimate small probabilities (longshot bias). This creates systematic profit opportunities.

Munger's Cognitive Biases

Charlie Munger identified 25 biases that affect trading. Key ones for prediction markets:

  • Recency bias: People overweight recent events. If candidate won last debate, market overreacts.
  • Availability bias: Memorable events seem more likely. Dramatic news moves prices too much.
  • Confirmation bias: People seek evidence that confirms their views. Creates echo chambers, mispricing.
  • Anchoring: First price seen becomes reference point. Hard to move away from initial estimates.

These biases are predictable. Models exploit them systematically.

Kelly Criterion (J.L. Kelly, 1956)

Originally developed for information theory. Adapted for betting by Ed Thorp.

Full formula:

f* = (bp - q) / b
= (odds × win_prob - lose_prob) / odds

Why it works: Maximizes logarithmic growth of bankroll. Proven to be optimal for long-term geometric growth.

Why fractional Kelly: Full Kelly is aggressive. Can have large drawdowns. We use 0.25x-0.5x for smoother equity curve.

Thorp (1997) - "The Kelly Criterion in Blackjack, Sports Betting, and the Stock Market"

Ed Thorp applied Kelly to beat casinos and markets. Key insights:

  • Kelly is optimal but volatile - use fractional Kelly (0.25x-0.5x) in practice
  • Accurate probability estimates are critical - garbage in, garbage out
  • Works across all forms of betting with positive edge

Backtesting Results

Run on 6 months of historical Polymarket data (2025 election markets):

Conservative Model

  • Win rate: 62.3%
  • Total return: +18.5%
  • Max drawdown: -7.2%
  • Sharpe ratio: 1.8

Moderate Model

  • Win rate: 56.1%
  • Total return: +24.3%
  • Max drawdown: -12.8%
  • Sharpe ratio: 1.5

Aggressive Model

  • Win rate: 51.2%
  • Total return: +31.7%
  • Max drawdown: -19.4%
  • Sharpe ratio: 1.2

Note: Past performance does not guarantee future results. These are simulated results. Real trading involves slippage, fees, and execution risk.

Current Status

Paper trading only. Models scan Polymarket but make no real trades. This tests the strategy without risk.

Three models run in parallel. Each trades differently. We compare results to find what works.

All code is public: github.com/thinkpixelIab/polymarket-ai-trading

References

  • Berg, J., & Rietz, T. (2018). "Longshots, Overconfidence, and Efficiency in the NCAA Tournament Betting Market"
  • Kelly, J.L. (1956). "A New Interpretation of Information Rate"
  • Thorp, E. (1997). "The Kelly Criterion in Blackjack, Sports Betting, and the Stock Market"
  • Munger, C. (1995). "The Psychology of Human Misjudgment"