Penalized Smoothing

Whittaker-Henderson Smoothing

TrendDecomposition.bohlmannFilterFunction
bohlmannFilter(x :: Vector, m :: Int, λ :: Real)

This is the generalization of the Hodrick-Prescott filter, also known as Whittaker-Henderson smoothing, using the m-th difference to estimate the trend component.

source

Hodrick-Prescott (HP) Filter

TrendDecomposition.hpFilterFunction
hpFilter(x::Vector, λ::Real)

Apply the Hodrick-Prescott decomposition to vector x with multiplier value λ.

Function returns the trend component.

source
hpFilter(x::Vector, λ::Real, iter::Int)

Compute boosted Hodrick-Prescott filter with number of iterations specified by iter.

Function returns the trend component.

source

Boosted HP Filter

TrendDecomposition.bhpFilterFunction
bhpFilter(x::Vector, λ::Real; Criterion="BIC", max_iter::Int = 100, p::Float64=0.05)

Computes the boosted Hodrick-Prescott filter by appyling the filter iterativly over the trend component with stop criterion being either a Bayesian-type information criterion (BIC) or an augmented Dickey-Fuller (ADF) test.

Function returns the trend component.

source