This blog piece intends to introduce a new addin (i.e. HXPRINCOMP) that implements the procedure developed by Hamilton and Xi (2022).
Table of Contents
 Introduction
 Principal components analysis on cyclical component
 Application to U.S. Treasury Yields
 Application to large macroeconomic data sets
 Files
 References
Introduction
In their paper, Hamilton and Xi (2022) propose a novel methodology when the goal is to extract the common factors behind the cyclical components of each of the series studied. They argue that focusing on the cyclical component of a time series offers a practical advantage; namely, it can be consistently estimated using an OLS regression while remaining agnostic about the stationarity of the underlying series.Principal components analysis on cyclical component
The procedure starts with estimating the following OLS regression for every variable: $$ y_{it} = \alpha_{i0} + \alpha_{i1} \cdot y_{i,th} + \alpha_{i2} \cdot y_{i,th1} + \cdots + \alpha_{ip} \cdot y_{i,thp+1} + c_{it} $$ Here, $(h = 8)$ and $(p = 4)$ for quarterly data and $(h = 24)$ and $(p = 12)$ for monthly data. Authors postulate that true cyclical components, $( C_t = (c_{1t}, c_{2t}, \ldots, c_{Nt})^top )$, are characterized by a factor structure $( r \ll N )$ of the form: $$ \underbrace{\mathbf{C}_t}_{(N \times 1)} = \underbrace{\Lambda}_{(N \times r)} \cdot \underbrace{\mathbf{F}_t}_{(r \times 1)} + \underbrace{\mathbf{e}_t}_{(N \times 1)} $$ Authors also show that even if the cyclical components are not observed and are therefore estimated $( \hat{c}_{it} = c_{it} + \upsilon_{it} )$, true factors can still be consistently estimated under certain conditions.Application to U.S. Treasury Yields
As a first example, authors apply their method to treasury yields with different maturities (see Figure 1).






Application to large macroeconomic data sets
When using principal components analysis on large macroeconomic data sets, one may need to transform each of the variables to ensure stationarity. Since it is done individually, it could be a tedious task. Extracting the cyclical component of series solves this problem by design.As a second example, authors apply their methodology to a large macroeconomic data set (20224 vintage of FREDMD database), which covers 127 variables. To run the procedure on macroeconomic data, once again we can use the addin (see Figure 4).




Files
References
 Hamilton, J. D., and Xi, J. (2022), Principal Component Analysis for Nonstationary Series, Working Paper, UC San Diego.
Excellent work!
ReplyDelete