Penalized Smoothing
Whittaker-Henderson Smoothing
TrendDecomposition.bohlmannFilter
— FunctionbohlmannFilter(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.
Hodrick-Prescott (HP) Filter
TrendDecomposition.hpFilter
— FunctionhpFilter(x::Vector, λ::Real)
Apply the Hodrick-Prescott decomposition to vector x with multiplier value λ.
Function returns the trend component.
hpFilter(x::Vector, λ::Real, iter::Int)
Compute boosted Hodrick-Prescott filter with number of iterations specified by iter.
Function returns the trend component.
Boosted HP Filter
TrendDecomposition.bhpFilter
— FunctionbhpFilter(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.