Walk-Forward AnalysisParameter Stability
Parameter Stability
The Parameter Stability chart (Params tab in the bottom chart area) visualises how the optimal parameter values shift across folds. This is the key tool for detecting over-optimised strategies.
What It Shows
For each fold, the WFA runner records the best parameter values chosen during in-sample optimisation. The parameter stability chart plots each parameter as a separate line across fold indices on the X-axis.
Because different parameters may have very different scales (e.g. a period of 20 vs a multiplier of 0.5), all values are normalised to the 0–1 range within each parameter's own min/max across folds before plotting.
// Normalization formula
normalised = (value - paramMin) / (paramMax - paramMin)
// If paramMin === paramMax (constant param): normalised = 0.5
Chart Layout
X-axis — Fold Index
Each fold is a point on the X-axis. Fold 1 is leftmost; the final fold is rightmost. Single-fold runs show one center point.
Y-axis — Normalised Value (0–1)
0 = the minimum value seen for that parameter across all folds. 1 = the maximum. 5 horizontal grid lines at 0, 0.25, 0.5, 0.75, 1.0.
Lines
One line per parameter. Each line connects the fold-by-fold best-param values. Lines are drawn as connected segments (if a fold is missing a param value, it is skipped).
Dots
A filled dot (radius 3px, 5px for the selected fold) is drawn at each fold point. Clicking a dot selects that fold.
Legend
A colour-coded legend below the chart area labels each parameter. Legend wraps into rows of up to 4 items. Each row is 20px tall.
Selected Fold Highlight
A semi-transparent vertical band is drawn at the selected fold's X position. Dots at that X position are enlarged.
Parameter Color Palette
Parameters are assigned colors in order from a fixed 12-color palette. If there are more than 12 parameters, colors cycle.
1. Blue
2. Amber
3. Emerald
4. Red
5. Violet
6. Orange
7. Sky
8. Fuchsia
9. Green
10. Yellow
11. Indigo
12. Pink
Reading the Chart
Good
Flat horizontal lines
The optimal parameter value does not change across folds. Strong stability signal — the parameter has a genuine, consistent optimal value.
Neutral
Gradual drift in one direction
The optimal value shifts slowly over time. May indicate regime change or that the parameter adapts to changing market conditions. Inspect whether OOS results hold up.
Warning
Random / chaotic values
The optimizer picks a different "best" value every fold with no consistent pattern. Classic curve-fitting signature. The parameter may not meaningfully affect performance.
Check
All parameters constant
If every line is flat, consider whether the sweep range is appropriate. A flat line because the parameter hits the sweep boundary every fold is different from genuine stability.
Technical Notes
- Canvas rendering: The chart is drawn on an HTML canvas element with devicePixelRatio scaling for crisp display on HiDPI screens.
- Resize handling: A ResizeObserver watches the container and redraws when dimensions change.
- Click detection: Click events map the pixel X coordinate to the nearest fold index (using the same foldToX linear mapping as the drawing pass). A tolerance of ±20px is used to avoid misses.
- Empty state: If there are no folds or no parameters, the chart is blank. The canvas is still mounted.
- Parameter key format: Keys are in
varName.paramNameformat, matching the sweep row format.