Polymarket Backtesting
Backtest Polymarket strategies with historical order book data, realistic fills, slippage, spread costs, and resolved market outcomes.
Polymarket backtesting requires replaying the data a strategy would have seen at the time. For prediction markets, that means historical order book snapshots, bid/ask spread, available depth, and final resolution outcomes.
Why Price-Only Backtests Are Weak
Midpoint or last-price backtests can validate directional logic, but they cannot prove that a trade was executable. Realistic Polymarket backtesting should simulate entries and exits against historical bid and ask levels.
Backtesting Inputs
- Resolved markets with known outcomes.
- Timestamped order book snapshots.
- Full bid and ask depth for UP and DOWN tokens.
- Reference price context for crypto Up/Down markets.
- Risk metrics such as PnL, drawdown, win rate, and fill quality.
Workflow
- Choose a market type and date range.
- Fetch historical snapshots with order book depth.
- Replay snapshots chronologically.
- Run strategy rules against each snapshot.
- Simulate fills using actual depth and score against resolution.