Backtesting

Test your strategies on historical data before risking real capital

Historical TestingParallel Parameter Sweep30+ MetricsHeatmap OptimizationTrade Inspector

What is Backtesting?

Backtesting runs your node-graph strategy against historical market data to measure how it would have performed. Instead of risking real money, you replay past price action and see every trade the strategy would have taken — along with a complete profit & loss breakdown, drawdown profile, and risk metrics.

Validate Your Strategy

Confirm your trading idea has a real edge on years of historical data before going live.

Find Optimal Parameters

Test hundreds or thousands of parameter combinations automatically to identify the best settings.

Understand Risk

See your true max drawdown, win rate, and profit factor — real numbers, not estimates.

Avoid Costly Mistakes

Discover hidden weaknesses in your strategy without losing real money in live markets.

How It Works

When you press Run, the engine executes this pipeline:

  1. 1

    Decompile Graph

    Converts your node graph into Slang source code, extracting all variable names, function calls, and parameter values.

  2. 2

    Generate Combinations

    Computes the Cartesian product of all parameter sweep ranges. For example SMA1 [5,10,15] × SMA2 [20,30] produces 6 combinations.

  3. 3

    Pre-fetch Market Data

    Downloads OHLC bars for all configured markets in parallel before running any backtests.

  4. 4

    Parallel Execution

    Distributes work across up to 8 Web Workers (capped at your CPU core count). Each worker independently runs one parameter combination.

  5. 5

    Stream Results

    As each worker finishes, results are streamed live into the Leaderboard and Heatmap. You can stop at any time.

⚡ Turbo Mode

Turbo Mode bypasses React state updates during a sweep and uses direct DOM manipulation for the progress bar. This eliminates re-render overhead when running large sweeps (500+ combinations), giving noticeably faster completion times. Toggle Turbo Mode in the bottom strip of the Configuration panel.

Explore in Detail

Each panel of the Backtesting component is documented in depth:

UI Layout

The Backtesting panel uses a 3-column resizable layout. All panel boundaries can be dragged to resize.

Left Panel
Configuration
Tabs: Market | Parameters
12–40% width
Center
Leaderboard / Inspector
Heatmap / Equity Curve
Right Panel
Statistics
8 metric sections
10–40% width

Best Practices

📈

Use at least 2+ years of data for statistical significance.

⚖️

Always configure slippage and commission to simulate real trading costs.

🎯

Avoid over-optimizing — parameters tuned too tightly to history fail live.

🔍

Validate promising parameters with Walk-Forward Analysis on out-of-sample data.

📊

Profit Factor > 1.5 and Win Rate > 50% is a good baseline to target.

⏱️

Test on multiple timeframes — strategies often behave differently across them.