Argix Labs
Documentation

Testing

Backtesting

Test your strategies against historical data before deploying to live markets.

Backtesting limitations

Backtesting results are hypothetical and subject to material limitations including survivorship bias, look-ahead bias, and execution assumptions. A profitable backtest does NOT guarantee profitable live trading. See the Risk Disclosure for details.

How backtesting works

The backtesting engine simulates your bot’s logic against historical market data:

  1. Select a date range and asset(s)
  2. The engine replays market data chronologically
  3. Your bot’s signals, filters, and rules are evaluated at each bar
  4. Simulated orders are filled at historical prices
  5. Performance metrics are calculated

Performance metrics

MetricDescription
Total ReturnNet profit/loss as a percentage
Sharpe RatioRisk-adjusted return
Max DrawdownLargest peak-to-trough decline
Win RatePercentage of winning trades
Trade CountTotal number of trades executed

Known limitations

  • No slippage modeling: Backtests assume fills at the exact historical price.
  • No market impact: Your orders don’t affect the simulated market.
  • Perfect fills: All orders fill completely. In live markets, partial fills and rejections occur.
  • Data quality: Results depend on the quality and completeness of historical data.

Paper trading first

Always deploy to paper trading after backtesting. Paper trading provides a closer approximation of live conditions, though it still differs from real market execution.