This website uses cookies

Read our Privacy policy and Terms of use for more information.

On 6 October 2026, SPY (the S&P 500 exchange-traded fund, or ETF) closed at $779.09. Its 200-day moving average stood at $718.14. That average is the mean of SPY's last 200 closing prices. The price sat 8.5% above it.

This guide works out the two main types of moving average by hand on SPY. It then tests a simple rule built on them across 15 funds, with prices going back as far as 1993.

What is a moving average? A moving average is the mean of a price over a set number of recent days. It is worked out again each day as the oldest day drops out. The averaging smooths out daily swings.

  • The simple moving average (SMA) weights each day equally. The exponential moving average (EMA) gives more weight to recent days, so it reacts faster.

  • A rule that held SPY only while it was above its 200-day SMA made 9.33% a year from 1993, against 10.91% for holding. Its worst fall was 22.1%, against 55.2%.

  • Eight rules were tested on 15 funds: SMA and EMA at 20, 50, 100 and 200 days. A 200-day average gave the highest return on 10 of the 15 funds. Even so, only 4 of the 120 results beat holding on return, while 115 had a smaller worst fall.

How to work out a simple moving average on SPY

A simple moving average adds up the last few closing prices and divides by how many there are. Here is a 5-day SMA for SPY on 6 October 2026:

  • 30 September: $762.63

  • 1 October: $763.99

  • 2 October: $769.64

  • 5 October: $774.83

  • 6 October: $779.09

The five closes add up to $3,850.18. Divided by five, the 5-day SMA is $770.04. The next day, the 30 September close drops out and a new close comes in. That is why the average "moves".

The formula works for any length: SMA = the sum of the last n closes ÷ n.

Simple vs exponential moving average

An exponential moving average moves part of the way from yesterday's value towards today's close. The share it moves is 2 ÷ (n + 1), the method set out in StockCharts' ChartSchool. For a 5-day EMA, that share is 1/3.

Here is SPY's 5-day EMA on 6 October 2026, worked by hand:

  1. Start from yesterday's EMA. On 5 October it was $769.4.

  2. Find the gap to today's close. SPY closed at $779.09, a gap of $9.7.

  3. Move 1/3 of the way. A third of $9.7 is $3.2. So the EMA rose to $772.6.

An EMA needs a starting value. Here it was the 5-day SMA on 29 September.

The 5-day EMA of $772.6 sat closer to the latest close than the 5-day SMA of $770.04. In the SMA, each of the five days carries 1/5 of the weight. In the EMA, the latest close carries 1/3 of the weight. The day before carries 2/9.

The 50-day and 200-day moving averages on SPY

The common lengths are counted in trading days, of which a year has about 252. The 20-day covers about a month. The 50-day covers ten weeks, while the 200-day covers most of a year.

Line chart of SPY's dividend-adjusted closing price from 2 January 2025 to 6 October 2026, with its 50-day and 200-day simple moving averages. SPY starts near $573, falls to a low of $488.39 on 8 April 2025, then climbs to $779.09 on 6 October 2026. The 50-day average turns down with the 2025 fall, while the 200-day only flattens. At the end, the 50-day stands at $763.82 and the 200-day at $718.14.

Source: YX Insights

Chart 1 shows SPY from January 2025 to 6 October 2026, with its 50-day and 200-day SMAs. On 6 October, the 50-day stood at $763.82 and the 200-day at $718.14. SPY was above both.

SPY fell 18.8% from its high close on 19 February 2025 to its low on 8 April. The 50-day SMA turned down with it, while the 200-day only flattened.

Why moving averages lag behind the price

A moving average is built from past prices, so it always trails. On average, the closes in an n-day SMA are (n − 1) ÷ 2 days old. For the 200-day, that is 99.5 trading days.

The 2025 fall shows the cost. SPY first closed below its 200-day SMA on 10 March, already 8.5% below its February high. It crossed back above on 24 March, then fell below again two days later.

Such quick reversals are called whipsaws. SPY closed above its 200-day SMA again on 12 May, 17.4% above the April low.

