(Third in a series)
One of the easiest, most common time series forecasting techniques is that of the moving average. Moving average methods come in handy if all you have is several consecutive periods of the variable (e.g., sales, new savings accounts opened, workshop attendees, etc.) you’re forecasting, and no other data to predict what the next period’s value will be. Often, using the past few months of sales to predict the coming month’s sales is preferable to unaided estimates. However, moving average methods can have serious forecasting errors if applied carelessly.
Moving Averages: The Method
Essentially, moving averages try to estimate the next period’s value by averaging the value of the last couple of periods immediately prior. Let’s say that you have been in business for three months, January through March, and wanted to forecast April’s sales. Your sales for the last three months look like this:
Month  Sales ($000) 
January 
129 
February 
134 
March 
122 
The simplest approach would be to take the average of January through March and use that to estimate April’s sales:
(129 + 134 + 122)/3 = $128.333
Hence, based on the sales of January through March, you predict that sales in April will be $128,333. Once April’s actual sales come in, you would then compute the forecast for May, this time using February through April. You must be consistent with the number of periods you use for moving average forecasting.
The number of periods you use in your moving average forecasts are arbitrary; you may use only twoperiods, or five or six periods – whatever you desire – to generate your forecasts.
The approach above is a simple moving average. Sometimes, more recent months’ sales may be stronger influencers of the coming month’s sales, so you want to give those nearer months more weight in your forecast model. This is a weighted moving average. And just like the number of periods, the weights you assign are purely arbitrary. Let’s say you wanted to give March’s sales 50% weight, February’s 30% weight, and January’s 20%. Then your forecast for April will be $127,000 [(122*.50) + (134*.30) + (129*.20) = 127].
Limitations of Moving Average Methods
Moving averages are considered a “smoothing” forecast technique. Because you’re taking an average over time, you are softening (or smoothing out) the effects of irregular occurrences within the data. As a result, the effects of seasonality, business cycles, and other random events can dramatically increase forecast error. Take a look at a full year’s worth of data, and compare a 3period moving average and a 5period moving average:
Month  Sales ($000)  3Mo. Moving Average  5Mo. Moving Average 
January 
129 

February 
134 
128.3 

March 
122 
127.0 
128.2 
April 
125 
126.0 
129.8 
May 
131 
131.0 
128.6 
June 
137 
132.0 
130.4 
July 
128 
132.0 
129.2 
August 
131 
126.0 
127.8 
September 
119 
124.7 
126.0 
October 
124 
123.7 
127.6 
November 
128 
129.3 

December 
136 
Notice that in this instance that I did not create forecasts, but rather centered the moving averages. The first 3month moving average is for February, and it’s the average of January, February, and March. I also did similar for the 5month average. Now take a look at the following chart:
What do you see? Is not the threemonth moving average series much smoother than the actual sales series? And how about the fivemonth moving average? It’s even smoother. Hence, the more periods you use in your moving average, the smoother your time series. Hence, for forecasting, a simple moving average may not be the most accurate method. Moving average methods do prove quite valuable when you’re trying to extract the seasonal, irregular, and cyclical components of a time series for more advanced forecasting methods, like regression and ARIMA, and the use of moving averages in decomposing a time series will be addressed later in the series.
Determining the Accuracy of a Moving Average Model
Generally, you want a forecasting method that has the least error between actual and predicted results. One of the most common measures of forecast accuracy is the Mean Absolute Deviation (MAD). In this approach, for each period in the time series for which you generated a forecast, you take the absolute value of the difference between that period’s actual and forecasted values (the deviation). Then you average those absolute deviations and you get a measure of MAD. MAD can be helpful in deciding on the number of periods you average, and/or the amount of weight you place on each period. Generally, you pick the one that results in the lowest MAD. Here’s an example of how MAD is calculated:
Month  Actual  3Mo. Forecast  Deviation  Absolute Deviation 
January 
135 
127 
(8) 
8 
February 
134 
135 
1 
1 
March 
125 
128 
3 
3 
MAD= 
4 
MAD is simply the average of 8, 1, and 3.
Moving Averages: Recap
When using moving averages for forecasting, remember:
 Moving averages can be simple or weighted;
 The number of periods you use for your average, and any weights you assign to each are strictly arbitrary;
 Moving averages smooth out irregular patterns in time series data; the larger the number of periods used for each data point, the greater the smoothing effect;
 Because of smoothing, forecasting next month’s sales based on the most recent few month’s sales can result in large deviations because of seasonality, cyclical, and irregular patterns in the data; and
 The smoothing capabilities of a moving average method can be useful in decomposing a time series for more advanced forecasting methods.
