Backtesting Overview

Test your trading strategies against historical data before risking real capital.

What is Backtesting?

Backtesting allows you to:

  • Validate Strategy Logic - Ensure your strategy behaves as expected
  • Evaluate Performance - See historical returns, win rates, and drawdowns
  • Optimize Parameters - Fine-tune settings for better results
  • Build Confidence - Understand how your strategy performs in different market conditions

Testing Modes

TradeStaq offers two backtesting modes:

FeatureQuick TestFull Backtest
DurationFixed 7-day windowCustom date range
Save RequiredNoYes (strategy must be saved)
MetricsBasic (Return, Win Rate, Trades, Drawdown, PF)Full suite including advanced ratios
ChartTrade markers on candlestickFull equity curve + drawdown
AccessAI Builder editor panelBacktests page
SpeedInstant (seconds)Minutes (depending on data range)
Results StoredIn-memory onlySaved with versioning

Quick Test

Available directly from the AI Strategy Builder editor. Select an exchange, symbol, and timeframe — the engine runs a 7-day instant backtest and returns results in seconds. No strategy save required. Ideal for rapid iteration during strategy development.

Full Backtest

Run from the Backtests page with full configuration options: custom date range, detailed metrics, equity curve visualization, trade list export, and result comparison. Requires saving your strategy first. Auto-versions strategy code so you can track changes over time.

How It Works

┌─────────────────────────────────────────────────────────────┐
│                    BACKTESTING FLOW                         │
│                                                             │
│  ┌──────────┐    ┌──────────────┐    ┌─────────────────┐   │
│  │ Strategy │───▶│  Historical  │───▶│  Simulated      │   │
│  │  Config  │    │    Data      │    │  Execution      │   │
│  └──────────┘    └──────────────┘    └────────┬────────┘   │
│                                               │             │
│                                               ▼             │
│                                      ┌─────────────────┐   │
│                                      │    Results &    │   │
│                                      │    Metrics      │   │
│                                      └─────────────────┘   │
└─────────────────────────────────────────────────────────────┘

The Process

  1. Select Strategy - Choose a TradeStaq strategy to test
  2. Configure Parameters - Set trading pair, timeframe, date range
  3. Run Simulation - Strategy executes against historical candles
  4. Analyze Results - Review performance metrics and equity curve

Key Metrics

MetricDescriptionGood Value
Total ReturnOverall profit/loss percentagePositive
Win RatePercentage of profitable trades> 50%
Profit FactorGross profit / Gross loss> 1.5
Max DrawdownLargest peak-to-trough decline< 20%
Sharpe RatioRisk-adjusted returns> 1.0
Sortino RatioDownside risk-adjusted returns> 1.5
Total TradesNumber of completed tradesVaries

Subscription Requirements

FeatureFreeProTraderWhale
Run Backtests-
Quick Test (AI Builder)-
Advanced Metrics--
Multi-Timeframe--
CSV/PDF Export--
Public Sharing---
Parameter Optimization---
Backtest Comparison---

Note: For live tier values, see the Plans Comparison page.

AI Builder Integration

The AI Strategy Builder includes a built-in Quick Test feature for rapid iteration. Describe your strategy idea, let the AI generate code, then instantly test it — all within the same interface. See AI Builder Testing for details.

Important Limitations

Note: Past performance does not guarantee future results. Backtesting has inherent limitations.

What Backtesting Cannot Simulate

FactorReal TradingBacktesting
SlippagePrice moves between signal and executionAssumes instant fill at signal price
LiquidityLarge orders may not fill completelyAssumes unlimited liquidity
Market ImpactYour orders affect the marketNo market impact
LatencyNetwork delays existInstant execution
Exchange IssuesDowntime, rate limitsPerfect availability

Best Practices

  1. Don't Over-Optimize - Avoid curve-fitting to historical data
  2. Use Out-of-Sample Testing - Test on data not used for optimization
  3. Consider Transaction Costs - Factor in fees and spread
  4. Test Multiple Periods - Verify across different market conditions
  5. Start Small Live - Paper trade before going live

Backtest States

StatusDescription
PendingQueued for execution
RunningCurrently processing historical data
CompletedFinished successfully with results
FailedError during execution
CancelledManually stopped by user

Next Steps

Related Guides