Moving average crossover: what it is and how to test it
A trend-following rule: own the investment while its recent average price is above its longer-run average, and step aside when it is below.
Open the moving average study →
The idea
A moving average is the average closing price over the last so many days. A 50-day average follows recent prices closely. A 200-day average moves slowly and shows the longer direction.
A crossover rule compares the two. When the short average climbs above the long one, prices have been rising faster lately than over the long run, and the rule buys. When it drops below, the rule sells and waits in cash.
A small example
Take round, made-up numbers. A fund has averaged $98 over the last 200 days and $101 over the last 50. The short average is above the long one, so the rule is invested. Prices then slide for two months and the 50-day average falls to $96. It is now below the 200-day average, so the rule sells at the next opportunity and holds cash until the short average climbs back above.
What it is trying to do
The rule does not predict anything. It reacts. Its aim is to miss the middle of long declines, at the cost of selling late and buying back late. In a long steady rise it tends to trail simply holding, because every false alarm costs a little. In a market that goes sideways it can lose repeatedly, buying after small rises and selling after small falls.
How to test it fairly
- Compare with holding. The question is never whether the rule made money. It is whether it did better than buying on day one and doing nothing.
- Choose on one period, judge on another. If you try twenty pairs of averages and report the best, you have measured luck. Pick the pair on the early history and judge it on the later history it never saw.
- Count costs and cash. Each trade costs something, and money waiting in cash earns interest. Both change the answer.
- Look at the falls, not only the return. A rule that returns less but halves the worst decline may still be the one a person can stick with.
What the study on this site does
The Research Lab study tests nineteen pairs of averages, picks one using only the first 70% of the history, and reports that pick on the final 30%. It shows every other pair too, so you can see whether the result depends on one lucky choice. Signals use the closing price and trades are filled at the next day’s open.
Common questions
- What is a golden cross?
- It is the name for a 50-day moving average rising above a 200-day moving average. The opposite, the 50-day falling below the 200-day, is called a death cross. Both are crossover signals with dramatic names.
- Does a moving average crossover work?
- It depends on the market and the period. It tends to help in long declines and to cost money in sideways markets. The only honest way to answer for a particular investment is to test it against simply holding, on a period that was not used to choose the settings.
- Which moving averages are best?
- There is no best pair. A pair that looks best on past data was often just lucky on that data. If many nearby pairs give similar results, the idea is sturdier than if one pair stands alone.
Try it
Reading about a rule is not the same as watching it run. The study is free, needs no account, and starts on practice data.
More guides
Educational explanation with illustrative examples. Not financial advice, and not a recommendation to use any strategy.