Parameter Optimisation
- Category
- Algorithmic Trading
- Level
- Professional
Simple definition
Searching parameter values — a lookback, a threshold, a stop distance — for the ones that performed best in the past. The single best setting is usually the luckiest one, not the truest.
Professional definition
The search over a rule's free parameters for values maximising a chosen objective on historical data. The output is not a number but a surface, and the shape of that surface matters more than its peak: a broad plateau says the result is insensitive to the exact setting, a sharp spike says it is an artefact.
Technical definition
A single best parameter set is usually the maximum of a noisy function, and the maximum of noise is biased upward: the expected best of many sampled points exceeds the expected typical point even when every point shares the same true mean. A broad, stable plateau is therefore more trustworthy than a sharp peak, and reporting neighbourhood performance — the objective averaged over nearby settings — is more informative than reporting the optimum. Degrees of freedom should be counted and justified before the search, not after it.
Academic definition
The selection of free parameter values by maximising an in-sample objective function, whose optimum is an upward-biased estimator of out-of-sample performance by an amount increasing in the size of the search space.
Mechanism
Every parameter added multiplies the candidate configurations, and every configuration tested is another chance for noise to produce a flattering result. The surface gains spurious peaks faster than real structure, and the global maximum drifts toward wherever the sample happened to be kind. A region that works is a claim about the market; a single point that works is a claim about the sample.
In practice
- Who uses it
- Systematic developers, anyone tuning an indicator period, and reviewers deciding whether a reported result is robust.
- Why it matters
- Some parameters have to be chosen, and a structured search with a stated objective is more honest than choosing them by eye.
- Limitations
- The optimum is biased upward, the surface moves with regime, and the search itself creates the multiple-testing problem the result then has to survive.
Common mistakes
- Reporting the peak of the surface as the expected result.
- Optimising on the same data used to evaluate.
- Adding parameters until the equity curve looks acceptable.
Examples
One lookback grid peaks at 2.4 with 0.9 and 0.7 either side; another peaks at only 1.4 but its neighbours are 1.3 and 1.35. The second peak is lower and far more believable, because almost any nearby setting works.
- grid A objective by lookback: 8 -> 0.5, 10 -> 0.6, 12 -> 0.9, 14 -> 2.4, 16 -> 0.7, 18 -> 0.5
- grid B objective by lookback: 8 -> 1.1, 10 -> 1.3, 12 -> 1.4, 14 -> 1.35, 16 -> 1.3, 18 -> 1.2
- objective is an illustrative risk-adjusted score
- A: peak 2.4 at 14; three-point neighbourhood mean = (0.9 + 2.4 + 0.7) / 3 = 1.33
- B: peak 1.4 at 12; three-point neighbourhood mean = (1.3 + 1.4 + 1.35) / 3 = 1.35
- A: peak exceeds its neighbourhood mean by 1.07; B: by 0.05
The gap between a peak and its neighbourhood is a cheap robustness check. A large gap means the result depends on an exact value, which the market has no reason to respect.
A rule with four parameters on a ten-value grid has ten thousand configurations. Reporting the best of them as the strategy's expected performance treats the maximum of ten thousand noisy draws as if it were one measurement.
Related terminology
- related
- Curve Fitting Overfitting In-Sample versus Out-of-Sample Data Snooping Walk-Forward Testing Backtesting Monte Carlo Simulation Moving Window Sharpe Ratio
Curve Fitting
Optimisation is a bounded search with a stated objective and a declared degrees-of-freedom budget, reported honestly including the bias. Curve-fitting is the same search continued until the equity curve looks right, with no budget and no reserved data.
Sources
CMT Association · chapters on optimisation and robustness in rule-based testing
https://cmtassociation.org/wp-content/uploads/2019/01/Technical-Analysis-Modern-Perspectives-CMT-Association.pdf URL verified
CMT Association · system design, testing and evaluation topics
https://cmtassociation.org/wp-content/uploads/2026/03/2026-CMT-Program-Guide_v2026.3.5.pdf URL verified
Editorial status
Flagged by the editor as uncertain on a linguistic, mathematical or regulatory point.
