AlgoHive
Studio

Backtesting

Test your strategies against historical data with realistic simulation.

The Lab mode lets you backtest strategies against historical data to validate performance before risking real capital.

Running a Backtest

  1. Open your strategy in the Studio
  2. Click Lab in the top navigation
  3. Configure backtest settings
  4. Click Run Backtest

Settings

Date Range

  • Start Date — When to begin the backtest
  • End Date — When to end (defaults to today)
  • Longer ranges give more data but take longer to run

Initial Equity

Your starting capital for the simulation. Position sizes are calculated based on your risk settings relative to this amount.

Connector

Which exchange connector to use for market data. This affects available symbols and data quality.

Results Dashboard

Overview Tab

Key performance metrics:

MetricDescription
Net P&LTotal profit/loss in USD
Return %Percentage return on initial equity
Win RatePercentage of winning trades
Profit FactorGross profit / Gross loss
Max DrawdownLargest peak-to-trough decline
Sharpe RatioRisk-adjusted return
Total TradesNumber of completed trades

Equity Curve

Visual chart showing:

  • Equity line — Your account value over time
  • Drawdown area — Periods of decline from peak
  • Benchmark — Buy & hold comparison (optional)

Trades Tab

List of all trades with:

  • Entry/exit dates and prices
  • Direction (long/short)
  • P&L (absolute and percentage)
  • Duration
  • Entry signal that triggered

Click any trade to see full details including the signals at entry and exit.

Console Tab

Execution logs showing:

  • Signal evaluations
  • Entry/exit decisions
  • Position sizing calculations
  • Any errors or warnings

Compare Mode

Compare multiple backtest runs side-by-side:

  1. Run a backtest and save results
  2. Modify your strategy
  3. Run another backtest
  4. Click Compare and select saved results

This helps you:

  • Optimize parameters
  • Test different indicator combinations
  • Validate strategy improvements

Realistic Simulation

Our backtest engine accounts for:

Slippage

Simulated price impact based on order size and market conditions. Configure in your strategy's risk settings.

Commissions

Trading fees applied to each order. Set based on your exchange's fee structure.

Execution

Orders fill at the next bar's open price (not the signal bar's close) for realistic timing.

Position Limits

Your strategy's position sizing rules are enforced throughout the backtest.

Tips

  • Start simple — Test basic strategies before adding complexity
  • Avoid overfitting — If it only works on one specific date range, be cautious
  • Account for fees — Small fees compound over many trades
  • Paper trade after — Good backtest results don't guarantee live performance
  • Test edge cases — How does it behave in crashes, pumps, sideways markets?

Limitations

Backtesting has inherent limitations:

  • Historical performance doesn't guarantee future results
  • Slippage in live trading may differ
  • Extreme market conditions may not be well-represented
  • Liquidity constraints aren't fully simulated

On this page