Polymarket Slippage Backtesting: Simulate Realistic Fills
Backtest Polymarket strategies with slippage by consuming historical order book depth instead of assuming midpoint or last-price fills.
Polymarket slippage backtesting measures what your strategy would have paid after crossing the spread and consuming available depth. This is critical because prediction market order books can be thin.
Bad Fill Assumptions
- Buying at midpoint
- Selling at midpoint
- Ignoring partial fills
- Assuming the same liquidity exists for every order size
Better Slippage Model
- For a buy, walk the ask ladder until the order size is filled.
- For a sell, walk the bid ladder until the order size is filled.
- Record average fill price and unfilled quantity.
- Repeat for entry, exit, and stop logic.
Metrics to Track
| Metric | Purpose |
|---|---|
| Expected vs filled price | Measures execution drag |
| Unfilled size | Shows capacity limits |
| Spread paid | Separates spread cost from depth cost |
| Slippage by market age | Finds fragile time windows |