Skip to content
Back to App

Run History & Comparison

Every time you run a backtest in the Algo Playground, TestMax records the results. The run history lets you review past performance, compare different strategies, and identify which configurations work best.

Viewing past runs

Each backtest run records:

  • Strategy name — The saved strategy used (or “Unsaved” for ad-hoc runs)
  • Template — Which template the run was based on
  • 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, and win rate
  • Timestamp — When the backtest was executed

Accessing run history

Run history is available from the Playground page. Past runs are listed with their key metrics, allowing you to quickly scan performance across different configurations.

Each run entry shows a summary line with the strategy name, instrument, date, P&L, and trade count. You can expand a run to see full details including all parameter values and the complete output log.

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

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. Select two or more runs from your history
  2. Click the Compare button
  3. A side-by-side view shows the key metrics for each run

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 the trade log, not just the summary. Two strategies might have the same P&L but very different risk profiles. One might have smooth, consistent returns while the other has 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
  • Each run is associated with a strategy (if one was loaded) or marked as “Unsaved”
  • The full output log is preserved, so you can review the detailed trade-by-trade execution