How we accidentally manufacture a brilliant strategy
Give an optimiser enough choices and it will find an impressive historical answer. The harder question is whether that answer contains information about a different period.
Our two moving-average periods are enough to demonstrate the problem. Each combination makes different trades. Selecting the highest profit after inspecting all of them favours both genuine structure and whichever combination happened to benefit from the noise in that particular sample.
Define a bounded experiment
Keep the instrument, timeframe, fixed volume, execution assumptions and development dates unchanged. Try fast periods 10, 15, 20, 25 and 30, with slow periods 40, 50, 60, 70 and 80. That creates 25 combinations, all with the fast period below the slow period. Save the unoptimised 20/50 baseline as the comparison.
In the tester’s input settings, enable optimisation for only those two parameters and enter the ranges and steps. For this small grid, exhaustive enumeration makes it straightforward to account for every trial. MetaTrader also offers genetic search for larger spaces; that changes the search method, not the need for independent evaluation. See Optimisation Types.
Let the headline score tempt you
For the demonstration, sort by net profit. Save the entire table, not just the winner. Then inspect its drawdown, trade count, costs and dependence on individual trades. The top row can be the best row in this search while remaining a poor candidate under the project’s risk constraints.
No optimisation has been run for this article, so there is no claimed winning parameter pair. The purpose of this exercise is to show how a persuasive selection process can arise, not to advertise an invented performance chart.
The real search is larger than the grid
Trying another instrument after disappointment is another choice. Moving the start date, changing the objective, removing a difficult month or adding a filter all expand the research search. If only the final successful run survives in the write-up, the reader cannot see how many chances the process had to find something attractive.
Maintain an experiment ledger with the hypothesis, data window, parameters tried, selection rule, result and reason for continuing. Include discarded ideas. Reproducibility is about the sequence of decisions as well as the final settings.
Look around the winner
Arrange the 25 results in a matrix, fast periods along one axis and slow periods along the other. Look for whether neighbouring settings behave similarly or whether one isolated cell dominates. Repeat the view for drawdown and trade count. A broad region can be less fragile than a sharp peak, but a plateau discovered in the same history is still in-sample evidence.
Do not add more filters solely to make a disappointing patch disappear. Any change should have a written rationale that could have been stated before looking at the affected trades. Otherwise the specification is becoming a description of the past.
Freeze the selection procedure
Before examining later data, decide how candidates will be selected, what constraints disqualify them and how ties are resolved. Choose those rules from the project’s requirements, not by repeatedly opening the holdout. Save the selected inputs and source version. The next note separates the period used to choose from the period used to evaluate.
Building or reviewing your own trading system?
I can help turn the specification, implementation and testing into a coherent engineering process. Discuss your project.
