FRB Dallas Home » Research & Data »Basics » Smoothing Data with Moving Averages
 
 

Research & Data
DataBasics

Smoothing Data with Moving Averages

How to smooth a volatile data series

The Economic Problem

Economists Use Smoothing Techniques to Help Show the Economic Trend in Data
To decipher trends in data series, researchers perform various statistical manipulations. These operations are referred to as “smoothing techniques” and are designed to reduce or eliminate short-term volatility in data. A smoothed series is preferred to a non-smoothed one because it may capture changes in the direction of the economy better than the unadjusted series does.

Seasonal Adjustment Is One Smoothing Technique
One common smoothing technique used in economic research is seasonal adjustment. This process involves separating out fluctuations in the data that recur in the same month every year (seasonal factors). Such fluctuations can be a result of annual holidays (a jump in December retail sales) or predictable weather patterns (an increase in homebuilding in the spring). For further information on the seasonal adjustment process, see "Seasonally Adjusting Data."

A Moving Average Can Smooth Data That Remains Volatile after Seasonal Adjustment
In other cases, a data series retains volatility even after seasonal adjustment. A good example is housing permits, which exhibit strong seasonal fluctuations primarily due to predictable weather patterns. Even after seasonal adjustment eliminates these predictable patterns, however, considerable volatility remains (Chart 1). Why? Because seasonal adjustment does not account for irregular factors such as unusual weather conditions or natural disasters, among others. Such events are unexpected and cannot be isolated the way seasonal factors can. For instance, did single-family housing permits fall in June because economic conditions worsened, or was it just a wetter June than usual? Economists use a simple smoothing technique called “moving average” to help determine the underlying trend in housing permits and other volatile data. A moving average smoothes a series by consolidating the monthly data points into longer units of time—namely an average of several months' data.

There is a downside to using a moving average to smooth a data series, however. Because the calculation relies on historical data, some of the variable's timeliness is lost. For this reason, some researchers use a “weighted” moving average, where the more current values of the variable are given more importance. Another way to reduce the reliance on past values is to calculate a “centered” moving average, where the current value is the middle value in a five-month average, with two lags and two leads. The lead figures are forecasted values. Data available from the Dallas Fed's web site are adjusted using the simple moving average technique explained below.

The Technical Solution

The formula for a simple moving average is:

y bar sub t equals parentheses y sub t plus y sub t minus t plus  until plus y sub t minus n minus 1 close parentheses divided by n

where y is the variable (such as single-family housing permits), t is the current time period (such as the current month), and n is the number of time periods in the average. In most cases, researchers use three-, four- or five-month moving averages (so that n = 3, 4 or 5), with the larger the n, the smoother the series.

Real-World Example

Texas Housing Permits Are Volatile from Month to Month; a Moving Average Helps Show the Underlying Trend in the Data
Table 1 uses the formula above to calculate a five-month moving average of residential building permits.

Table 1    
Month
Single-family housing permits
(seasonally adjusted)
Five-month moving average, single-family housing permits (seasonally adjusted)
December 2011
6,195
5,914
January 2012
6,835
6,193
February 2012
6,254
6,278
March 2012
5,406
6,142
April 2012
6,582
6,254
May 2012
6,498
6,315
June 2012
6,147
6,177
July 2012
6,610
6,249
August 2012
6,726
6,513
September 2012
7,220
6,640
October 2012
7,739
6,888
November 2012
7,930
7,245
December 2012
7,218
7,367

 

In the third column, the bottom figure (7,218) is found by taking the average of the current month and the previous four months in column two.

7,218 equals the sum of 7218 plus 7930 plus 7220 plus 7739 plus 6726 divided by 5

The series in the third column is smoothed, and as Chart 2 shows, is much less volatile than the original series. Using the smoothed data, a researcher can more easily determine underlying trends in the data, as well as detect significant changes in direction.

Summary

Smoothing techniques reduce the volatility in a data series, which allows analysts to identify important economic trends. The moving average technique offers a simple way to smooth data; however, because it utilizes data from past time periods, it may obscure the latest changes in the trend.

Glossary at a Glance

Moving average: A calculation that smoothes a volatile data series by averaging neighboring data points.

Seasonal adjustment: The type of smoothing technique in which seasonal fluctuations in the data are estimated and removed.

Smoothing technique: A statistical operation performed on economic data series to reduce or eliminate short-term volatility.

 

Federal Reserve Bank of Dallas Seal
Federal Reserve Bank of Dallas

2200 N. Pearl St., Dallas, Texas 75201 | 214.922.6000 or 800.333.4460
Disclaimer / Privacy Policy

Federal Reserve Centennial