Cookies on Macro by Mark.We use essential cookies for sign-in, locale, and security. With your permission, we also use optional cookies for preferences, for analytics, and for advertising measurement with the Meta (Facebook) Pixel. Read our cookie policy.
Trend-cycle decomposition for a single macro series, comparing smooth HP trend extraction with Beveridge-Nelson permanent-transitory decomposition.
Follow the same equations and assumptions one section at a time or in a continuous reading.
Hover or focus a symbol defined in this model to find its exact matches. Select it to keep the highlight; Escape clears the selection.
The HP filter's objective function trades off fidelity to the data against smoothness of the trend. The derivation gives the closed-form solution, shows that it is a symmetric linear filter, and characterizes its frequency-response function.
The derivation proceeds in three steps: write the objective, take the first-order condition, and solve the resulting banded linear system. The key insight is that the roughness penalty translates into a specific band-limited filter in the frequency domain.
The HP objective. The first term penalizes deviation from the data. The second term penalizes curvature (second differences) of the trend. controls the trade-off.
Matrix form. is the second-difference operator, so extracts .
First-order condition. The solution is a linear function of the data.
Closed-form solution. The matrix is symmetric, positive definite, and banded (bandwidth 5), so it can be solved in operations by banded Cholesky.
The cyclical component is also a linear filter applied to y. Its gain is large at business-cycle frequencies and small at trend frequencies.
Frequency-response (gain) of the HP cycle-extraction filter for an infinite sample. At (trend frequency), the gain is zero. At (highest frequency), the gain approaches 1. The half-power frequency depends on .
Banded structure and O(T) computation
is a pentadiagonal (bandwidth 5) symmetric matrix. Banded Cholesky factorization solves the HP filter in operations, making it computationally trivial even for very long series.
End-point bias
At and , the filter weights are asymmetric because there are no data beyond the sample boundary. The trend estimate at the endpoints is effectively one-sided and revises substantially as new data arrive. This is the HP filter's most criticized property.
The state is updated at observed dates. A line between dates is a display convention unless the model specifies behavior inside the interval.
Read adjacent points as adjacent sample calculations. Smoothness is a property of the estimator, not of the chart line.
Do not infer within-period behavior from a sampled estimator.
The state updates at sample dates. The visible line is only as smooth as the estimated state sequence.
Observed series can move differently from latent states because measurement noise and loadings matter.
Proof lineage
Typed relationships across modelsParents -- models this proof draws from