Using a Spreadsheet to Construct Moving Averages

Post on: 16 Март, 2015 No Comment

Using a Spreadsheet to Construct Moving Averages

by Wayne A. Thorp, CFA

In the article Buy-and-Hold Versus Market Timing, which begins on page 16 in this issue, we discuss the research of Theodore Wong, who tested a moving average crossover MAC system to see if it was possible to generate better returns than a buy-and-hold strategy over an extended period of time. He used the interplay between the market index and a moving average of the index to time when to be invested in the market and when to hold cash.

Market timers frequently make their investment decisions based on internal relative strengthwhether a stock is stronger or weaker than its own average. Wongs research used moving averages to determine if the market was in an uptrend or downtrend and to test whether it made sense to be long during measurable uptrends and move to cash during downtrends. While the argument continues over the efficacy of market timing, investors are still faced with the dilemma of whether to adjust their portfolios based on market conditions and which guidelines they should follow in this endeavor.

Moving Average Basics

One of the techniques many analysts use in judging internal relative strength involves the creation of moving averages of prices. A moving average is one of the simplest trend-following tools investors use. While moving averages come in different flavors, their underlying purpose remains the same: to help investors and traders track the trend in the prices of financial assets by smoothing out the periodic fluctuations in price (also called noise). In smoothing out price variations, moving averages emphasize price trends longer than the interval.

It is important to point out that moving averages do not predict price directionsrather they indicate the current price direction (with a lag). This lag stems from using past price dataprices lead and moving averages follow. Over time, as the name implies, a moving average will move as old data is dropped off and new data is added. There are three types of moving averages: simple, weighted and exponential.

Simple Moving Average

A simple moving average, or SMA, applies equal weights to all prices across the time interval used to calculate the average. As a result, a simple moving average assumes that prices from the beginning of the period are just as relevant as prices from the end of the period.

The SMA is constructed the same as a typical averageif you have three values, you would add them together and divide the sum by three.

Here is the calculation for a simple moving average:

(P 1 + P 2 + P 3 + + Pn ) n

Where:

P1 = the price of the first period used to calculate the moving average

Pn = is the price of the last period used to calculate the moving average

n = the number of periods used in calculating the moving average

Table 1 compares the results for 10-day simple, weighted, and exponential moving averages using daily closing values of the S&P 500 total return index from May 2010. The data is from the Yahoo! Finance website.


Categories
Cash  
Tags
Here your chance to leave a comment!