Polymarket backtesting

Backtest a Polymarket strategy on 1-second L2 order books

Describe a crypto up/down strategy in plain English and replay it over more than 118,000 resolved Polymarket markets — with fills modeled against the historical bid/ask ladder, partial fills, and slippage, not an assumed mid price.

Backtest AI parses the strategy, replays it, and reads the result back in plain English.

What a run returns

From prompt to report in about a minute

Backtest AI parses the strategy, replays it over resolved markets at every tick of the historical book, and hands back numbers, a trade log, and a plain-English analysis.

Illustrative run — your numbers depend on the strategy and the market sample. Every run is saved to your workspace, with the trade log and full report exportable to CSV or JSON.

Workflow

How Polymarket backtesting works

01 · Describe

Write your strategy in plain English

“Buy DOWN on BTC 15m below 0.40, take profit at 0.55, stop loss at 0.30” parses into the same rules a coded strategy would carry: market, side, entry condition, position sizing, exits, and the window to scan.

02 · Replay

Replay it over resolved markets

The engine scans matching settled markets — BTC, ETH, SOL, BNB, DOGE, HYPE, XRP, ZEC at 5m, 15m, and 4h — and walks the historical book at every tick. Outcomes are known, so the run is scored honestly.

03 · Read the report

Numbers, trade log, and an AI readback

Net P&L, win rate, profit factor, drawdown, an equity curve, and why each exit fired — then Backtest AI explains what worked and what to change next.

No Python script, no CSV wrangling, no strategy engine to wire up. If you prefer to keep strategy logic in code, the same 1-second archive is available through the REST API and the official Python SDK; backtesting against Polymarket order book data is one query away.

Realism

Fill simulation instead of mid prices

A backtest that fills at the midpoint assumes you capture half the spread on every entry and exit. On Polymarket crypto Up/Down markets, where liquidity concentrates around a few price levels and the book thins in the final minute before resolution, that assumption flatters most strategies.

The replay engine walks the historical 1-second L2 ladder at each tick instead. It reads the size available at each price level, models partial fills when a level runs out, applies slippage when a larger order has to cross the book, and logs why each exit fired — take profit, stop loss, window end, or a condition that never filled.

The difference between a results screen and a strategy that survives live trading is exactly this depth. For the mechanics of reading full bid/ask ladders, see the historical order book guide.

Output

A report, a trade log, and an AI readback

Every run — like the panel above — returns net P&L, win rate, profit factor, and max drawdown, an equity curve, the reasons each trade exited, and which fills came from the book rather than an assumption. Then Backtest AI reads the run back in plain English with a Summary, Key Observations, and an Actionable Takeaway — so a losing strategy tells you why it lost, not just that it did.

Runs are saved to your workspace, and you can export the trade log to CSV or the full report to JSON. Reopening a saved run resumes the same strategy conversation, which turns backtesting from a one-off check into an iterative loop.

Why PolyOrderbooks

The difference is the archive it replays on

The archive your API key already queries

Backtest AI replays on the same 1-second L2 archive the REST API and Python SDK serve. There is no second vendor's dataset to trust — what you backtest is what you trade against.

Fills walk the real book, not the mid

The engine crosses historical bid/ask ladders at each tick, models partial fills when a level runs dry, applies slippage when size crosses the book, and logs why every exit fired.

AI reads every run back

Beyond the numbers: a Summary, Key Observations, and an Actionable Takeaway on each run, with the equity curve, trade log, and CSV/JSON export saved to your workspace.

Priced as an add-on, not a second product

+$19/mo on any data window or a standalone $29/mo plan — 500 backtests a month either way. Starter stays free with a free AI backtest and free strategy backtests to try first.

Under the hood

The archive behind the backtest

A backtest is only as good as the data it replays on. The archive behind Backtest AI is captured in one aligned pipeline: prices, metrics, and full L2 order books recorded every second for Polymarket crypto up/down and related markets.

118,251resolved markets
143.5ML2 order book snapshots
8coins tracked
1sresolution on every plan

The same archive powers the API and is free to inspect before you commit to a workflow: the Polymarket crypto historical data guide covers coverage, the historical data overview explains the full pipeline, a free BTC 5-minute order book sample lets you see raw ladders in seconds, and the underlying dataset is citable with DOI 10.5281/zenodo.22084114.

Plans

Who can use it

You can read the methodology behind replay and fill simulation in the blog post on historical Polymarket order book data backtesting. If the alternative to a continuously refreshed archive is a one-off recorded replay, our comparison guides cover the trade-off.

FAQ

What exactly does a Polymarket backtest replay on?

Backtest AI replays your strategy over resolved Polymarket crypto up/down markets from the PolyOrderbooks archive — more than 118,000 of them across BTC, ETH, SOL, BNB, DOGE, HYPE, XRP, and ZEC at 5-minute, 15-minute, and 4-hour windows. Only markets that have already resolved are used, so every run is judged against what actually happened.

How does Polymarket backtesting handle fills?

The engine walks the historical 1-second L2 bid/ask ladder at each tick instead of filling at a midpoint. Entries and exits respect available size at each price level, model partial fills, and apply slippage when a larger size has to cross the book. Exit reasons are tracked too — take profit, stop loss, window end, or no fill.

Do I need to write Python to backtest on Polymarket?

No. Backtest AI takes a plain-English description like "Buy DOWN on BTC 15m below 0.40, take profit at 0.55, stop loss at 0.30" and turns it into executable rules. If you prefer code, the same 1-second archive is available through the REST API and the official Python SDK with 1s resolution on every plan.

Which plans include backtesting?

Backtest AI is available as a +$19/mo add-on on any paid data window, or as a standalone $29/mo plan with unlimited strategy backtests, ~500 AI backtests/month, 30-day market data for AI, and no REST API data access. Starter stays free — 1-second L2 order books, prices, and metrics with 3 days of history, plus 1 free AI backtest and 3 free strategy backtests — which is enough to try a strategy before upgrading.

Where does the backtest data come from?

The same 1-second L2 archive your API key queries: prices, metrics, and full order book ladders are captured in one aligned pipeline. The underlying data is citable with DOI 10.5281/zenodo.22084114, mirrored on Kaggle and Hugging Face, and free to inspect via the BTC 5-minute CSV/JSON sample.