Backtesting
Test your strategies against historical data before deploying live.
Overview
Backtesting lets you simulate how a strategy template would have performed on historical market data. This is the safest way to evaluate a strategy before risking real capital.
The backtester uses real historical candlestick data from the exchange and runs your strategy's components, combination rules, exit rules, and trading session windows using the same logic as the live bot — giving you a realistic simulation of past performance.
Stop loss and take profit fills account for price gaps (using the candle open when it gaps past the level). The simulation does not model slippage or partial fills, so results on less liquid instruments should be treated as best-case estimates.
Important: Backtesting results are simulated and do not guarantee future performance.
Historical performance reflects idealised conditions. Real-world trading is subject to slippage, liquidity constraints, partial fills, exchange outages, and changing market regimes that are not fully captured in simulation. Always use backtesting as one input alongside conservative position sizing when evaluating strategies.
Configuration
To run a backtest, configure the following parameters:
- Strategy Template — Select any strategy template (system or user-created) to test. The backtest will use all of the template's enabled components, combination rules, and exit rules.
- Symbol — The trading instrument to simulate on (e.g. BTCUSDT). The available symbols come from the exchange's instrument list.
- Exchange — The exchange to source historical data from. Currently supported: BitMEX.
- Days Back — How many days of historical data to use. Default is 14 days. Longer periods give more data points but take longer to run.
- Initial Equity — The starting capital for the simulation. Default is $10,000. This affects position sizing calculations.
- Leverage — The leverage to use for simulated trades. Default is 3x.
- Fee Rate — The trading fee rate applied to each trade. Default is 0.05% (0.0005). Fees significantly impact net profitability, so use a realistic value for your exchange tier.
Running & Progress
Click "Run Backtest" to start. The backtest runs through three phases:
- Starting — Initialising the simulation engine.
- Fetching historical data — Downloading the required candlestick data from the exchange for all intervals needed by the template's components.
- Running backtest — Processing each candle through your strategy and recording simulated trades. A progress bar shows the percentage complete.
Progress updates automatically. You can navigate away and return later — the backtest continues in the background.
Interpreting Results
When a backtest completes, the results page shows:
Summary Statistics
Eight key metrics displayed at the top: total trades, win rate, profit factor (gross profit / gross loss — values above 1 indicate overall profitability), Sharpe ratio, net P&L, net P&L percentage, max drawdown, and backtest duration.
Equity
An equity curve showing how capital evolved over the backtest period, alongside a drawdown chart highlighting peak-to-trough declines. Look for smooth, upward-sloping equity with small drawdowns rather than volatile swings.
Performance
A win rate chart tracking accuracy over time and a P&L distribution histogram showing how trade outcomes are spread. A tight distribution clustered around positive values indicates consistent profitability.
Activity
A trades heatmap showing when trades occurred by hour and day of week (UTC), plus an exit reason chart showing the distribution of how trades were closed (stop loss, take profit, trailing stop, time stop, etc.).
Execution
An MFE/MAE (Max Favourable Excursion / Max Adverse Excursion) chart plotting the best unrealised profit against the worst unrealised loss for each trade. This reveals whether exits are well-timed or leaving profit on the table.
Trades
A detailed table listing every simulated trade with side, entry/exit prices, net P&L, exit reason, hold time, and MFE/MAE percentages. This lets you inspect individual trades and understand how the strategy performed at each position.
Recent Backtests
The bottom of the Backtesting page shows a list of your recent backtest runs with their status, template name, symbol, date, and results summary. You can click any completed backtest to review its full results, or delete backtests you no longer need.
Backtest statuses:
- Pending — Queued for processing.
- Fetching data — Downloading historical candlestick data.
- Running — Simulation in progress.
- Completed — Finished successfully with results available.
- Failed — An error occurred during the backtest. The error message is shown for diagnosis.
Limitations & Disclaimers
Backtesting is a valuable tool for evaluating strategies, but simulated results differ from live trading in several important ways. Keep the following limitations in mind when interpreting results:
- No guarantee of future performance — A strategy that performed well on historical data may behave very differently in live markets. Market regimes shift, volatility changes, and correlations break down. Backtest results should never be treated as a prediction.
- Slippage — The backtester assumes fills at exact price levels (candle close for entries, SL/TP levels for exits). In reality, orders may fill at worse prices due to market movement between signal and execution, especially during fast-moving markets or high-impact events.
- Liquidity — The simulation assumes your orders are always fully filled immediately. On less liquid instruments or with larger position sizes, real orders may experience partial fills, requotes, or wider spreads that erode profitability.
- Stop loss & take profit execution — While the backtester accounts for price gaps (filling at the candle open when it gaps past a level), real stop orders on exchanges are executed as market orders and may fill at prices worse than the trigger level, particularly during volatile periods or thin order books.
- Fees — The simulation uses a flat fee rate for all trades. Real fee structures vary by exchange tier, maker/taker status, and volume discounts. The actual fees paid in live trading may differ.
- Market impact — The backtester assumes your trades do not move the market. In practice, larger orders can shift prices, widening the spread and reducing the effective entry/exit quality.
- Exchange & infrastructure risk — The simulation does not account for exchange downtime, API failures, network latency, or rate limits that may prevent orders from being placed or cancelled in time during live trading.
Always start with small position sizes when deploying a strategy live and gradually increase as you build confidence in its real-world behaviour.