Skip to content
QUANTGPT
// Strategy test · 200-day moving average

Does the 200-day moving average beat buy and hold?

The rule: hold SPY in a month that starts with SPY at or above its 200-day average, hold cash in a month that starts below it. We ran it from January 1998 to September 2026 against the S&P 500 with dividends, bought and held, and kept every year, the losing ones included.

· run October 27, 2026 · data through September 30, 2026 · gross of costs

// The short answer

Not on growth. From January 1998 to September 2026 the 200-day rule on SPY grew 8.97% a year, against 9.38% for the S&P 500 with dividends bought and held, gross of costs. It fell far less: its worst fall from a peak was -23.0% against -50.9%, and its Sharpe ratio was 0.88 against 0.66. It lost money in 5 of 29 calendar years and trailed the index in 21.

QuantGPT labels a result TRADE-OFF when a rule beats its benchmark on one of growth and Sharpe and not the other. It describes what the data did over this window; it is not a prediction.

// The rule we tested

At each month-end close, look at SPY against its own 200-day simple moving average. At or above it: hold SPY for the next month. Below it: hold cash for the next month, earning nothing. The book is set at that close and held to the next one, so the rule never uses a price it could not have seen. No stops, no leverage, nothing tuned to the result.

The benchmark is the S&P 500 total return index ($SPXTR), dividends reinvested, bought once and held. SPY is measured at its total-return adjusted close, so its dividends count too.

// Results, February 1998 to September 2026

One run, 2026-10-27: run_backtest over QuantGPT's MCP · 344 months · gross of costs
200-day ruleS&P 500 with dividends
Growth a year8.97%9.38%
$1 grew to$11.74$13.07
Worst fall from a peak-23.0%-50.9%
Sharpe ratio0.880.66
Volatility a year10.4%15.4%
Months with a gain50.6%64.5%
Months in the market257 of 344344 of 344
Trades39bought once

A month in cash returns exactly zero, so it never counts as a month with a gain. The Sharpe ratio is the mean monthly return over its standard deviation, annualized, with no T-bill rate subtracted from either side.

200-day rule: $1 to $11.74 S&P 500 with dividends: $1 to $13.07 Rule in cash

Growth of $1, the 200-day rule on SPY against the S&P 500 with dividends, Jan 1998 to Sep 2026 Log scale. $1 in the rule grew to $11.74; $1 in the S&P 500 with dividends grew to $13.07. Shaded bands are the 87 months the rule held cash. Month-end closes, gross of costs, as of Sep 30, 2026. $1 $2 $4 $8 $16 2000 2005 2010 2015 2020 2025 GROWTH OF $1, LOG SCALE AS OF SEP 30, 2026
Growth of $1 at each month-end close, log scale, from January 30, 1998 to September 30, 2026. The shaded bands are the 87 months the rule held cash. Gross of costs and taxes.

200-day rule S&P 500 with dividends

Fall from the last peak, the 200-day rule on SPY against the S&P 500 with dividends The rule's deepest fall was -23.0%, from Dec 2021 to Feb 2023. The S&P 500 with dividends fell -50.9%, from Oct 2007 to Feb 2009. Month-end closes only, so falls inside a month are not seen. As of Sep 30, 2026. 0% -10% -20% -30% -40% -50% 2000 2005 2010 2015 2020 2025 -50.9% -23.0% FALL FROM THE LAST PEAK AS OF SEP 30, 2026
How far each one stood below its own last peak, at month-end closes. Falls inside a month are not seen, so the true lows were deeper. The rule's worst came in 2022, when it went in and out of SPY on the way down.

// Where it lost

The rule lost money in 5 calendar years: 2000 (-1.5%), 2002 (-5.8%), 2011 (-1.9%), 2015 (-4.3%) and 2022 (-21.0%). In 2022 the index fell 18.1%, and the rule fell further: it was in SPY for January, February, April and December, all losing months, and in cash for July, October and November, the year's three best.

It trailed the index in 21 of 29 calendar years. In 6 of them the gap was under half a point: in a year the rule held SPY all twelve months, it trailed by up to 0.4 points, because SPY carries a fund fee and the index does not. The large gaps came from rebounds the rule sat out:

