Backtesting

Replay a strategy on historical data, priced like the real market, before any money is at stake.

Video demo0:288 stepsGuided mode available

0:00 / 0:28

How a backtest works

The engine replays the strategy on historical data with the same code that runs live bots. It charges the venue's fees, funding on perpetuals and slippage from historical order books, and it checks stops and targets inside each candle rather than only at its close.

A backtest runs automatically after each creation or edit. You can also launch one yourself, from the chat or the strategy page, on the window you choose. A typical run takes a few minutes and reports its progress as it goes.

Step by step

  1. 01
    Open the backtest settings

    Run Backtest on the strategy page, or ask the agent in the chat.

  2. 02
    Choose the window

    Presets from three months to five years on perpetuals, or your own dates.

  3. 03
    Capital and fees

    Advanced options set the starting capital, and the fees if you want other values than the venue's.

  4. 04
    Launch it

    The backtest starts on the engine; you can keep working meanwhile.

  5. 05
    Follow the progress

    The engine replays the market bar by bar and streams its progress.

  6. 06
    Read the results

    APR, P&L, equity, period and Runbot Score, with the equity curve.

  7. 07
    Every metric

    Win rate, Sharpe, drawdown, profit factor, time in position and more.

Windows

A Basic backtest covers a window up to the limit your app sets. A Pro backtest goes further, up to the engine's maximum for the market:

5 yearson perpetual futures
365 dayson Polymarket Up/Down
180 dayson pari-mutuel contests

Reading the results

MetricMeaning
APRAnnualized, compounded return. Under 30 days of data, the raw return of the period is shown instead.
PnLProfit or loss in dollars over the window.
Max drawdownThe largest fall from a peak of the equity curve.
Win rateThe share of trades closed in profit.
Sharpe, profit factor, risk/rewardHow much return the strategy earns for the risk it takes.
Trades and time in positionHow often it trades, and how long it stays exposed.
Runbot ScoreA 0-100 summary of all of the above. See Runbot Score.

The strategy page also shows the equity curve against buy-and-hold, the monthly performance and the full trade list, which you can export.