BACKTEST RESULTS

Golden cross strategy backtest results

SPY daily data, 2016 to 2026: the 50/200 rule, long and short, made 20.1% after costs over 8 trades, winning 50.0% of them, against +277.8% for holding SPY. Long only it made 95.4%. The best of 10 runs was 50/200 on NVDA, long only: +4114.9%, held-out too few trades to judge. Every run, every trade and the script are on this page.

SPY · daily data · 50/200 · long and short
Net after costs
+20.1%
Holding SPY
+277.8%
Trades
8
Win rate
50.0%
Profit factor
1.68
Max drawdown
42.0%
Held out, last third: too few trades to judge
Long only: +95.4% on 4 trades, held-out too few trades to judge
4 January 2016 to 23 October 2026
  • Checked 25 October 2026
  • Alpaca daily data since 2016
  • 0.05% commission + 0.025% slippage per fill
  • last third of the history held out
  • 10 runs, 66 trades
  • Updated 1 November 2026

The short answer

Answers here: Does the golden cross work? · How often does it fire? · Does it beat holding the stock? · Should the death cross short?

SPY daily data, 4 January 2016 to 23 October 2026, long and short: 8 trades, made 20.1% after costs, 50.0% of trades won, profit factor 1.68, worst drawdown 42.0%, 73% of the time in the market. Holding SPY returned +277.8% over the same period.

The held-out third (16 March 2023 to 23 October 2026) had 2 trades, too few to judge.

Long only, the same rule made 95.4% on 4 trades (75.0% won, profit factor 9.64, held-out too few trades to judge): the short side cost 75.2 points of return in a period when SPY rose 277.8%.

Across all 10 runs on this page, 10 made money after costs, 1 survived the held-out third, and 0 beat holding the symbol (10 had too few trades to judge).

The best run was 50/200 on NVDA, long only: +4114.9% net on 3 trades, no losing trades, worst drawdown 37.5%, held-out too few trades to judge. The tester's verdict on it reads "too few trades to judge".

One symbol's past after modelled costs is not a forecast. Prices are split-adjusted and not dividend-adjusted, so every return here is a price return; the period includes a long rise with two sharp falls, and a rule that is often long did well for that reason as much as any other. These are research results, not investment advice.

What the script does

SMA Cross Strategy (golden cross), from the strategy library.

Goes long when the 50-day simple moving average crosses above the 200-day (the golden cross). In the two-way version the death cross, the 50 crossing below the 200, closes the long and opens a short; in the long-only version it only closes the long. A stop sits 2 ATR away. Five names were run both ways.

The indicator itself, with its Pine code drawn on real market data: Moving Average Crossover.

The numbers, run by run

Net and holding the symbol are after costs over the same period. Held-out is the verdict on the last third of the history judged alone: survived, decayed, did not survive, or too few trades to judge.

SymbolTimeframeSettingsDirectionTradesWin rateNetHoldingProfit factorMax drawdownHeld-out
SPYdaily50/200long and short850.0%+20.1%+277.8%1.6842.0%too few trades to judge
QQQdaily50/200long and short862.5%+166.5%+542.3%5.1329.4%too few trades to judge
AAPLdaily50/200long and short1040.0%+35.9%+1219.6%2.1765.7%did not survive
NVDAdaily50/200long and short683.3%+2259.6%+25955.3%27.9049.1%too few trades to judge
MSFTdaily50/200long and short1233.3%+72.6%+856.6%3.2256.4%did not survive
SPYdaily50/200long only475.0%+95.4%+277.8%9.6434.2%too few trades to judge
QQQdaily50/200long only4100.0%+253.1%+542.3%no losing trades28.4%too few trades to judge
AAPLdaily50/200long only560.0%+280.6%+1219.6%13.3431.7%too few trades to judge
NVDAdaily50/200long only3100.0%+4114.9%+25955.3%no losing trades37.5%too few trades to judge
MSFTdaily50/200long only650.0%+234.5%+856.6%12.4528.3%survived

Year by year

50/200 on SPY, long and short, the same rule long only, and SPY itself, each calendar year after costs. A partial first or last year counts the sessions it has.

Year50/200, long and short50/200, long onlyHolding SPY
20160.0%0.0%+11.2%
20170.0%0.0%+18.5%
2018+4.6%0.0%-6.9%
2019-2.2%+12.4%+28.6%
2020-23.2%-4.7%+15.1%
2021+28.8%+28.8%+28.8%
2022-8.4%-12.2%-19.9%
2023+6.4%+15.4%+24.8%
2024+24.0%+24.0%+24.0%
2025-11.6%+1.8%+16.6%
2026+11.2%+11.2%+11.2%

Every trade

The 8 trades of 50/200 on SPY, long and short, oldest first: side, entry and exit days, fill prices after slippage, and the return after both commissions. The other runs' trades open below.

SideInOutEntryExitReturn
short2018-12-102019-04-02263.29286.12-8.8%
long2019-04-022020-03-31286.12260.50-9.1%
short2020-03-312020-07-10260.50314.34-20.8%
long2020-07-102022-03-15314.34419.66+33.4%
short2022-03-152023-02-03419.66411.70+1.8%
long2023-02-032025-04-15411.70539.54+31.0%
short2025-04-152025-07-02539.54617.40-14.5%
long2025-07-022026-10-23617.40759.72+23.0%

