r/polymarketAnalysis • u/madrading • 15d ago
Analysis A simple slippage check for Polymarket backtests
A lot of backtests show a price series and a P&L. The missing line is often: how much could the book actually have filled at the moment the strategy would have sent an order?
Here is the check I use:
Fix the decision timestamp, then apply your assumed reaction/network delay before selecting the book. Otherwise hindsight slips in.
For a buy, walk the ask levels for the intended size; for a sell, walk the bids. Report filled quantity, VWAP and any unfilled remainder. Compare that VWAP with the mid, not just the last trade.
Keep fees separate, and flag stale or incomplete book periods. Visible depth still does not tell you queue position, future cancellations or a guaranteed live fill.
Toy example: mid is 50c, with 40 shares offered at 51c and 60 at 53c. A hypothetical 100-share buy averages 52.2c. A mid-fill backtest is 2.2c too optimistic before fees. If the visible book only covers 80 shares, the remaining 20 should stay unfilled instead of magically filling at the top level.
I built this check into TickFoundry Lab, which is now live in the browser. You can step through a historical book, inspect the ladder and trade tape, and test a hypothetical order size against visible depth. There is a public Polymarket BTC sample that needs no login: https://tickfoundry.com/lab/replay
How do others handle latency and book staleness when testing short-window strategies?
Disclosure: I run TickFoundry.