Skip to main content
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.

Chart 1

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:

Formula for a simple moving average

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,367) is found by taking the average of the current month and the previous four months in column two.

Equation to find the bottom figure in Table 1

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.

Chart 2

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.
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.