Next Week: Exponential Smoothing
In next week’s Forecast Friday, we will discuss exponential smoothing methods, and you will see that they can be far superior to moving average forecasting methods.
Still don’t know why our Forecast Friday posts appear on Thursday? Find out at: http://tinyurl.com/26cm6ma
Tags: exponential smoothing, Forecast Friday, Forecasting, mean absolute deviation, moving average, simple moving average, smoothing, time series, time series analysis, weighted moving average
May 14, 2010 at 4:29 pm 
Hi. Great blog!
I had 2 questions:
1) Can you use the centered MA approach to forecast or just for removing seasonality?
2) When you use the simple t=(t1+t2++tk)/k MA to forecast one period ahead, is it possible to forecast more than 1 period ahead? I guess then your forecast would be one of the points feeding into the next.
Thanks. Love the info and your explanantions
May 14, 2010 at 10:48 pm 
Brian,
I’m glad you like the blog! I’m sure several analysts have used the centered MA approach for forecasting, but I personally would not, since that approach results in a loss of observations at both ends. This actually then ties into your second question. Generally, simple MA is used to forecast only one period ahead, but many analysts – and I too sometimes – will use my oneperiod ahead forecast as one of the inputs to the secondperiod ahead. It’s important to remember that the further into the future you attempt to forecast, the greater your risk of forecast error. This is why I do not recommend centered MA for forecasting – the loss of observations at the end means having to rely on forecasts for the lost observations, as well as the period(s) ahead, so there is greater chance of forecast error.
Readers: you’re invited to weigh in on this. Do you have any thoughts or suggestions on this?
Brian, thanks for your comment and your compliments on the blog!
January 4, 2011 at 12:04 am 
[…] Forecast Friday Topic: Moving Average Methods May 2010 2 comments 4 […]
January 16, 2011 at 9:38 pm 
[…] While we may not have discussed it in detail, we did note that the absence of stationarity made moving average methods less accurate for shortterm forecasting, which led into our discussion of exponential smoothing. […]
October 22, 2013 at 1:56 pm 
Nice initiative and nice explanation. It’s really helpful.
March 26, 2014 at 2:47 pm 
I forecast custom printed circuit boards for a customer that does not give any forecasts. I have used the moving average, however it is not very accurate as the industry can go up and down. We see towards middle of summer to the end of year that shipping pcb’s is up. Then we see at the beginning of the year slows way down. How can I be more accurate with my data?
March 26, 2014 at 3:59 pm 
Katrina, from what you told me, it appears your printed circuit board sales have a seasonal component. I do address seasonality in some of the other Forecast Friday posts. Another approach you can use, which is pretty easy, is the HoltWinters algorithm, which takes into account seasonality. You can find a good explanation of it here. Be sure to determine whether your seasonal patterns are multiplicative or additive, because the algorithm is slightly different for each. If you plot your monthly data from a few years and see that the seasonal variations at the same times of years seem to be constant year over year, then the seasonality is additive; if the seasonal variations over time seem to be increasing, then the seasonality is multiplicative. Most seasonal time series will be multiplicative. If in doubt, assume multiplicative. Good luck!
March 17, 2015 at 9:51 am 
Hi there,
Between those method:
. Naïve Forecasting
. Updating the Mean
. Moving average of length k
. Either Weighted Moving Average of length k OR Exponential Smoothing
Which one of those updating models do you recommend me using to forecast the data? For my opinion, I am thinking about Moving Average. But I don’t know how to make it clear and structured :(
Thanks x
August 1, 2015 at 8:13 am 
It really depends on the quantity and quality of the data you have and your forecasting horizon (longterm, midterm, or shortterm)
April 14, 2015 at 3:21 pm 
thanks for this Blog . it is quite interestig and Informative