Moving average crossover backtest: test a golden cross or 50/200 rule
Type the crossover the way you would say it out loud, such as "buy SPY when the 50-day moving average crosses above the 200-day and sell when it crosses back below", and the bench tests it on 20+ years of split- and dividend-adjusted daily history with every assumption printed, then puts it beside simply buying and holding.
- 1 THESIS
- 2 EVIDENCE
- 3 BACKTEST
- 4 RISK
- 5 VERDICT
02 EVIDENCE · FUNDAMENTALS
04 RISK · IN PLAIN ENGLISH
Sample scenarios, not a live backtest of what you typed. Past performance does not guarantee future results. Educational analysis only, not financial advice.
In short
A moving average crossover backtest applies a two-average rule to historical prices and reports what the rule actually did: when it caught the trend, how many times it flipped you in and out for nothing, how deep the drawdown still went, and whether the whole exercise beat holding the same ticker. The most-tested version is the golden cross, where the 50-day simple moving average crosses above the 200-day (the reverse, 50 below 200, is the death cross). In AgentTrading you describe the rule as a sentence, confirm the restated rule, and the test runs on 20+ years of split- and dividend-adjusted daily history with the assumptions strip on every result: the two lookback lengths, simple or exponential, whether signals fill on the close or the next open, where the money sits when you are out, and the 0.1% cost per trade assumed by default. Two things are worth knowing before you run one. First, published win rates for the golden cross disagree wildly, from 79% to 93%, because each publisher counts a different thing as a win, and the one source that shows its full trade list also reports that buy-and-hold beat the strategy on raw annual return. Second, the academic record on these rules reversed: Brock, Lakonishok and LeBaron found strong support for moving average rules on 90 years of Dow data in the Journal of Finance in 1992, and Sullivan, Timmermann and White re-ran a much larger rule universe over 100 years of the same index in 1999, corrected for data snooping, and found the performance did not carry into the following decade. That is the case for testing the rule on your own ticker and window rather than trusting a headline. Crossover backtesting is on the Analyst plan at $49 a month. No trades are executed, nothing is recommended, and the output is educational analysis only: past performance does not guarantee future results.
Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.
THE SAME SIGNAL, FOUR ANSWERS
Four publishers, four different golden cross "win rates"
These four sources all describe the 50/200 golden cross on the S&P 500, and they publish win rates of 79%, 82% and 93% plus one that gives no win rate at all. None of them is lying. They are counting different things, and the differences are invisible unless you line them up.
| Published source | Window described | Signals counted | Headline win rate | What a "win" means there |
|---|---|---|---|---|
| edgeful | S&P 500, 66 years | 33 completed trades | 79% | A full round trip, in at the golden cross and out at the death cross, closed at a profit. 26 of 33. |
| ChartMini | S&P 500, 1950 to 2025 | Not stated | 82% | The index was higher 12 months after the signal, whether or not you ever sold. Average gain 14.3%. |
| SNP Edge | S&P 500, window not stated | Not stated | 93% | The market was higher a year later. The article does not publish the underlying signal list. |
| Widely repeated market note | S&P 500, past 50 years | 25 crossovers | None given | Reports average forward returns at 10, 20, 40, 80, 160 and 320 days instead of counting wins. |
The detail that matters is buried in the source with the highest transparency and the lowest headline number. edgeful, the only one of the four that publishes the full trade list, also reports that buy-and-hold beat the golden cross on raw annual return, 7.2% against 6.8%. The rule's real argument was never return: it was invested only 70% of the time and its worst drawdown was 33% against 56% for buy-and-hold. So a "79% win rate" headline describes a strategy that lost the return contest and won the drawdown one, and none of the three headline percentages tells you that. Run it on your own ticker, your own window, and your own definition of a win.
Figures as published by each source and checked on August 29, 2026. These are third-party claims reproduced for comparison, not our own measurements, and vendors and bloggers revise them. Verify at the source before relying on any of them. Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.
WHAT YOU GET - MOVING AVERAGE CROSSOVER
Moving average crossover, run on the bench
Every whipsaw is drawn, not averaged
A crossover rule pays for its good trends with long choppy stretches. Each false signal, each round trip that cost a fee and went nowhere, and each rally you sat out in cash appears on the chart instead of dissolving into an annualized number.
Both lookbacks are yours to change
50 and 200 is a convention, not a finding. Test 20/100, 10/50, or exponential instead of simple, and see how much of the result was the idea and how much was the two numbers you inherited from everybody else.
Costs and turnover charged up front
Crossovers trade rarely on an index and constantly on a volatile single name. Trades are charged at 0.1% each by default and the trade count is on the result, so a rule that only works when trading is free shows itself immediately.
Benchmarked against doing nothing
The comparison that settles a crossover is holding the same ticker straight through. HELD UP, MIXED and UNDERPERFORMED are stamped honestly, and the golden cross on a large-cap name is one of the rules that most often comes back UNDERPERFORMED.
HOW IT WORKS - 4 STEPS
From a sentence to a stamped verdict
Describe the crossover
One sentence with the parts that matter: the ticker, the fast average, the slow average, simple or exponential, and what you hold after the downward cross.
Confirm the restated rule
The two lookback lengths, the average type, the fill convention, and where cash sits between signals are shown as an explicit card before anything runs. Adjust it until it matches what you meant.
Run it across 20+ years
The rule tests on split- and dividend-adjusted daily history with a cost charged per trade, plotted against buy-and-hold on the same ticker, with the worst drawdown window shaded.
Read the trade count and the verdict
How many crossings fired, how many were whipsaws, how the rule behaved in 2008 and through the 2009 turn, and whether the sample is big enough to mean anything. In plain English, never as a recommendation.
Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.
On the same bench
A crossover is the simplest member of the trend family, so it sits next to momentum backtesting for lookback-based trend rules and inside the general engine on backtesting software. The step-by-step walkthrough of the rule itself is the moving average crossover strategy, and the platform comparison for testing one is the best backtesting software for moving average strategies. Turn the sentence into a rule card in the trading strategy builder, check the adjusted record behind every run on historical stock data, and read why a lagging entry still leaves you a deep drawdown on investment risk analysis. The opposite premise, fading the move instead of following it, is on mean reversion trading, and the sample-size question every crossover test runs into is answered on how long you should backtest. Swing traders should see AI swing trading tools; plans start at $19 a month.
QUESTIONS - ASKED AND ANSWERED
Moving average crossover: the common questions
Does the moving average crossover strategy work?
It works as a drawdown reducer far more reliably than as a return generator, and the published evidence says so plainly once you read past the headline. The most transparent public backtest of the S&P 500 golden cross reports 26 wins in 33 trades yet a lower annual return than buy-and-hold, 6.8% against 7.2%, with a 33% worst drawdown against 56%. You are trading return for a smoother ride, and on a single volatile stock even that trade is not guaranteed.
How do you backtest a moving average crossover?
Fix five things before you run anything: the ticker, the fast and slow lookback lengths, simple or exponential, whether you fill on the signal close or the next open, and what you hold when you are out of the market. Then run it on long split- and dividend-adjusted history with a realistic cost per trade and compare it against holding the same ticker. In AgentTrading you type that as a sentence, confirm the restated rule card, and read the result with all five assumptions printed on it.
What is the best moving average crossover?
There is no best pair, and the search for one is how crossover strategies get overfitted. 50/200 is the most watched because it is the most watched, which gives it some self-fulfilling weight on major indices, while faster pairs such as 10/50 or 20/100 react sooner and whipsaw far more. The practical test is stability: run your pair and its neighbors, and if 50/200 works but 45/190 and 55/210 do not, you have found an artifact rather than a strategy.
Is the golden cross a reliable buy signal?
It is a lagging confirmation rather than a timing tool, and the lag is the whole story. By the time the 50-day crosses the 200-day the price has typically already risen well off the low, so you buy after a chunk of the move. On a broad index it has historically been more right than wrong about direction; on individual stocks and in sideways markets it produces long strings of false starts. Treat it as evidence about trend, not as a trigger you follow unquestioned.
What is the difference between a golden cross and a death cross?
A golden cross is the 50-day moving average crossing above the 200-day, usually read as a shift into an uptrend. A death cross is the same two averages crossing the other way, 50 below 200. The name is more dramatic than the record: one published tally of S&P 500 death crosses since 1950 found the index was still higher 12 months later 65% of the time, which is why treating the death cross as an automatic exit has historically cost people more than it saved.
Should I use SMA or EMA for a crossover strategy?
An exponential moving average weights recent prices more heavily, so an EMA crossover fires earlier than the simple version on the same lookbacks. Earlier means you catch real turns sooner and also catch more false ones, so EMA pairs generally trade more and cost more in fees and slippage. Neither is better in the abstract. Run the same lookbacks both ways on your ticker and let the trade count and the net-of-cost result decide.
How far back should a moving average crossover backtest go?
Far enough to include at least one full bear market and enough signals to mean something statistically. A 50/200 crossover on an index fires roughly once every two years, so a 10-year window may give you only five round trips, which is far too few to judge. Twenty years and a couple of dozen signals is a workable floor, and it is why the bench runs on 20+ years of adjusted daily data by default and flags results where too few signals fired.
Why do published golden cross win rates disagree so much?
Because each publisher silently redefines the word win. One counts completed round trips that closed at a profit and gets 79%. Another asks only whether the index was higher 12 months after the signal, ignoring whether you ever sold, and gets 82%. A third asks the same 12-month question over an unstated window and gets 93%. They also use different start dates, different indices and sometimes exponential rather than simple averages. The comparison table above lines all four up, and the lesson is to define your own win condition and test it.
Can I backtest a moving average crossover without coding?
Yes. Writing a crossover in Pine Script or Python is a few lines, but the coding is not where people go wrong; the assumptions are. AgentTrading takes the rule as an English sentence, restates it as a card you approve, and prints the lookbacks, average type, fill convention and cost assumption on the output so two tests are actually comparable. No script, and no hidden defaults doing the work for you.
Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.
Your next idea deserves a verdict, not a hunch.
Bring a thesis or a ticker. AgentTrading restates the rule, shows the evidence, runs 20+ years of history, and stamps an honest verdict. You decide.
Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.