Moving Average Crossovers: The Most Backtested Rule in Trading

9 min readQuantParadox research

Everyone starts here, and the reason is sound: the rule is completely mechanical, so nothing about the result depends on judgement. What it teaches about parameter search applies to every strategy that follows.

The short answer

A moving average crossover strategy enters when a faster average crosses a slower one, and because the rule has only two parameters it is unusually easy to backtest exactly and unusually easy to overfit by searching the parameter grid for the pair that happened to perform best.

How does a moving average crossover work?

A crossover rule computes two averages of price over different lookback lengths and takes a position when the shorter one crosses the longer one — long when the fast average crosses above, short or flat when it crosses below.

The rule requires no interpretation whatsoever. Given a price series and two lengths, every entry and exit is determined, which means two people testing it on the same data get identical trades. That property is rarer than it sounds and it is what makes the crossover the right first thing to test.

Variants change the averaging method rather than the logic. An exponential average weights recent prices more heavily and reacts faster; a simple average weights all bars in the window equally. The choice changes the crossover timing and is a third parameter alongside the two lengths.

The best-known instances are named rather than described — a fifty-period average crossing a two-hundred-period one attracts attention on daily equity charts under its own label — but these are simply particular parameter choices with no special status.

Why is the crossover so easy to overfit?

The parameter space is small enough to search exhaustively in seconds, which means anyone can find the best-performing pair on any history, and the best of several hundred combinations looks good even on data with no structure.

Consider the arithmetic. Testing fast lengths from five to fifty and slow lengths from twenty to two hundred is a few thousand combinations, and a modern machine grinds through them instantly. The top result from that grid will show an attractive equity curve on the data it was searched over, by construction, whether or not the crossover carries any information.

This is the clearest available demonstration of a principle that applies everywhere: reporting the best of many attempts is a search result and not a measurement. The crossover just makes it visible because the search is so easy to run.

The diagnostic is the parameter surface. Look at how performance varies across neighbouring parameter pairs rather than only at the winner. A result sitting on a broad plateau, where nearby parameters also perform reasonably, is a different kind of evidence from an isolated spike surrounded by poor results, and the spike is almost always noise.

Do moving average crossovers still work?

Crossover rules are trend-following by construction, so their results depend heavily on whether the period tested contained sustained trends, and a single pooled figure across a long history averages very different regimes.

This is the honest framing rather than a yes or no. A crossover has no mechanism for producing an edge in a range: the averages cross repeatedly, each crossing generates a trade, and each trade pays the spread. In a sustained trend the same rule stays positioned and the small losses in the chop are recovered by the one large move.

That makes the interesting measurement conditional rather than pooled. What fraction of the period was trending by some defined measure, what did the rule do in each regime, and how large is the gap? A pooled result hides both halves and is why the same rule can be reported as working and as failing depending on the window chosen.

The cost drag deserves separate attention. Crossover rules on lower timeframes generate a great many trades, and a rule with a small per-trade edge can be entirely consumed by spread. Testing with a realistic and explicitly stated cost model is not a refinement here, it decides the sign of the result.

What should you actually learn from testing a crossover?

Use the crossover as a control rather than as a strategy: it is the baseline any more complex rule should be required to beat on the same data with the same costs.

This is its highest-value use and it is rarely how it gets used. When a sophisticated multi-condition strategy produces an attractive result, the relevant question is whether it outperforms a two-parameter crossover on identical data. Frequently it does not, and discovering that saves the effort of maintaining a complicated rule that adds nothing.

It also teaches the parameter-stability check in a setting simple enough to see clearly. Plot performance across the whole grid and look at the shape. Once you have seen the difference between a plateau and a spike on a crossover, you will recognise it in strategies where the parameter space is too large to visualise.

Finally it demonstrates regime dependence in its purest form, because the rule has no filters to muddy the picture. Whatever a crossover does in trends and ranges, every trend-following rule does some version of the same thing.

How does QuantParadox test a rule like this?

QuantParadox grades crossover rules the same way as anything else: out-of-sample by default, across a decade of minute-resolution history on thirty instruments, with costs modelled explicitly rather than assumed.

The out-of-sample default is what addresses the specific weakness of this rule. Parameters fixed on one period must survive a period they never saw, which is precisely the check that separates a genuine trend-following edge from the best cell of a grid search. Walk-forward grading extends this by repeatedly re-fixing and re-grading, which is closer to how the rule would be used in practice.

The Reconciliation module answers the regime question directly, identifying which conditions carry the strategy and which quietly bleed it, rather than reporting one pooled number that averages trends and ranges into a figure describing neither.

Rules this simple can be described in a sentence of plain English, and the same grading applies to an imported MT5 expert or Pine script built on the same logic, so a crossover you already run elsewhere can be held to the same standard without rewriting it.

Questions people actually ask

What are the best moving average settings?

There is no setting that is best in a general sense, and any specific pair recommended without reference to instrument, timeframe and test period is a parameter someone found on their own data. The more useful question is whether performance holds across a neighbourhood of nearby settings, since a rule that only works at one exact combination is showing a search artefact rather than an effect.

Is an EMA better than an SMA for crossovers?

An exponential average weights recent prices more heavily and therefore crosses earlier, which produces more trades and faster reactions. Whether that helps depends on whether the earlier signals are informative or premature, and the answer varies by instrument and timeframe. Treat the choice as a third parameter to be fixed in advance and graded out-of-sample rather than as a settled question.

Should a crossover strategy use a stop loss?

A pure crossover rule exits on the opposite cross, which functions as an exit but not as a risk control, since the distance to that exit is unbounded. Adding a stop introduces a new parameter and changes the strategy materially, so the version with a stop needs its own test rather than inheriting the results of the version without one. Compare both on identical data before assuming the stop improves matters.

The only backtest that settles it is yours.

Build a strategy from a sentence, paste your own Python, or import your live trade history and have it graded. Five full backtests free, no card, and we'll tell you plainly when the result is indistinguishable from luck.

We publish research and tooling, not trading advice, and we make no claim about future returns. Everything above describes how to test an idea — not a reason to trade one.