Skip to content

Backtests

A backtest replays a strategy over historical candles on a virtual portfolio. Orders are filled by a simulator with the given commission, slippage and margin.

On a definition card or page click Backtest and fill in the form.

Field Description
Data provider source of historical candles
Exchange whose quotes to use
Candle interval timeframe of the replay
Period start / end date range
Trading pairs BASE/QUOTE format, e.g. BTC/USD_LEVERAGE
Commission share of the trade amount: 0.001 = 0.1%
Slippage difference between the expected and the actual fill price
Margin rate 0.1 = 10% collateral (10x leverage), 1.0 — no leverage
Initial balance (USDT) 1,000–10,000 is a sensible range
Strategy parameters values of strategyParams
Risk limits optional — the same rules as for demo and live

If the diagram has errors, the form warns you: the backtest would fail.

The backtest appears under Backtests with its status and progress. Its page shows:

  • Price chart — candles with trade markers; clicking a trade in the list highlights its signal;
  • Portfolio curve — equity and free balance over the replay;
  • Portfolio — balance, accrued commission, number of trades;
  • Trades — the trade list;
  • Risk management — the limits used and how many orders they rejected.

An order that breaks a limit is rejected: it does not change the portfolio, the strategy sees it with the rejected status, and the replay goes on. Days for daily limits are counted in UTC. An order breaking several limits counts for each of them.

The Export button offers:

  • Excel (.xlsx) — summary, trades and portfolio curve; labels in the interface language;
  • CSV — trades and CSV — portfolio curve — for pandas and scripts; column names are machine names in every language.

An unfinished backtest exports partial data.