Parameter Optimization
Also known as: strategy optimization, parameter tuning, input optimisation, optimization pass
What is it?
Parameter optimization is running a strategy across many combinations of its inputs to find which settings performed best on a stretch of historical data. The mechanics are simple and the danger is not. Give a tester three inputs with twenty values each and it evaluates eight thousand combinations, then reports the best.
Curve-fitted: a single sharp peak
One value works and its immediate neighbours lose money. Nothing about the market changes between a 33 and a 35 period average, so this peak is an accident of this particular history.
- MA period 33 — profit factor 0.91
- MA period 34 — profit factor 2.80
- MA period 35 — profit factor 0.88
- Out of sample — 0.86
Robust: a broad plateau
A lower headline number, but the whole region works. A small shift in market behaviour moves you along the plateau instead of off a cliff.
- MA period 32 — profit factor 1.28
- MA period 34 — profit factor 1.35
- MA period 36 — profit factor 1.31
- Out of sample — 1.22
The problem is that with eight thousand attempts on a fixed history, some combination will look excellent purely by chance. The tester cannot tell that apart from genuine edge, and it reports the winner either way, which is how a strategy earns a 2.8 profit factor in the tester and loses money in the first live month. What separates useful optimization from curve-fitting is the shape of the result, not its peak.
Look at the surface across neighbouring values: if a moving-average period of 34 returns strong results and 32 and 36 do too, that is a genuine region. If 34 is excellent while 33 and 35 are losses, you have found an accident of this particular history. Then confirm on data the optimizer never saw, which is what out-of-sample testing and walk-forward optimization exist to do.
Why it matters: Optimization always returns a best setting, including when there is no real edge to find, so the check that matters is whether neighbouring values work too.
Combinations tested = product of the value count for every optimized input
An over-optimized strategy shows its best-ever numbers in the tester and its worst behaviour live, because the settings were fitted to noise that does not repeat.
Real-world example
A strategy optimized across 8,000 combinations returned a 2.8 profit factor on the tested period and 0.86 on the following six months of unseen data, with the winning parameter set surrounded by losing neighbours.
How SignalBots handles it
SignalBots publishes historical win rates from live signal performance rather than from an optimized backtest, so the figure is a record rather than a fitted result. See /risk-warning.
Pro tip
Judge a parameter by its neighbours. A broad plateau of decent results beats a single sharp peak, because the plateau is what survives when the market shifts slightly.
Common pitfalls
Optimizing on all available history and leaving nothing unseen to test on, which makes it impossible to tell an edge from a coincidence.
Frequently asked questions
How many parameters is too many?
There is no fixed number, but each one multiplies the combinations and the chance of fitting noise. As a working guide, keep optimized inputs to three or four and hold every other setting fixed at a value you can justify.
What is the difference from walk-forward optimization?
A single optimization pass fits one set of parameters to one period. Walk-forward optimizes on a window, tests on the next unseen window, then rolls both forward repeatedly, which measures whether the process of re-optimizing holds up rather than whether one result did.
How much data should I leave out of sample?
A common split is optimizing on 70 percent and reserving 30 percent, though the more important requirement is that the reserved data contains a different market condition, not just a different date range.
Is a high profit factor in the tester a good sign?
Not by itself. An unusually high figure after a large optimization run is more often evidence of curve-fitting than of edge. Compare it against the out-of-sample result before treating it as meaningful. Your capital is at risk.
Should I re-optimize periodically?
Only on a schedule you fixed in advance and validated with walk-forward. Re-optimizing whenever performance dips is the same mistake repeated, because it fits the parameters to the drawdown you are trying to escape.
Trading involves substantial risk of loss. Historical and backtested results do not guarantee future performance. Read the full risk warning.