Create Backtest

Create a backtest task and bind a strategy, trading pair, time range, and capital, with per-pair execution config (position, stop-loss / take-profit, etc.). Same entry as Run Backtest; once configured, run it and view the report.

Creating a backtest means spinning up a new backtest task, binding a strategy and execution config to a set of trading pairs, then running through historical K-lines to simulate trading and produce return, drawdown, and win-rate metrics—the most important validation step before paper trading or live.

The entry points are the same as Run Backtest: use the AI Agent to spin up a task with a single sentence, or step through the visual interface (from the Strategy Library or the backtest system).

This page covers the two ways to create a backtest, configuration essentials (including time-range and capital tips), executing and viewing the report, and how to iterate. For backtest concepts and the overall flow, see Backtest Basics; for detailed configuration items, see Backtest Config.


Two ways to create

Method 1: Through the AI Agent

Just describe the intent in one sentence (e.g. "Run my MA-cross strategy on Binance BTC/USDT spot, 1H, last 3 months"). The AI Agent will create the task, add the pair, bind the strategy and execution config, run it, and can read back return, drawdown, and other results. Good for quickly validating an idea or when you're not familiar with the UI. For example dialogues, see Quick Start (5 min).

Method 2: Through the visual interface

  • From the Strategy Library: open the strategy you want to backtest and click "Backtest"—the strategy is bound by default; you only need to fill in the task-level fields (exchange, time range, etc.) and per-pair fields (K-line timeframe, initial capital, execution config, etc.) to launch.
  • From the backtest system: open the backtest page and click "Create Backtest" to build a task and add pairs one by one with their bound strategies. Good for running many pairs at once or comparing different strategies.

Either way you'll need to fill in the task-level and per-pair fields described below; the exact UI is whatever the system ships.


Configuration essentials

A backtest task's configuration also splits into task level (shared across the task) and per-pair level (per pair, independent):

ItemLayerDescription
ExchangeTaskWhich exchange's historical data to backtest with (Binance, OKX, etc.)
Market typeTaskSpot / futures; determines order and leverage models
Time rangeTaskStart and end dates; see "Time range and initial capital tips" below
Fees / slippageTaskOptional; align with live cost so the backtest isn't overly optimistic
Trading pairPer pairE.g. BTC/USDT; one task can hold multiple pairs running independently
K-line timeframePer pairThe pair's execution main timeframe; align with planned live
Initial capitalPer pairSimulated starting capital (e.g. 10000 USDT), close to the live capital scale you plan
LeveragePer pairUsed in futures
Strategy (signals)Per pairThe strategy bound to this pair (buy / long & sell / short conditions, indicator parameters); reusable across pairs
Execution config (risk)Per pairPosition, stop-loss / take-profit, max drawdown, scale-in—the runtime parameters

For more configuration items (data precision, trade restrictions, etc.), see Backtest Config. For concepts, see Backtest Basics, Run Backtest.

Time range and initial capital tips

  • Time range: at least 1 month, 3–6 months recommended; too short means few trade samples and noisy results, too long means earlier market conditions may not represent today's market well. Try to include up, down, and sideways phases to see how the strategy behaves across regimes.
  • Initial capital: no fixed standard—match the scale of the live capital you plan to use (e.g. 10,000 USDT). For relative comparison (different parameters), just keep the same initial capital across runs.
  • Fees and slippage: if the system lets you set buy / sell fees separately, use the actual exchange rate (e.g. 0.1% one-way); set slippage at 0.05%–0.2% or tune to the pair's liquidity. With fees and slippage on, returns are slightly lower than without—but more realistic.

Run the backtest and read the results

Once configured, start the backtest. The system loads historical data in time order, simulates trades by the strategy rules, computes metrics, and produces a report when done.

During execution: the system loads K-lines for the selected pair and time range, walks forward bar by bar (or by the chosen period) checking entry and exit conditions, and simulates fills using the position and risk controls configured on this pair for this backtest, updating the equity curve and positions; once finished, it aggregates return, drawdown, trade count, win rate, P/L ratio, and other metrics. Run time depends on data volume, timeframe, and strategy complexity; progress display is whatever the system shows.

Once complete, you can review:

  • Returns: total return, annualized return, period returns, etc.; combine with the equity curve to see if returns concentrate in certain regimes.
  • Risk: max drawdown, Sharpe ratio, volatility, etc.; the backtest runs under the configured execution constraints, which lets you estimate the kind of max drawdown and risk-adjusted return you might face live.
  • Trading: trade count, win rate, P/L ratio, average holding time; too few trades means too little sample, too many may mean the strategy is over-sensitive or the period too short.
  • Charts and details: equity curve, K-line chart with entry / exit markers—useful for checking whether each open / close lines up with strategy logic and what drove losing trades and drawdown stretches.

For detailed metric interpretation and analysis methods, see Result Analysis. If results are unsatisfactory, tune the strategy's buy / sell conditions and indicator parameters, or change the execution config (stops, targets, position) and re-run; or use Optimization for parameter search—just be careful not to overfit history.


How to iterate

  • Happy with results: move to Paper Trading on virtual capital for a while to validate behavior in a live-like environment, then consider going live; when going live, keep the pair, timeframe, and execution config close to this backtest.
  • So-so or poor: use Result Analysis to inspect losing trades, drawdown stretches, and the equity curve to see whether the issue is strategy logic, signal parameters, execution config, or just market mismatch; then adjust buy / sell conditions or execution config and re-run for comparison. For systematic search, use Optimization.
  • Multiple iterations: keep the time range and pair the same (or close) across runs for easier comparison; and validate out of sample (a different time window or another pair) to avoid overfitting.

Usage tips

  • Time range: at least 1 month, 3–6 months recommended.
  • Fees and slippage: set them close to live so the backtest isn't overly optimistic.
  • Align with live: keep the pair, timeframe, and execution config you plan to run live the same in the backtest for easier attribution.
  • Avoid overfitting: don't over-tune to a single backtest's data; validate across different time windows or pairs, or use the out-of-sample option in Optimization if available.

Common questions

Backtest is too slow: shorten the time range or use a larger timeframe (1H instead of 5m). For complex strategies or large data, expect longer runs. Some systems show progress in the backtest list.

Backtest results aren't great: check whether the strategy's logic and buy / sell conditions are reasonable, and whether this backtest's execution config (stops, targets, position) is too tight or too loose; combine with Result Analysis on losing trades and drawdown stretches, then adjust and re-run. Also consider whether the regime in this time range fits the strategy (trend strategies usually underperform in ranges).

Insufficient or missing data: confirm the selected pair has enough history for the time range; if not, switch pair or shorten / shift the range. The system's data management or market-data docs should show which intervals are available for the pair.

Backtest returns are great but live is bad: backtests can't fully reproduce live slippage, fees, liquidity, and latency—set reasonable fees / slippage, then validate via Paper Trading for a while before going live.


Next steps