The five largest calendar-year gaps against the index
Year200-day ruleS&P 500 with dividendsGap, pointsWhat it missed
201910.0%31.5%-21.5In cash for January (+8.0%), February (+3.2%) and June (+7.0%)
20238.8%26.3%-17.5In cash for January (+6.3%) and November (+9.1%)
199810.5%27.2%-16.7Held SPY through August (-14.1%), then in cash for September (+6.4%) and October (+8.1%)
2026January to September2.0%12.7%-10.7Held SPY through March (-4.9%), then in cash for April (+10.5%)
199913.1%21.0%-7.9In cash for October (+6.3%)

The pattern is the same each time. A monthly check sells after a fall has already happened, and the market's sharpest months often come straight after its worst ones. A rule that is out for that month gives up the rebound.

// Where it helped

The index's five deepest falls at month-end closes, and what the rule did over the same months:

S&P 500 with dividends, peak to low at month-end closes, against the rule over the same months
MonthsS&P 500 with dividends200-day rule
Oct 2007 to Feb 2009-50.9%-5.0%
Aug 2000 to Sep 2002-44.7%-11.0%
Dec 2021 to Sep 2022-23.9%-16.1%
Dec 2019 to Mar 2020-19.6%-8.0%
Jun 1998 to Aug 1998-15.4%-15.3%

The two long bear markets are where the rule earned its smaller fall: it held cash for all of 2001 and 2008. In the fast drop of 1998 the month-end check came too late, and the rule fell as far as the index; in 2020 it fell 8.0% against 19.6%.

// Before and since 2015

The same run split at January 1, 2015 · gross of costs
200-day ruleS&P 500 with dividends
Growth a year, Feb 1998 to Dec 20149.02%6.21%
Sharpe ratio, Feb 1998 to Dec 20140.910.47
Worst fall, Feb 1998 to Dec 2014-15.3%-50.9%
Growth a year, Jan 2015 to Sep 20268.91%14.17%
Sharpe ratio, Jan 2015 to Sep 20260.840.97
Worst fall, Jan 2015 to Sep 2026-23.0%-23.9%

Before 2015 the rule was ahead on growth, Sharpe and worst fall. From 2015 it trailed on growth and on Sharpe, and its worst fall was about the same as the index's. The 200-day average was a public rule long before 2015, so the later years are a weaker test than a true holdout, not a stronger one.

// Variants and costs

Four runs, 2026-10-27, each against its own benchmark bought and held · gross of costs
RunGrowth a yearSharpeWorst fallFinding
SPY above its 200-day average, checked monthly, cash earns 0% this page's run; Feb 1998 to Sep 2026; against $SPXTR8.97% index 9.38%0.88 index 0.66-23.0% index -50.9%TRADE-OFF
The same, checked weekly 103 trades; Jan 1998 to Oct 23, 2026; against $SPXTR6.50% index 9.34%0.61 index 0.59-35.1% index -54.7%TRADE-OFF
S&P 500 with dividends above its 10-month average, cash earns T-bills run_market_timing sma10m on $SPXTR; Jan 1998 to Oct 26, 20268.55% index 9.38%0.83 index 0.66-21.5% index -50.9%TRADE-OFF
S&P 500 price index above its 10-month average, cash earns T-bills run_market_timing sma10m on $SPX; Jan 1928 to Oct 26, 2026; no dividends on either side; cash 0% before 19347.41% index 6.35%0.67 index 0.43-51.4% index -86.0%TRADE-OFF

Checking every week instead of every month traded 103 times instead of 39 and grew 6.50% a year instead of 8.97%: more checks meant more whipsaws. The long run from 1928 beat the price index on growth and Sharpe overall, but from 2015 it trailed on both (6.61% against 11.76% a year), which is why it too reads TRADE-OFF. Its -51.4% worst fall ran from August 1929 to February 1933: the rule held stocks through the October 1929 crash, sat in cash from November 1929 to August 1932 (missing the +36% and +39% months of July and August 1932), and was back in for the falls of late 1932 and February 1933.

