Thursday, October 31, 2024

How to beat the S&P 500 without much effort: A one-year moving average strategy


Summary

- One of the most successful strategies for long-term investment returns is to buy and hold a broad-coverage index fund.

- The SPY is an exchange-traded fund (ETF) that tracks the S&P 500, and is a good example of broad-coverage index fund.

- A simple strategy can be devised to obtain even better than buy-and-hold long-term returns, employing fast- and slow-moving averages.

- We explain and test a one-year moving average strategy that in the long term performs significantly better than buying and holding SPY.

The one-year moving average for SPY from 1995 to 2018

The graph below has been created with Yahoo Finance (). It shows the variation of the SPY exchange-traded fund (ETF) from 1995 to 2018 (in red), plus the one-year moving average during that period (in blue). The SPY tracks the S&P 500 index, and had a net expense ratio of 0.09% at the time of this writing. One of the advantages of index funds is that they have a low expense ratio compared with actively-managed mutual funds.



Note that there are two moving averages in the graph: (a) the SPY “share” price (or net asset value per share) at any given time, which is the fastest moving average possible for the fund; and (b) the SPY’s one-year moving average, which is a slow-moving simple average of the fund’s share prices. (see ).

Simple inspection would suggest that, after an initial purchase, one would do better than holding SPY by employing a simple two-step strategy: (1) sell when the SPY crosses below its one-year moving average; and (2) buy back when SPY crosses above its one-year moving average.

A test of the strategy

While on the graph the simple strategy above may look appealing, the strategy must be tested with real data and under realistic assumptions. The figure below shows part of a screen snapshot of a test of the strategy, with multiple trades on a spreadsheet. Each row of the spreadsheet corresponds to one trade. The first row corresponds to the initial buy. A conservative fee of US$ 40 per trade is assumed, in part to account for bid-ask spread losses.




The figure below shows the final rows of the simulation, the result of a comparison buy-and-hold baseline strategy, and the percentage difference. Starting with an investment of US$ 100,000 made in January 1, 1995, the simple one-year moving average strategy gets us to US$ $980,558 on January 1, 2018. The buy-and-hold baseline strategy gets us to US $611,714. That is, the simple one-year moving average strategy performs about 60 percent better.




The simulation disregards dividends and sweep account gains (whereby cash earns interest). At the time of this writing, one could easily get money market yields in sweep accounts that were comparable in value to the SPY dividend.

Is the 365 days used for the moving average optimal? Probably not, but our simulation suggests that this number is effective at limiting false positives while at the same time capturing major drops of the index (e.g., those in the two recessions in the period considered). False positives would be much more frequent with a faster moving average, such as a 50-day moving average. If too frequent, false positives can significantly increase trading-related losses, to the point of negating the benefit of the strategy.