Skip to content
Back to App

Run History & Comparison

When you run a backtest from a saved strategy in the Algo Playground, TestMax records the results. The run history lets you review past performance, compare runs, and identify which configurations work best.

Viewing past runs

Runs are recorded only when a saved strategy is loaded at the moment you click Run. Ad-hoc runs — a template or unsaved code without a loaded strategy — are not recorded. A run is recorded however it ends: normal completion, a script error, a manual stop, the execution timeout, or a dropped connection.

Each recorded run includes:

  • Instrument — The instrument that was backtested (NQ, ES, etc.)
  • Date range — Start and end dates for the backtest data
  • Timeframe — Bar timeframe used (1s, 1m, 5m, etc.)
  • Parameters — All parameter values for this specific run
  • Results — Final balance, net P&L, total trades, win rate, and max drawdown
  • Statuscompleted, error, or stopped (manual stop, timeout, or disconnect)
  • Timestamp — When the backtest was executed

Accessing run history

With a saved strategy loaded, click the Runs button to open the comparison modal. The most recent 50 runs for that strategy are listed with their key metrics, allowing you to quickly scan performance across different configurations.

Each run entry shows the date range, instrument, timeframe, P&L, trade count, and the parameter values used for that specific run. The full output log is not stored — it is only available live while the backtest is running.

Understanding the results

Each run records these performance metrics:

MetricDescriptionHow It Is Calculated
Final BalanceAccount balance at the end of the backtestStarting balance ($50,000) + all realized P&L
Net P&LProfit or loss from all tradesFinal balance - $50,000
Total TradesNumber of completed tradesEach entry + exit counts. A position flip (long to short) counts as 2 trades (close + open)
Win RatePercentage of profitable tradesWinning trades / Total closing trades * 100
Max DrawdownLargest peak-to-trough drop in account balance during the runMeasured in USD from the equity curve

Reading P&L correctly

  • Positive P&L (+$245.00) means the strategy made money on the selected date range.
  • Negative P&L (-$180.00) means the strategy lost money.
  • P&L includes all trades — both the position reversals and the final flatten at the end of the session.
  • P&L is realized only. The final close_all_positions() in the cleanup ensures that any open position is closed, so there is no unrealized P&L left at the end.

Win rate context

Win rate alone does not tell you if a strategy is good. Consider these scenarios:

StrategyWin RateAvg WinAvg LossNet Result
A70%$10$30Break-even
B40%$50$15Profitable
C80%$5$25Losing money

Strategy B has a low win rate but is the most profitable because its average win is much larger than its average loss. Always look at P&L alongside win rate.

Comparing strategies

The comparison feature lets you view multiple runs side by side to identify which strategy or parameter set performs best.

How to compare

  1. Load the saved strategy you want to review
  2. Click the Runs button
  3. The comparison modal lists past runs side by side with the key metrics for each

What to compare

Same strategy, different parameters: Run the SMA Crossover with FAST=5/SLOW=20 and then with FAST=10/SLOW=50 on the same date. Compare the P&L, trade count, and win rate to see which parameter set works better for that market condition.

Same strategy, different dates: Run the RSI Scalper on January 15, January 16, and January 17. If the strategy is profitable on all three days, it is more robust than one that only works on a specific date.

Same strategy, different instruments: Run the Channel Breakout on NQ and ES with the same parameters and dates. Some strategies work better on certain instruments due to differences in volatility and price behavior.

Different strategies, same conditions: Run SMA Crossover, RSI Scalper, and Channel Breakout on the same instrument, date, and timeframe. This tells you which approach is best suited for that particular market environment.

Comparison tips

  • Always use the same date range when comparing parameter variations. Different dates have different market conditions, which would confound your comparison.
  • Run multiple dates before concluding that one strategy is better. A single day’s results can be misleading.
  • Look at max drawdown, not just P&L. Two runs might have the same P&L but very different risk profiles — one smooth and consistent, the other a large drawdown followed by a recovery.
  • Consider trade frequency. A strategy with fewer trades and the same P&L is generally preferable — fewer trades mean lower transaction costs in live trading.

Using history to optimize strategies

Run history is a powerful tool for systematic strategy optimization:

Manual parameter sweep

  1. Pick a strategy and a baseline set of parameters
  2. Change one parameter at a time and run the backtest
  3. Record the results for each parameter value
  4. Identify the parameter value that produces the best results

Example sweep for SMA Crossover on NQ, 2025-01-15, 1m bars:

FastSlowTradesWin RateNet P&L
5152846%-$120
5202250%+$85
10301457%+$325
1050862%+$410
2050650%+$180

From this data, FAST=10 / SLOW=50 appears to be the best combination for this date — high win rate, reasonable number of trades, and the highest P&L.

Robustness testing

After finding good parameters on one date:

  1. Run the same strategy on 5-10 different dates
  2. Check if the results are consistently positive
  3. If the strategy is profitable on most dates, the parameters are likely robust
  4. If results vary wildly, the parameters may be over-fit to specific market conditions

Forward testing

A strong testing methodology:

  1. Develop on a set of dates (e.g., January 13-17)
  2. Optimize parameters on those dates
  3. Test forward on dates the strategy has never seen (e.g., January 20-24)
  4. If forward test results are similar to development results, the strategy is likely not over-fit

Run history storage

  • Run history is stored in your TestMax account
  • Results persist across sessions — you can close the browser and come back later
  • Runs are recorded only for saved strategies; ad-hoc runs are not kept
  • The Runs view returns the most recent 50 runs for a strategy
  • The full output log is not preserved — only the summary metrics listed above
  • Chart replay sessions created by algo runs are kept to the newest 50 per user; older ones are pruned automatically