The monthly 200-day rule at four cost levels, per side, on its actual turnover (the engine's cost model)
Cost a sideGrowth a yearSharpeWorst fall
None (gross)8.97%0.88-23.0%
5 basis points8.83%0.87-23.4%
10 basis points8.68%0.86-23.9%
25 basis points8.24%0.82-25.3%
50 basis points7.50%0.75-27.6%

Taxes are not modelled. Each move to cash would realize any gain in SPY, which a buyer and holder defers.

// Every year

Calendar years, 1998 to 2026
Calendar-year returns from month-end closes · below zero in red; a negative gap is a year the rule trailed · gross of costs
Year200-day ruleS&P 500 with dividendsRule minus indexMonths in SPY
1998 February to December10.5%27.2%-16.79 of 11
199913.1%21.0%-7.911 of 12
2000-1.5%-9.1%+7.69 of 12
2001 all year in cash0.0%-11.9%+11.90 of 12
2002-5.8%-22.1%+16.31 of 12
200322.6%28.7%-6.18 of 12
20047.9%10.9%-3.09 of 12
20054.8%4.9%-0.112 of 12
200615.8%15.8%0.012 of 12
20075.1%5.5%-0.412 of 12
2008 all year in cash0.0%-37.0%+37.00 of 12
200922.3%26.5%-4.27 of 12
20109.2%15.1%-5.98 of 12
2011-1.9%2.1%-4.08 of 12
201216.0%16.0%0.012 of 12
201332.3%32.4%-0.112 of 12
201413.5%13.7%-0.212 of 12
2015-4.3%1.4%-5.710 of 12
201610.5%12.0%-1.59 of 12
201721.7%21.8%-0.112 of 12
20182.7%-4.4%+7.110 of 12
201910.0%31.5%-21.59 of 12
202014.5%18.4%-3.99 of 12
202128.7%28.7%0.012 of 12
2022-21.0%-18.1%-2.94 of 12
20238.8%26.3%-17.510 of 12
202424.9%25.0%-0.112 of 12
202511.7%17.9%-6.210 of 12
2026 January to September2.0%12.7%-10.78 of 9

// Method and data

// Run your own

// Questions

Does the 200-day moving average beat buy and hold?

Not on growth in this test. Holding SPY only in months that began with SPY at or above its 200-day average grew 8.97% a year from January 1998 to September 2026, against 9.38% for the S&P 500 with dividends bought and held, gross of costs. It fell less: its worst fall from a peak was -23.0% against -50.9%, and its Sharpe ratio was 0.88 against 0.66. QuantGPT labels that TRADE-OFF: behind on growth, ahead on risk-adjusted return. It lost money in 5 of 29 calendar years and trailed the index in 21.

Does the 200-day moving average still work?

From 2015 to September 2026 the rule grew 8.91% a year against 14.17% for the S&P 500 with dividends, with a Sharpe ratio of 0.84 against 0.97 and a worst fall of -23.0% against -23.9%. Before 2015 it was ahead: 9.02% against 6.21% a year, worst fall -15.3% against -50.9%. The rule was public long before 2015, so the later years are a weaker test than a true holdout.

Is the 200-day better than the 10-month moving average?

They came out close, and the two runs are not like for like. The 200-day rule on SPY with cash at 0% grew 8.97% a year from 1998, worst fall -23.0%. The 10-month rule on the S&P 500 with dividends, with cash earning T-bills, grew 8.55% a year over January 1998 to October 26, 2026, worst fall -21.5%. Both trailed the index's 9.38% on growth and beat it on Sharpe.

How often does the 200-day rule trade?

Checked monthly, it moved to cash 19 times and back into SPY 19 times from 1998 to September 2026: 39 trades with the first purchase, about 1.4 a year, and 87 of 344 months in cash. Checked weekly, it made 103 trades and grew 6.50% a year. The engine's cost model puts the monthly rule at 8.68% a year at 10 basis points a side and 8.24% at 25. Taxes are not modelled.

Where does the data come from?

SPY prices are the total-return adjusted close (dividends and splits in) from QuantGPT's warehouse, and the benchmark is the S&P 500 total return index ($SPXTR). The run is one run_backtest call over QuantGPT's MCP on October 27, 2026, with prices through October 26, 2026; the last full month in the test is September 2026. Every figure on this page is in the free CSV.