Guide
Estimating slippage on Polymarket order books
Slippage is the difference between your expected price and your actual execution price. This guide covers what slippage is, how to estimate it from L2 data, and common slippage models.
What this guide covers
- Slippage = execution price - expected price (for buys)
- Linear model: slippage proportional to order size / available depth
- Square-root model: slippage proportional to sqrt(order size / depth)
- Slippage is essential for realistic backtest performance estimates
What slippage is
Slippage is the cost of walking through the order book. When you place a market buy order for 500 shares, you do not just pay the best ask. You buy from every level until your order is filled.
The difference between the best ask price and your average fill price is the slippage. If the best ask is 0.65 but your average fill price is 0.67, your slippage is 2 cents per share.
Slippage is not a fee charged by the exchange. It is a natural consequence of consuming available liquidity. Larger orders consume more levels and incur more slippage.
On Polymarket, where prices are on a 0-1 scale, slippage of 1 to 2 cents on a 500-share order in a liquid BTC market is typical.
Estimating slippage from L2 data
The most accurate slippage estimate comes from simulating your order against the actual L2 book. Walk through the levels from best to worst, accumulating size until you have filled your order.
For a buy order, start at the best ask and move up. For a sell order, start at the best bid and move down. The VWAP of your simulated fills is your estimated execution price.
This approach works because L2 data shows you exactly what was available at each level. It is the gold standard for slippage estimation in backtests.
The limitation is that the book changes between when you observe it and when your order arrives. In a fast-moving market, the book may shift.
Slippage models
The linear model estimates slippage as proportional to order size divided by available depth. Slippage = k * (order_size / depth), where k is a calibration constant.
The square-root model estimates slippage as proportional to the square root of order size divided by depth. This better captures the reality that deeper levels have less liquidity.
Both models require calibration. Use historical L2 data to fit k by regressing observed slippage against the size/depth ratio.
For quick estimates without simulation, the square-root model with k = 0.1 is a reasonable starting point for liquid BTC markets.
| Model | Formula | Best for | Limitation |
|---|---|---|---|
| Walk-through | Simulate fills against L2 | Backtesting, accuracy | Requires full L2 data |
| Linear | k * (size / depth) | Small orders | Underestimates for large orders |
| Square-root | k * sqrt(size / depth) | Medium-large orders | Requires calibration |
Using slippage in backtests
A backtest that ignores slippage will overestimate returns. If your strategy generates signals at the midpoint but executes by crossing the spread, the actual fill price is worse.
For each simulated trade, estimate slippage using the L2 snapshot at the time of the trade. Walk the book and compute the VWAP.
Report backtest results with and without slippage. The difference shows how much of your theoretical profit comes from assuming free execution.
Account for the time delay between signal and execution. Even a 1-second delay means the book has changed.
Code examples
import math
def linear_slippage(order_size, depth, k=0.05):
return k * (order_size / depth)
def sqrt_slippage(order_size, depth, k=0.1):
return k * math.sqrt(order_size / depth)
size, depth = 500, 2000
print(f"Linear: {linear_slippage(size, depth):.4f}")
print(f"Sqrt: {sqrt_slippage(size, depth):.4f}")Free tier
The Starter plan is free, includes order books, prices, and metrics at 1-second resolution, with 3 days of history, 60 requests/min, 1,000/day, 1 free AI backtest, and 3 strategy backtests. No credit card required.
Paid data windows from $19/mo extend history to 30–120 days at higher throughput. Backtest AI add-on is +$19/mo or standalone at $29/mo.
FAQ
How much slippage should I expect?
For a 500-share buy in a liquid BTC 5-minute market, expect 0.5 to 2 cents of slippage. Larger orders or thinner markets will see more.
Can slippage be negative?
In theory, yes, if the book moves in your favor between signal and execution. In practice, slippage is almost always positive (unfavorable).
How do I reduce slippage?
Use limit orders instead of market orders. Split large orders into smaller pieces over time. Trade in liquid markets (BTC 5-minute) where depth is deepest.
Does slippage affect backtest results?
Significantly. A strategy that appears profitable on midpoint data may be unprofitable after accounting for spread and slippage. Always include execution cost modeling.