In this box you will work with the HP-filter. This is a procedure to decompose economic variables into a trend and a cycle. The HP-filter allows for a flexible time-varying trend, in contrast to imposing a constant trend over long periods of time —say, decades. Since long-term trends change (eventually), this provides a better measure of the cycles i.e. deviations from trend.
The purpose of the box is to calculate the co-movement and volatility of consumption and investment relative to GDP, all measured in real terms. For this exercise you will use table 1.1.6 from BEA.gov once again; starting in 1960:Q1 to the latest available year at a quarterly frequency. The smoothing parameter λ (lambda) for quarterly data is 1,600.
The box has to describe the nature of the filter and report the correlation and volatility of the cyclical components of GDP, consumption, and investment over time. The focus will be on the Great Moderation which is known as the period under which the U.S. economy experienced a break in the volatility of most of its macroeconomic variables. The literature has identified it as beginning in the mid-1980s, and ending in 2008 with the Great Recession. Part of the exercise is to identify the Great Moderation in the data and see whether the 2008 broke that trend; that is, has the U.S. economy become as volatile as before 1984, or has the moderation persisted?
To create the box follow these steps:
Example. Suppose you want to filter 5 data points in the first five cells of column A, say
A1:A5, at lambda = 1600.
Enter the following formula into cell B1: =HP(A1:A5,1600)
Then hit return or enter.
Then, starting with cell B1, select cells B1 through B5
Then hit the Ctrl, Shift, and Enter buttons simultaneously. This will HP-Filter the entire set of cells from A1-A5 and place the filtered series into B1-B5.
5. For the case of GDP, the variable on column A should be the ln(GDP) and column B represents the trend, ln(GDP*). The next step is to compute the cycle ln(GDP) – ln(GDP*) in column C. Now you can plot it and calculate its standard deviation. Do the same for consumption and investment.