Backtesting
Replay a strategy on historical data, priced like the real market, before any money is at stake.
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
- 01Open the backtest settings
Run Backtest on the strategy page, or ask the agent in the chat.
- 02Choose the window
Presets from three months to five years on perpetuals, or your own dates.
- 03Capital and fees
Advanced options set the starting capital, and the fees if you want other values than the venue's.
- 04Launch it
The backtest starts on the engine; you can keep working meanwhile.
- 05Follow the progress
The engine replays the market bar by bar and streams its progress.
- 06Read the results
APR, P&L, equity, period and Runbot Score, with the equity curve.
- 07Every 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:
Reading the results
| Metric | Meaning |
|---|---|
| APR | Annualized, compounded return. Under 30 days of data, the raw return of the period is shown instead. |
| PnL | Profit or loss in dollars over the window. |
| Max drawdown | The largest fall from a peak of the equity curve. |
| Win rate | The share of trades closed in profit. |
| Sharpe, profit factor, risk/reward | How much return the strategy earns for the risk it takes. |
| Trades and time in position | How often it trades, and how long it stays exposed. |
| Runbot Score | A 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.