From January 2025 to 6 October 2026, SPY crossed its 20-day SMA 57 times and its 200-day SMA 6 times.

The rule tested: hold above the average, cash below

Buy and hold means owning the fund the whole time. The rule tested against it is the plainest one:

  • Hold the fund after any day it closed above its moving average.

  • Hold cash otherwise, earning the 3-month Treasury bill rate, the interest on three-month US government debt.

The signal uses each day's close. The position starts at that close and runs to the next one. So the rule never uses a price it could not have seen.

Eight versions were tested: SMA and EMA at 20, 50, 100 and 200 days.

Each fund's test starts on the first day its 200-day average exists, so all rules cover the same dates as buy and hold. Dividends are counted. Costs and tax are ignored.

SPY's return and worst falls with and without the 200-day rule

Line chart of SPY's fall from its previous high, November 1993 to 6 October 2026, for buy and hold and for a rule that held SPY only above its 200-day simple moving average. Both start at 0%. Buy and hold's worst fall is 55.2%, to March 2009. The rule's worst fall is 22.1%, to April 2003. Both end near 0% in October 2026.

Source: YX Insights

Chart 2 shows SPY's fall from its previous high, November 1993 to 6 October 2026. Buy and hold fell 55.2% at worst, to March 2009. The 200-day SMA rule's worst fall was 22.1%, from July 1999 to April 2003. In that time, SPY crossed its 200-day SMA 38 times.

The rule paid for that in return. It made 9.33% a year, against 10.91% for holding. It switched 210 times, or 6.4 a year.

SPY, 11 Nov 1993 to 6 Oct 2026

Return a year (%)

Worst fall (%)

Switches a year

Buy and hold

10.91

55.2

–

20-day SMA

5.17

36.2

29.5

50-day SMA

5.82

35.1

17.7

100-day SMA

7.69

47.0

10.9

200-day SMA

9.33

22.1

6.4

20-day EMA

5.53

44.3

32.1

50-day EMA

7.51

27.7

18.4

100-day EMA

8.24

38.3

11.5

200-day EMA

8.73

25.7

7.4

Source: YX Insights

The table gives all eight rules on SPY. Every one made less than holding. The 20-day SMA rule made 5.17% a year and switched 971 times.

Returns across 15 funds: moving average rules vs buy and hold

The same eight rules were run on 15 US-listed funds: the S&P 500, the Nasdaq-100, small companies, developed markets, nine sectors, gold and long Treasuries. No fund was picked for doing well, which avoids survivorship bias. The tests start between November 1993 and September 2005.

Bar chart of the median yearly return across 15 US-listed funds for eight moving average rules and buy and hold. Simple moving average rules: 20-day 4.58%, 50-day 4.16%, 100-day 4.97%, 200-day 6.23%. Exponential moving average rules: 20-day 3.44%, 50-day 4.43%, 100-day 4.75%, 200-day 4.94%. Buy and hold: 8.72%.

Source: YX Insights

Chart 3 shows the median yearly return, the middle result when the 15 funds are ranked. Buy and hold's median was 8.72%. The best rule, the 200-day SMA, reached 6.23%.

Only 4 of the 120 fund-and-rule results beat buy and hold on return. All four used 200-day averages, on QQQ (the Nasdaq-100 ETF) and XLK (the technology sector ETF).

So the 200-day length came out best in this test. It also gave the highest return on 10 of the 15 funds. The type made little difference: the EMA beat the SMA of the same length in 30 of 60 pairs.

Worst falls across 15 funds: moving average rules vs buy and hold

Bar chart of the median worst fall across 15 US-listed funds for eight moving average rules and buy and hold. Simple moving average rules: 20-day 46.2%, 50-day 38.8%, 100-day 37.1%, 200-day 32.4%. Exponential moving average rules: 20-day 44.3%, 50-day 36.8%, 100-day 38.3%, 200-day 33.5%. Buy and hold: 59.0%.

Source: YX Insights

