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.
- Growth a year8.97%index 9.38%
- Worst fall-23.0%index -50.9%
- Sharpe ratio0.88index 0.66
- FindingTRADE-OFFbehind on growth, ahead on Sharpe
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
| 200-day rule | S&P 500 with dividends | |
|---|---|---|
| Growth a year | 8.97% | 9.38% |
| $1 grew to | $11.74 | $13.07 |
| Worst fall from a peak | -23.0% | -50.9% |
| Sharpe ratio | 0.88 | 0.66 |
| Volatility a year | 10.4% | 15.4% |
| Months with a gain | 50.6% | 64.5% |
| Months in the market | 257 of 344 | 344 of 344 |
| Trades | 39 | bought 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
200-day rule S&P 500 with dividends
// 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:
| Year | 200-day rule | S&P 500 with dividends | Gap, points | What it missed |
|---|---|---|---|---|
| 2019 | 10.0% | 31.5% | -21.5 | In cash for January (+8.0%), February (+3.2%) and June (+7.0%) |
| 2023 | 8.8% | 26.3% | -17.5 | In cash for January (+6.3%) and November (+9.1%) |
| 1998 | 10.5% | 27.2% | -16.7 | Held SPY through August (-14.1%), then in cash for September (+6.4%) and October (+8.1%) |
| 2026January to September | 2.0% | 12.7% | -10.7 | Held SPY through March (-4.9%), then in cash for April (+10.5%) |
| 1999 | 13.1% | 21.0% | -7.9 | In 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:
| Months | S&P 500 with dividends | 200-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
| 200-day rule | S&P 500 with dividends | |
|---|---|---|
| Growth a year, Feb 1998 to Dec 2014 | 9.02% | 6.21% |
| Sharpe ratio, Feb 1998 to Dec 2014 | 0.91 | 0.47 |
| Worst fall, Feb 1998 to Dec 2014 | -15.3% | -50.9% |
| Growth a year, Jan 2015 to Sep 2026 | 8.91% | 14.17% |
| Sharpe ratio, Jan 2015 to Sep 2026 | 0.84 | 0.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
| Run | Growth a year | Sharpe | Worst fall | Finding |
|---|---|---|---|---|
| SPY above its 200-day average, checked monthly, cash earns 0% this page's run; Feb 1998 to Sep 2026; against $SPXTR | 8.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 $SPXTR | 6.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, 2026 | 8.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 1934 | 7.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.
| Cost a side | Growth a year | Sharpe | Worst fall |
|---|---|---|---|
| None (gross) | 8.97% | 0.88 | -23.0% |
| 5 basis points | 8.83% | 0.87 | -23.4% |
| 10 basis points | 8.68% | 0.86 | -23.9% |
| 25 basis points | 8.24% | 0.82 | -25.3% |
| 50 basis points | 7.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
| Year | 200-day rule | S&P 500 with dividends | Rule minus index | Months in SPY |
|---|---|---|---|---|
| 1998 February to December | 10.5% | 27.2% | -16.7 | 9 of 11 |
| 1999 | 13.1% | 21.0% | -7.9 | 11 of 12 |
| 2000 | -1.5% | -9.1% | +7.6 | 9 of 12 |
| 2001 all year in cash | 0.0% | -11.9% | +11.9 | 0 of 12 |
| 2002 | -5.8% | -22.1% | +16.3 | 1 of 12 |
| 2003 | 22.6% | 28.7% | -6.1 | 8 of 12 |
| 2004 | 7.9% | 10.9% | -3.0 | 9 of 12 |
| 2005 | 4.8% | 4.9% | -0.1 | 12 of 12 |
| 2006 | 15.8% | 15.8% | 0.0 | 12 of 12 |
| 2007 | 5.1% | 5.5% | -0.4 | 12 of 12 |
| 2008 all year in cash | 0.0% | -37.0% | +37.0 | 0 of 12 |
| 2009 | 22.3% | 26.5% | -4.2 | 7 of 12 |
| 2010 | 9.2% | 15.1% | -5.9 | 8 of 12 |
| 2011 | -1.9% | 2.1% | -4.0 | 8 of 12 |
| 2012 | 16.0% | 16.0% | 0.0 | 12 of 12 |
| 2013 | 32.3% | 32.4% | -0.1 | 12 of 12 |
| 2014 | 13.5% | 13.7% | -0.2 | 12 of 12 |
| 2015 | -4.3% | 1.4% | -5.7 | 10 of 12 |
| 2016 | 10.5% | 12.0% | -1.5 | 9 of 12 |
| 2017 | 21.7% | 21.8% | -0.1 | 12 of 12 |
| 2018 | 2.7% | -4.4% | +7.1 | 10 of 12 |
| 2019 | 10.0% | 31.5% | -21.5 | 9 of 12 |
| 2020 | 14.5% | 18.4% | -3.9 | 9 of 12 |
| 2021 | 28.7% | 28.7% | 0.0 | 12 of 12 |
| 2022 | -21.0% | -18.1% | -2.9 | 4 of 12 |
| 2023 | 8.8% | 26.3% | -17.5 | 10 of 12 |
| 2024 | 24.9% | 25.0% | -0.1 | 12 of 12 |
| 2025 | 11.7% | 17.9% | -6.2 | 10 of 12 |
| 2026 January to September | 2.0% | 12.7% | -10.7 | 8 of 9 |
// Method and data
- The run. One
run_backtestcall over QuantGPT's MCP on October 27, 2026: tickers["SPY"], filterpx_vs_sma200 >= 0,top_n1,cash_as_holdingtrue, monthly rebalance,start_year1998, benchmark$SPXTR. The first book formed at the close of January 30, 1998; the last return runs to September 30, 2026. - Prices. SPY at its total-return adjusted close (dividends and splits in) from QuantGPT's warehouse, which held prices through October 26, 2026 when the study ran. The benchmark is the S&P 500 total return index.
- Signal. SPY's close against its 200-day simple moving average, read at each month-end close. The book is set at that close and held to the next month-end.
- Cash. Earns 0% in this run. The 10-month variants earn the 3-month T-bill rate (FRED TB3MS), and 0% before 1934, when that series begins.
- Costs. Every figure is gross of trading costs and taxes unless the row says otherwise. The cost table applies the engine's per-side cost to the rule's actual turnover.
- Drawdowns. Measured at month-end closes only, for both the rule and the index.
- Hindsight. SPY was picked today, and it survived. For one index fund that matters little, but a list of names chosen today always knows how they turned out.
- Data coverage. QuantGPT's market-wide stock universe holds delisted companies from 1998 (12,816 of 13,193, 97%) and survivors only before 1998. A test on one fund or one index, like every run on this page, does not depend on that.
- Disclosures. The conventions behind every QuantGPT backtest are on the disclosures page.
// Run your own
- Ask your AI. Connected to QuantGPT over MCP, ask:
Use QuantGPT to backtest SPY held only when it is at or above its 200-day moving average, checked monthly from 1998, against the S&P 500 with dividends, and show every year it lagged.
Change the cadence, the start year or the average and run it again.
Connect Claude · Connect ChatGPT - The strategy library. The 10-month timing rule and the moving-average rules of Brock, Lakonishok
and LeBaron are documented there, with what the papers claimed.
Moving-average entries in the library - Every library strategy, tested. The same kind of run for every entry the engine can run in one call,
from 1998 against the S&P 500 with dividends, with the ones that lost.
The library scorecard - The data. Every figure on this page, one row each, with a source line.
Download the CSV - New to QuantGPT? 3 days free on QuantGPT or QuantGPT Pro, cancel any time.
Start your 3-day free trial
// 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.