Strategy briefing

Understand what this strategy is actually betting on before you touch the parameter panel.

01
Start with the intuition
02
Use category and difficulty as context
03
Compare before optimizing
01
Map the strategy to a regime thesis
02
Read the math as a constraint system
03
Use parameters to test fragility, not creativity
Learning linkup

Read the model brief like a skeptic

Open Learning Hub

The Intuition

Moving average crossover is arguably the oldest systematic trading rule. The logic is intuitive: a short-term moving average tracks recent price behaviour, while a long-term moving average reflects the slower underlying trend. When the fast average crosses above the slow average, momentum is turning positive — a trend has emerged. When it crosses below, momentum is deteriorating.

The historical evidence for MA crossovers predates modern finance. Brock, Lakonishok, and LeBaron (1992) studied simple moving average rules on the DJIA from 1897 to 1986, finding that they generated significant positive returns even after adjustment for risk. More recently, Faber (2007) showed that a simple 10-month MA rule applied to the S&P 500 produced Sharpe ratios close to the index while dramatically reducing drawdowns, cutting maximum drawdown from ~83% to ~26%.

The MA crossover is essentially a trend-filter: it positions you on the right side of the trend while filtering out high-frequency noise. By using the cross of two averages rather than one average with a fixed threshold, the rule adapts to the price level of the asset and generates fewer whipsaw trades than a single-average rule (which would trigger on every touch of the average).

Key assumptions: (1) Trends are persistent enough to be captured by the MA window — if mean reversion dominates (as in range-bound markets), the strategy generates many false signals. (2) The parameters (fast/slow windows) are chosen to match the typical trend duration in the market. A 10/50 day combination suits intermediate trends; a 50/200 day combination (the "Golden Cross") is used for long-term trend signals. (3) Transaction costs are low enough that the signals are tradeable profitably.

The strategy's Achilles heel is whipsawing: in choppy, sideways markets, the fast and slow averages constantly cross each other, generating many small losses that erode capital even when no single trade is catastrophic. This is why MA crossover strategies are most effective on liquid, trending instruments like equity indices, government bond futures, and major commodity futures.

The Math

Read this as a compact model summary: what the signal sees, what it ignores, and where fragility can creep in.

SMA_fast(t) = mean(Close[t-fast : t])
SMA_slow(t) = mean(Close[t-slow : t])

Signal(t) = +1  if SMA_fast(t) > SMA_slow(t)
          = -1  if SMA_fast(t) < SMA_slow(t)

Parameters

ParameterTypeDefaultDescription
fast int 10 Fast SMA window in trading days
slow int 50 Slow SMA window in trading days

Source Code

Live source — fetched from engine/strategies/ma_crossover.py

Loading source…

Further Reading

  • Faber, M. (2007). A Quantitative Approach to Tactical Asset Allocation. Journal of Wealth Management, 9(4), 69–79.
  • Chan, E. (2013). Algorithmic Trading, Ch. 2. Wiley.
  • Brock, W., Lakonishok, J. & LeBaron, B. (1992). Simple Technical Trading Rules and the Stochastic Properties of Stock Returns. Journal of Finance, 47(5), 1731–1764.
Run This Strategy →

Related Momentum Strategies

Use nearby strategies to compare the same market hypothesis under different signal constructions.