Home A New Method for Specifying the Tuning Parameter of ℓ1 Trend Filtering
Article
Licensed
Unlicensed Requires Authentication

A New Method for Specifying the Tuning Parameter of ℓ1 Trend Filtering

  • Hiroshi Yamada EMAIL logo
Published/Copyright: May 1, 2018

Abstract

Because Hodrick–Prescott (HP) filtering and ℓ1 trend filtering are expressed as penalized least squares problem, both of them require the specification of their tuning parameter. For HP filtering, we have accumulated knowledge for selecting the value of its tuning parameter. However, we do not have similar knowledge for ℓ1 trend filtering. This paper presents a new method for specifying the tuning parameter of ℓ1 trend filtering so that the sum of squared residuals of HP filtering and that of ℓ1 trend filtering may be equivalent.

JEL Classification: C22

Acknowledgement

The author thanks an anonymous referee for his/her valuable suggestions and comments. The usual caveat applies. This work was supported by JSPS KAKENHI Grant Number 15K13010.

Appendix

A MATLAB function for calculating x^lt and x^

A MATLAB function for calculating x^lt and x^ from y and pc, which depends on the CVX developed by Grant and Boyd (2013), is as follows.

function [x_lt, x_ast] = l1filtering(y, p_c) n = length(y); t = (1:n)′; I_n = eye(n); D = diff(I_n, 2); psi = (2*sin(pi/p_c))^(−4) x_hp = (I_n + psi*D′*D)\y; cvx_clear cvx_begin variables x_ast(n) minimize(norm(D*x_ast, 1)) subject to sum((y − x_ast).^2) < = sum((y − x_hp).^2) cvx_end lambda = 2*norm((D*D′)\(D*(y − x_ast)), inf) cvx_clear cvx_begin variables x_lt(n) minimize(sum((y − x_lt).^2) + lambda*norm(D*x_lt, 1)) cvx_end SSR1 = sum((y − x_hp).^2) SSR2 = sum((y − x_ast).^2) SSR3 = sum((y − x_lt).^2) end

References

Gómez, V. 2001. “The Use of Butterworth Filters for Trend and Cycle Estimation in Economic Time Series.” Journal of Business and Economic Statistics 19 (3): 365–373.10.1198/073500101681019909Search in Google Scholar

Grant, M., and S. Boyd. 2013. CVX: Matlab Software for Disciplined Convex Programming, version 2.0 beta, http://cvxr.com/cvx.Search in Google Scholar

Hatanaka, M., and H. Yamada. 2003. Co-trending: A Statistical System Analysis of Economic Trends. Tokyo: Springer.10.1007/978-4-431-65912-9Search in Google Scholar

Hodrick, R. J., and E. C. Prescott. 1997. “Postwar U.S. Business Cycles: An Empirical Investigation.” Journal of Money, Credit and Banking 29 (1): 1–16.10.4324/9780203070710.pt8Search in Google Scholar

Kim, S., K. Koh, S. Boyd, and D. Gorinevsky. 2009. “ℓ1 Trend Filtering.” SIAM Review 51 (2): 339–360.10.1137/070690274Search in Google Scholar

King, R. G., and S. T. Rebelo. 1993. “Low Frequency Filtering and Real Business Cycles.” Journal of Economic Dynamics and Control 17 (1 2): 207–231.10.1016/S0165-1889(06)80010-2Search 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–874.10.1214/10-EJS570Search in Google Scholar

Rockafellar, R. T. 1970. Convex Analysis. Princeton: Princeton University Press.10.1515/9781400873173Search in Google Scholar

Sato, K. 2002. “From Fast to Last: The Japanese Economy in the 1990s.” Journal of Asian Economics 13: 213–235.10.1016/S1049-0078(02)00113-6Search in Google Scholar

Tibshirani, R. 1996. “Regression Shrinkage and Selection via the Lasso.” Journal of the Royal Statistical Society Series B 58: 267–288.10.1111/j.2517-6161.1996.tb02080.xSearch in Google Scholar

Tibshirani, R. J. 2014. “Adaptive Piecewise Polynomial Estimation via Trend Filtering.” Annals of Statistics 42 (1): 285–323.10.1214/13-AOS1189Search in Google Scholar

Tibshirani, R. J., and J. Taylor. 2011. “The Solution Path of the Generalized Lasso.” Annals of Statistics 39 (3): 1335–1371.10.1214/11-AOS878Search in Google Scholar

Winkelried, D. 2016. “Piecewise Linear Trends and Cycles in Primary Commodity Prices.” Journal of International Money and Finance 64: 196–213.10.1016/j.jimonfin.2016.01.006Search in Google Scholar

Yamada, H. 2015. “Ridge Regression Representations of the Generalized Hodrick–Prescott Filter.” Journal of the Japan Statistical Society 45: 121–128.10.14490/jjss.45.121Search in Google Scholar

Yamada, H. 2017. “Estimating the Trend in US Real GDP Using the ℓ1 Trend Filtering.” Applied Economics Letters 24 (10): 713–716.10.1080/13504851.2016.1223811Search in Google Scholar

Yamada, H., and L. Jin. 2013. “Japan’s Output Gap Estimation and ℓ1 Trend Filtering.” Empirical Economics 45 (1): 81–88.10.1007/s00181-012-0625-xSearch in Google Scholar

Yamada, H., and G. Yoon. 2014. “When Grilli and Yang Meet Prebisch and Singer: Piecewise Linear Trends in Primary Commodity Prices.” Journal of International Money and Finance 42: 193–207.10.1016/j.jimonfin.2013.08.011Search in Google Scholar

Yamada, H., and G. Yoon. 2016. “Selecting the Tuning Parameter of the ℓ1 Trend Filter.” Studies in Nonlinear Dynamics and Econometrics 20: 97–105.10.1515/snde-2014-0089Search in Google Scholar


Supplementary Material

The online version of this article offers supplementary material (https://doi.org/10.1515/snde-2016-0073).


Published Online: 2018-05-01

©2018 Walter de Gruyter GmbH, Berlin/Boston

Downloaded on 16.9.2025 from https://www.degruyterbrill.com/document/doi/10.1515/snde-2016-0073/html
Scroll to top button