This documentation refers to version 1.14.


The Smoothing analysis offers a number of filters that can be used to smooth the series.



Moving average

The moving average is calculated at each point as the average over a specified window length. If there are any missing values within the window, the average will use fewer values.

y t = i = 0 w - 1 x t - i i = 0 w - 1 IsValid ( x t - i )

where w is the window length and IsValid is a function that is 1 for valid values and 0 for missing values.

Moving average, centered

The centered moving average is calculated symmetrically around each point, except towards the ends, where it becomes more and more asymmetric.

The calculation is made differently depending on if the window length is odd or even.

When the window length, w, is an odd number, the calculation is similar to a lagged ordinary moving average:

h = w - 1 2 y t = i = 0 w - 1 x t - 1 - h i = 0 w - 1 IsValid x t - i - h

When the window length, w, is an even number, the calculation is a second order moving average. It is calculated in the same way as for odd w, but with a weight of ½ for the outer observations of the window and h = w 2

Moving average, exponential

Calculates an exponential moving average.

The exponential factor, α, is calculated from the specified number of observations, f, like this:

α = 2 f + 1

The smoothed series is calculated using a recursive formula:

y 0 = x 0 y t = α y t - 1 + 1 - α x t
HP filter

Hodrick-Prescott symmetric filter as described by Hodrick and Prescott (1997).

The factor, λ, can be specified either directly or by using the frequency adjusted power rule described Ravn and Uhlig (2002).

When the frequency adjusted rule is used, the λ is calculated from f as:

λ = 1 6 0 0 p 4 f

where p is the number of observations per year for the frequency at hand.

A factor of 4 is recommended by Ravn and Uhlig. A factor of 2 will give you the original Hodrick and Prescott values.

HP filter, one-sided

The one-sided Hodrick-Prescott filter is calculated by using only the historical data available at each point in time. The last value will thus be the same for the full and one-sided filter.

CF filter, stationary

Christiano-Fitzgerald full sample asymmetric band-pass filter as described by Christiano and Fitzgerald (1999).

Use this version of the CF filter when the series is difference stationary and there is no drift. If there is a trend in the series, you might want to use the Detrend analysis to remove it before applying the filter.

BK filter

Baxter-King symmetric band-pass filter as described by Baxter and King (1995).

Specify the minimum and maximum period of oscillation. Also specify the lead/lag length of the filter. This many observations will be lost at each end of the filtered series.


The window and period length can be expressed as a number of observations or as units of the specified time unit (Year, Quarter, Month etc.), which is then converted to a number of observations based on the frequency of the data.

Std. dev.

Calculate a pair of series that forms a confidence band around the mean so that the specified percentage of the values are within the band if the data is normally distributed.

The corrected sample standard deviation, s, is calculated as the deviation from the smoothed line.

The empirical rule, states that for normally distributed data and a band of 1 standard deviation on each side, ~68.3% of the values are within the band, ~95.4% are within 2 standard deviations and ~99.7% are within 3 standard deviations.

Formally, the band is μ±f∙s, where μ is the smoothed series, c is the confidence coefficient, f = Φ - 1 1 0 0 - c 2 + c 1 0 0 and Φ is the cumulative normal distribution function.


The confidence coefficient used for the standard deviation confidence band.