Backtest › Golden cross

Golden cross backtest · does the 50/200-day signal beat buying and holding?

Buy when the 50-day average crosses above the 200-day, step aside when it crosses back below. Pick a market, change the averages, the start year and the trading cost, and every number below reruns on daily prices. Free, no sign-up.

Loading S&P 500 price history…

The rule
  1. 1. Two averages. The fast one (50 days) follows the recent trend; the slow one (200 days) the long-run trend.
  2. 2. Golden cross: in. Fast closes above slow, buy at the next day's close.
  3. 3. Death cross: out. Fast closes below slow, sell (or go short) at the next day's close.
  4. 4. Nothing else. No stops, no targets, no judgment. That is the point: it tests the signal alone.
Why it can work
  • Trends persist. Markets that have been rising for months tend to keep rising more often than not, and the same for falling.
  • It sidesteps long bear markets. Crashes that unfold over months, like 2000-02 and 2008, usually trigger a death cross early enough to miss much of the fall.
  • It removes emotion. The rule decides, so there is no panic selling at the bottom or buying at the top.
Where it fails
  • Lag. A 200-day average turns slowly: the rule buys well after the bottom and sells well after the top.
  • Whipsaws. In sideways markets the averages cross back and forth, and each false signal costs a little. Watch the trade count and win rate.
  • Fast crashes. A drop like March 2020 is over before the averages cross, so the rule sells near the low and buys back higher.
Questions
What is a golden cross?
A golden cross is when a short moving average of price, usually the 50-day, rises above a long one, usually the 200-day. It says the recent trend has turned up relative to the long-run trend. The opposite, the 50-day falling below the 200-day, is a death cross.
How does this golden cross backtest work?
Every day it checks whether the fast average is above the slow one at the close. When a cross happens, it trades at the next day's close, so it never uses a price it couldn't have known. Above means invested; below means cash, or short if you pick long or short. Each trade pays the cost you set, each way.
Does the golden cross beat buy and hold?
Usually not on total return: by sitting in cash after death crosses it misses some rebounds, and the averages lag. What it tends to do is cut the worst drops, because it is out of the market for much of long bear markets. Run it on each market above and see; the answer differs by market and by period.
Why 50 and 200 days?
Convention. The 50-day is roughly a quarter of trading and the 200-day roughly a year. The table of pairs on this page runs other combinations at once, so you can see whether 50/200 is special or just familiar.
SMA or EMA?
A simple moving average (SMA) weights every day equally. An exponential one (EMA) weights recent days more, so it turns sooner, catching moves earlier but giving more false signals. Toggle both and compare the trade count.
What does this test leave out?
Dividends and interest on cash (both would add to the results), taxes, and the roll costs of futures. Index results are on the index itself, not a fund. Past results don't promise future ones, and this is not investment advice.

Data: daily closes of the S&P 500 (since 1950), Nasdaq 100 (1985), Russell 2000 (1987) and continuous front-month futures for gold, silver, crude oil, copper and natural gas (2000). Futures roll gaps are not adjusted. Updated weekly. Hypothetical results, not investment advice.

How are we doing?