The script

Pine v6, exactly as it ran for 50/200 on SPY, long and short. The variants change only the inputs listed in the table.

//@version=6
strategy("SMA Cross Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, initial_capital=100000, commission_type=strategy.commission.percent, commission_value=0.05, slippage=1, margin_long=0, margin_short=0)

src      = input.source(close, "Source", group="Lengths")
fastLen  = input.int(50, "Fast SMA", minval=1, group="Lengths")
slowLen  = input.int(200, "Slow SMA", minval=2, group="Lengths")
useLong  = input.bool(true, "Trade longs", group="Direction")
useShort = input.bool(true, "Trade shorts", group="Direction")
atrLen   = input.int(14, "ATR length", minval=1, group="Risk")
stopMult = input.float(0, "Stop (ATR multiples, 0 = off)", minval=0, step=0.5, group="Risk")

fast = ta.sma(src, fastLen)
slow = ta.sma(src, slowLen)
atr  = ta.atr(atrLen)

longSig  = ta.crossover(fast, slow) and barstate.isconfirmed
shortSig = ta.crossunder(fast, slow) and barstate.isconfirmed

pFast = plot(fast, "Fast SMA", color=color.new(#16A56A, 0), linewidth=2)
pSlow = plot(slow, "Slow SMA", color=color.new(#E5484D, 0), linewidth=2)
fill(pFast, pSlow, color=fast > slow ? color.new(#16A56A, 90) : color.new(#E5484D, 90), title="Trend fill")

if longSig
    strategy.close("Short")
    if useLong
        strategy.entry("Long", strategy.long)
        strategy.exit("Long stop", "Long", stop=stopMult > 0 ? close - stopMult * atr : na)
if shortSig
    strategy.close("Long")
    if useShort
        strategy.entry("Short", strategy.short)
        strategy.exit("Short stop", "Short", stop=stopMult > 0 ? close + stopMult * atr : na)

How it was tested

Alpaca daily data since 2016, 0.05% commission and 0.025% slippage on every fill, the last third of the history held out, textbook settings and nothing tuned. The engine, fills and what it does not model are written out once, in data and methodology.

Run the Golden cross strategy on your own symbol, free

Describe the rule in your own words or paste the script. The Free plan writes the Pine v6 script with the AI, runs it on any US stock or ETF with the same costs and the same held-out check, and shows every trade on the chart. No card.

Every strategy tested

Seventeen popular rules through the same engine, the same costs and the same held-out check, with every trade listed. Next: EMA crossover strategy, Moving average strategy, Trailing stop strategy.

Questions

Does the Golden cross strategy work?

SPY, daily data, 2016 to 2026, long and short: 50/200 made 20.1% after costs over 8 trades (50.0% won, profit factor 1.68) against +277.8% for holding SPY, and the held-out third had too few trades to judge. Long only it made 95.4%. Across all 10 runs on the page, 10 made money after costs, 1 survived their held-out third and 0 beat holding the stock.

What is the win rate of the Golden cross strategy?

From 33.3% to 100.0% across the 10 runs. The classic setting, 50/200 on SPY long and short, won 50.0% of 8 trades. The win rate alone does not decide the result: that run's profit factor was 1.68, so its winners outweighed its losers, and the net return was +20.1%.

Is the Golden cross strategy better long only?

On SPY it was: long only made 95.4% against made 20.1% traded both ways, with held-out verdicts of too few trades to judge and too few trades to judge. In a period when SPY returned +277.8%, shorting the pullbacks of an index that kept rising is where the money went; a different period could reverse that.

Does the Golden cross strategy beat holding the stock?

0 of the 10 runs did. SPY itself returned +277.8% between 4 January 2016 and 23 October 2026, so a rule that is out of the market part of the time has a lot to make up; what a timing rule usually gets you is a smaller drawdown, not a bigger return. The classic run's worst drawdown was 42.0% with 73% of the time in the market.

Did the Golden cross strategy hold up out of sample?

The last third of every run's history (16 March 2023 to 23 October 2026 for the lead run) was judged on its own, with no fitting on it: 1 of 10 runs survived, 0 decayed, 2 did not survive and 7 had too few trades there to judge. Survived means a positive Sharpe ratio on the held-out part at least half the fitted period's; it is a check on one later stretch, not a forecast.

How was this tested?

With the free Alpha Charts tester's own engine: the Pine v6 scripts on this page, run on Alpaca daily data since 2016, split-adjusted and not dividend-adjusted, one position at a time with the whole account, fills at the next candle's open, a commission of 0.05% and slippage of 0.025% on every fill, the last third of the history held out. The settings are the textbook ones and every variant is stated; nothing was tuned to make the page look better.

Every number on this page is the output of the Alpha Charts backtest engine on 25 October 2026, on Alpaca market data; the scripts are the strategy library's templates, shown as they ran. Symbols are US-listed ETFs and stocks; results are price returns after the costs stated. Past results are not a forecast and nothing here is investment advice. TradingView and Pine Script belong to TradingView, Inc.; Alpha Charts is not affiliated with it.