LogoEdgeKeeper
/Core Concepts
/Backtesting Engine

Backtesting Engine

Validate your strategies against historical market data with precision and depth.

Overview

EdgeKeeper's backtesting engine is a powerful simulation environment that replays historical market data through your strategy's logic. It allows you to verify performance, analyze risk, and optimize parameters before risking real capital.

Configuration

Before running a backtest, you can customize the simulation parameters in the configuration modal.

General Settings

  • Date Range: Select the start and end dates for the simulation (max 1 year).
  • Initial Capital: The starting balance of your simulated account (e.g., $10,000).
  • Commission & Slippage: Optional toggles to simulate realistic trading costs (e.g., 0.1% fee, 0.5 pip slippage).

Risk Management

Define how your strategy manages trade exits. These settings apply globally to all trades generated by the strategy.

Stop Loss (SL)

  • Percent: Fixed % below entry price (e.g., 1%).
  • ATR: Dynamic SL based on volatility (e.g., 1.5x ATR).

Take Profit (TP)

  • Percent: Fixed % above entry price (e.g., 2%).
  • ATR: Dynamic TP based on volatility (e.g., 2.0x ATR).
  • Risk:Reward: Multiple of the Stop Loss distance (e.g., 2.0R).

Key Metrics

After a backtest completes, you will receive a comprehensive performance report available in the Backtest Dock and detailed view.

Total Return

Net profit/loss as a percentage of initial capital.

Win Rate

Percentage of trades that closed in profit.

Profit Factor

Ratio of Gross Profit to Gross Loss.

Max Drawdown

Largest peak-to-trough decline in account equity.

Sharpe Ratio

Risk-adjusted return metric (Return / Volatility).

Expectancy

Average expected return per trade in quote currency.

Trade Counts

Total, Winning, and Losing trade counts.

Avg Duration

Average time a trade is held open.

Risk / Reward

Average Win Amount / Average Loss Amount.

Best / Worst Day

Largest single-day profit and largest single-day loss.

Troubleshooting

No Trades Generated?

If your backtest returns 0 trades, check:

  • Logic Conditions: Are your entry rules too strict?
  • Data Availability: Does the selected symbol have data for the chosen date range?
  • Timeframe: Ensure your indicators match the timeframe of your data.

Simulation Errors

"Execution Error" usually means a calculation failed (e.g., division by zero in a custom logic node). Check the Diagnostics panel for hints.