Chart 4 shows the median worst fall, also called the maximum drawdown. Buy and hold's was 59.0%, against 32.4% for the 200-day SMA rule. What Is a Drawdown? explains the measure.

In 115 of 120 results, the rule's worst fall was smaller than holding's. The exceptions were on XLP (the consumer staples sector ETF) and XLV (the health care sector ETF).

What this test can and cannot show

  • Costs and tax are left out. The 20-day SMA rule switched a median 30.6 times a year, so costs would cut its return. What Is Backtesting? shows how much.

  • One test. Picking the 200-day after seeing these results flatters it. The test does not show it would lead again.

  • One stretch of history. The test covers 1993 to 2026 only. Another stretch could give a different answer. Can Systematic Investing Beat the S&P 500? runs the 200-day rule on SPY since 2017, with costs.

  • Gaps between funds. Another length did best on 5 of the 15 funds. A fund's best and worst rule differed by 1.65 points a year on TLT (the long-term US Treasury bond ETF). On XLK, the gap was 5.19 points.

  • The funds are not independent. A market-wide fall hits most of the 15 at once.

How to read a moving average on a chart

  • Check the prices used. On 6 October 2026, SPY's 200-day SMA was $718.14 on prices adjusted for dividends. On raw closes it was $721.49.

  • Expect more whipsaws when swings are big. What Is Volatility? explains how swings are measured.

  • Know the tools built on top. A 50-day SMA crossing above a 200-day SMA is a golden cross. The Moving Average Convergence Divergence indicator, or MACD, is the gap between two EMAs.

A moving average is the mean of recent prices, so it shows the trend with a delay. In this test, price-above-average rules cut the worst falls on most funds but earned less than holding. The 200-day did best on most funds. No rule was best on every fund.

Learn more with YX Insights

This explainer is part of the YX Insights Academy. Each one takes a single idea and checks it against real data.

The same approach runs through everything else we publish:

  • Systematic Portfolio: ready-made portfolios for Macro & Megacaps and for Commodities. We publish the holdings and every change.

  • Multi-model Signals: a daily long-or-flat call on every name we cover. Each call shows how strongly our four models agree.

  • Research: company deep dives, macro commentary and essays on how we test.

Good places to start on the website:

Common questions about moving averages

How is a moving average calculated?

A simple moving average is the sum of the last n closing prices divided by n. For SPY on 6 October 2026, the five closes from 30 September added up to $3,850.18, so the 5-day average was $770.04. Each new day, the oldest close drops out and the newest comes in.

Which moving average is best?

The 200-day did best in our test of eight rules on 15 funds. It gave the highest return on 10 of the 15. The exponential version beat the simple one in exactly half the pairs. Even so, the rules earned less than holding in 116 of 120 results. That is one test over one period.

What is the difference between SMA and EMA?

A simple moving average (SMA) gives every day in the window equal weight. An exponential moving average (EMA) gives the latest day the most weight, so it reacts faster to a new price. In a 5-day EMA, the latest close carries 1/3 of the weight, against 1/5 in a 5-day SMA.

What does it mean when a stock is above its 200-day moving average?

A price above its 200-day moving average is higher than its mean close over most of the past year of trading. It describes the trend so far. On 6 October 2026, SPY was 8.5% above its 200-day SMA. A close above the average does not guarantee the next move.

What are the 50-day and 200-day moving averages?

The 50-day and 200-day moving averages are the mean closing prices of the last 50 and 200 trading days. The 50-day covers about ten weeks of trading, while the 200-day covers most of a year. When the 50-day crosses above the 200-day, the event is called a golden cross.

DISCLAIMER: This article is strictly educational. Any information or analysis in this note is not an offer to sell or the solicitation of an offer to buy any securities. Nothing in this note is intended to be investment advice and nor should it be relied upon to make investment decisions. Any opinions, analyses, or probabilities expressed in this note are those of the author as of the note's date of publication and are subject to change without notice.

Reply

Avatar

or to participate

More From YX Insights

No posts found
View more
caret-right