Backtest Lab — Compare
Run several backtest configurations side by side, overlay their equity curves, and diff the eight headline metrics in one table.
Compare runs N configurations and puts their results next to each other. Use it to answer “does this change actually help?” — e.g. MSR vs. Equal Weight, or momentum vs. mean reversion on the same universe and dates.
What you get
-
A metrics table — one row per successful run, with the eight headline metrics in this fixed order:
annualizedReturn·annualizedVol·sharpeRatio·sortinoRatio·maxDrawdown·calmarRatio·winRate·profitFactor(Each is defined in Metrics.) Non-finite values are coerced to
0so the table never breaks. -
Overlaid equity curves — every run’s daily curve on one chart, aligned onto a shared (union) date axis, forward-filling gaps and downsampling for readability.
Stable colors and labels
Each run keeps the color and label tied to its original input index. If an earlier variant fails to run, later variants don’t shift colors — so the legend stays readable and a failed run simply drops out of the table and chart without disturbing the rest.
Tips
- Always include a baseline (Equal Weight, or buy-and-hold via the benchmark) so improvements are measured against something.
- Change one thing at a time between variants — otherwise you can’t attribute the difference.
- To vary a numeric parameter across many values, Sweep is faster than adding Compare rows by hand.