Abstract
This paper considers an extension of Hodrick–Prescott (HP) filter. It is a hybrid of HP filter and multiple regression. We refer to the filter as “HPX filter”. It is well known that HP filter has a unique global minimizer and the solution can be represented in matrix notation explicitly. Does HPX filter also have a unique global minimizer? Is it accomplished without any additional assumptions? Can the solution be expressed in matrix notation explicitly? In this paper, we answer these questions. In addition, this paper (i) provides an alternative perspective on the filter by representing it as a generalized ridge regression and (ii) gives an extension of it, which is a hybrid of Whittaker–Henderson method of graduation and multiple regression.
Funding source: Japan Society for the Promotion of Science
Award Identifier / Grant number: 20K20759
Acknowledgment
I am grateful to an anonymous referee. The usual caveat applies.
-
Author contributions: The author has accepted responsibility for the entire content of this submitted manuscript and approved submission.
-
Research funding: This study was funded by the Japan Society for the Promotion of Science (https://doi.org/10.13039/501100001691) (KAKENHI Grant Number 20K20759).
-
Conflict of interest statement: The author declares no conflicts of interest regarding this article.
A.1 Proof of Proposition 1
Given that
DD
⊤
is positive definite, it follows that ω
i
> 0 for i = 1, …, T − 2. Accordingly, it follows that
A.2 Proof of Lemma 1
(i) Let DX be of full column rank. Given that DΠ = 0, premultiplying Xκ 1 + Πκ 2 = 0 by D yields DXκ 1 = 0. Given that DX is of full column rank, we have κ 1 = 0. Accordingly, it follows that Πκ 2 = 0. Given that Π is of full column rank, we also have κ 2 = 0. Therefore, if DX is of full column rank, then [ X , Π] is of full column rank. (ii) Let [ X , Π] be of full column rank. Suppose that ζ such that DXζ = 0 is not equal to 0. Then, Xζ ≠ 0 belongs to the null space of D . Given that the null space of D is identical to the column space of Π, Xζ belongs to the column space of Π, which contradicts that [ X , Π] is of full column rank. Thus, ζ = 0. Therefore, if [ X , Π] is of full column rank, DX is of full column rank.
A.3 Another Proof of Lemma 4
(i) Let
ξ
≠ 0 be an n-dimensional column vector such that
Dξ
≠ 0. In other words,
ξ
≠ 0 does not belong to the null space of
D
. Then, given that
Q
X
is symmetric and idempotent, it follows that
A.4 Proof of Corollary 1
From (13), we have the following simultaneous equations for
(i) Let us prove (17). Premultiplying (A.2) by
X
⊤
P
λ
leads to
A.5 MATLAB/GNU Octave user-defined functions
In this subsection, we provide MATLAB/GNU Octave user-defined functions to implement HPX filter and its extension.
A.5.1 A function to calculate the column vector defined by (16)
function [alphahat] = HPXfilter(y, X, lambda)
[T, k] = size(X); I = eye(T); D = diff(I, 2);
W = [X, I]; E = [zeros(T-2, k),D];
alphahat=(W’*W + lambda*E’*E)\(W’*y);
end
A.5.2 A function to calculate the column vector defined by (22)
function [betahat] = HPXfilter_alt(y, X, lambda)
[T, k] = size(X); Pi = [ones(T, 1),(1:T)’];
L = tril(ones(T)); Gam = cumsum(L(:, 3:T));
V = [X, Pi, Gam]; S = [zeros(T−2, k+2), eye(T−2)];
betahat=(V’*V + lambda*S’*S)\(V’*y);
end
A.5.3 A function to calculate the column vector defined by (24)
function [alphaphat] = HPXfilter_ext(y, X, lambda, p)
[T, k] = size(X); I = eye(T); Dp = diff(I, p);
W = [X, I]; Ep = [zeros(T−p, k), Dp];
alphaphat = (W’*W + lambda*Ep’*Ep)\(W’*y);
end
References
Abadir, K. M., and J. R. Magnus. 2005. Matrix Algebra. Cambridge: Cambridge University Press.10.1017/CBO9780511810800Search in Google Scholar
Alfaro, R., and M. Drehmann. 2022. “The Holt-Winters Filter and the One-Sided HP Filter: A Close Correspondence.” BIS Working Paper No 1033. https://www.bis.org/publ/work1033.pdf.10.2139/ssrn.4166686Search in Google Scholar
Ball, L., and G. Mankiw. 2002. “The NAIRU in Theory and Practice.” The Journal of Economic Perspectives 16 (4): 115–36. https://doi.org/10.1257/089533002320951000.Search in Google Scholar
Cornea-Madeira, A. 2017. “The Explicit Formula for the Hodrick–Prescott Filter in a Finite Sample.” The Review of Economics and Statistics 99 (2): 314–8. https://doi.org/10.1162/rest_a_00594.Search in Google Scholar
Danthine, J.-P., and M. Girardin. 1989. “Business Cycles in Switzerland: A Comparative Study.” European Economic Review 33 (1): 31–50. https://doi.org/10.1016/0014-2921(89)90035-4.Search in Google Scholar
De Jong, R. M., and N. Sakarya. 2016. “The Econometrics of the Hodrick–Prescott Filter.” The Review of Economics and Statistics 98 (2): 310–7. https://doi.org/10.1162/rest_a_00523.Search in Google Scholar
Drehmann, M., and J. Yetman. 2018. “Why You Should Use the Hodrick–Prescott Filter – At Least to Generate Credit Gaps.” BIS Working Papers No 744. https://www.bis.org/publ/work744.pdf.Search in Google Scholar
Du, R., and H. Yamada. 2020. “Principle of Duality in Cubic Smoothing Spline.” Mathematics 8 (10): 1–19, https://doi.org/10.3390/math8101839.Search in Google Scholar
Engle, R. F., C. W. J. Granger, J. Rice, and A. Weiss. 1986. “Semiparametric Estimates of the Relation Between Weather and Electricity Sales.” Journal of the American Statistical Association 81 (394): 310–20. https://doi.org/10.1080/01621459.1986.10478274.Search in Google Scholar
Green, P. J., and B. W. Silverman. 1994. Nonparametric Regression and Generalized Linear Models: A Roughness Penalty Approach. Boca Raton: Chapman and Hall/CRC.10.1007/978-1-4899-4473-3Search in Google Scholar
Hall, V., and P. Thomson. 2022. “A Boosted HP Filter for Business Cycle Analysis: Evidence from New Zealand’s Small Open Economy.” SEF Working Paper 1/2022. Victoria University of Wellington. https://researcharchive.vuw.ac.nz/xmlui/bitstream/handle/10063/9473/Working%20Paper.pdf?sequence=6.Search in Google Scholar
Hamilton, J. D. 2018. “Why You Should Never Use the Hodrick–Prescott Filter.” The Review of Economics and Statistics 100: 831–43. https://doi.org/10.1162/rest_a_00706.Search in Google Scholar
Hodrick, R. J., and E. C. Prescott. 1997. “Postwar US Business Cycles: An Empirical Investigation.” Journal of Money, Credit, and Banking 29 (1): 1–16. https://doi.org/10.2307/2953682.Search in Google Scholar
Hoerl, A. E., and R. W. Kennard. 1970. “Ridge Regression: Biased Estimation for Nonorthogonal Problems.” Technometrics 12 (1): 55–67. https://doi.org/10.1080/00401706.1970.10488634.Search in Google Scholar
Kim, S., K. Koh, S. Boyd, and D. Gorinevsky. 2009. “ℓ1 Trend Filtering.” SIAM Review 51 (2): 339–60. https://doi.org/10.1137/070690274.Search in Google Scholar
Mei, Z., P. C. B. Phillips, and Z. Shi. 2022. Cowles Foundation Discussion Paper No. 2348, 1–45. Yale University. https://cowles.yale.edu/sites/default/files/2022-12/d2348_0.pdf.Search in Google Scholar
Ouahilal, M., M. E. Mohajir, M. Chahhou, and B. E. E. Mohajir. 2017. “A Novel Hybrid Model Based on Hodrick–Prescott Filter and Support Vector Regression Algorithm for Optimizing Stock Market Price Prediction.” Journal of Big Data 4: 31. https://doi.org/10.1186/s40537-017-0092-5.Search in Google Scholar
Paige, R. L., and A. A. Trindade. 2010. “The Hodrick–Prescott Filter: A Special Case of Penalized Spline Smoothing.” Electronic Journal of Statistics 4: 856–74. https://doi.org/10.1214/10-ejs570.Search in Google Scholar
Phillips, P. C. B. 2010. “Two New Zealand Pioneer Econometricians.” New Zealand Economic Papers 44 (1): 1–26. https://doi.org/10.1080/00779951003614057.Search in Google Scholar
Phillips, P. C. B., and S. Jin. 2021. “Business Cycles, Trend Elimination, and the HP Filter.” International Economic Review 62 (2): 469–520. https://doi.org/10.1111/iere.12494.Search in Google Scholar
Phillips, P. C. B., and Z. Shi. 2021. “Boosting: Why You Can Use the HP Filter.” International Economic Review 62 (2): 521–70. https://doi.org/10.1111/iere.12495.Search in Google Scholar
Sakarya, N., and R. M. de Jong. 2020. “A Property of the Hodrick–Prescott Filter and its Application.” Econometric Theory 36 (5): 840–70. https://doi.org/10.1017/s0266466619000331.Search in Google Scholar
Sakarya, N., and R. M. de Jong. 2022. “The Spectral Analysis of the Hodrick–Prescott Filter.” Journal of Time Series Analysis 43 (3): 479–89. https://doi.org/10.1111/jtsa.12622.Search in Google Scholar
Seber, G. A. F. 2008. A Matrix Handbook for Statisticians. Hoboken: Wiley.10.1002/9780470226797Search in Google Scholar
Weinert, H. L. 2007. “Efficient Computation for Whittaker–Henderson Smoothing.” Computational Statistics & Data Analysis 52 (2): 959–74. https://doi.org/10.1016/j.csda.2006.11.038.Search in Google Scholar
Wolf, E., F. Mokinski, and Y. Schüler. 2022. “On Adjusting the One-Sided Hodrick–Prescott Filter.” SSRN Working Paper.Search in Google Scholar
Yamada, H. 2014. “Estimating the Time-Varying NAIRU and the Phillips Curve Slope Simultaneously: A Note.” Applied Economics Letters 24: 1057–9. https://doi.org/10.1080/13504851.2014.907474.Search in Google Scholar
Yamada, H. 2015. “Ridge Regression Representations of the Generalized Hodrick–Prescott Filter.” Journal of the Japan Statistical Society 45: 121–8. https://doi.org/10.14490/jjss.45.121.Search in Google Scholar
Yamada, H. 2020. “A Smoothing Method that Looks like the Hodrick–Prescott Filter.” Econometric Theory 36 (5): 961–81. https://doi.org/10.1017/s0266466619000379.Search in Google Scholar
Yamada, H. 2022. “Trend Extraction from Economic Time Series with Missing Observations by Generalized Hodrick–Prescott Filters.” Econometric Theory 38 (3): 419–53. https://doi.org/10.1017/s0266466621000189.Search in Google Scholar
Yamada, H. 2023. “Quantile Regression Version of Hodrick–Prescott Filter.” Empirical Economics 64: 1631–45. https://doi.org/10.1007/s00181-022-02292-8.Search in Google Scholar
Supplementary Material
This article contains supplementary material (https://doi.org/10.1515/snde-2023-0004).
© 2023 Walter de Gruyter GmbH, Berlin/Boston
Articles in the same Issue
- Frontmatter
- Research Articles
- Age and gender differentials in unemployment and hysteresis
- Estimation and testing of the factor-augmented panel regression models with missing data
- Multi-kernel property in high-frequency price dynamics under Hawkes model
- Causal relationships between cryptocurrencies: the effects of sampling interval and sample size
- Panel threshold model with covariate-dependent thresholds and its application to the cash flow/investment relationship
- HPX filter: a hybrid of Hodrick–Prescott filter and multiple regression
Articles in the same Issue
- Frontmatter
- Research Articles
- Age and gender differentials in unemployment and hysteresis
- Estimation and testing of the factor-augmented panel regression models with missing data
- Multi-kernel property in high-frequency price dynamics under Hawkes model
- Causal relationships between cryptocurrencies: the effects of sampling interval and sample size
- Panel threshold model with covariate-dependent thresholds and its application to the cash flow/investment relationship
- HPX filter: a hybrid of Hodrick–Prescott filter and multiple regression