Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Problem Set 2 Graduate Macro II, Spring 2010 The University of Notre Dame Professor Sims Instructions: You may consult with other members of the class, but please make sure to turn in your own work. Where applicable, please print out …gures and codes. This problem set is due at the beginning of class on Tuesday, February 2. (1) The Hodrick-Prescott Filter: In this problem you will derive the HP …lter and create your own code for implementing it. Suppose you have a sequence of data, yt with t = 1; :::; T (i.e. there are T total observations). Our objective is to …nd a trend, f t gTt=1 to minimize the following objective function: min t The parameter 0: T X t=1 (yt 2 t) + T 1 X [( t+1 t) ( t 2 t 1 )] t=2 (a) Provide a verbal interpretation of this objective function and what exactly one is trying to get at when choosing a trend, f t gTt=1 . (b) Prove that, if = 0, then the solution is for the actual series would be identical. t = yt 8 t. In other words, the trend and (c) Prove that, as ! 1, then the solution is for for the trend to be a linear time trend; i.e. for t = t for some . (d) For the more general case in which 0 < < 1, derive analytical conditions which implicitly de…ne the trend. To do this, take the derivative with respect to t for each t = 1; :::; T and set them equal to zero, yielding T …rst order conditions. (e) Write a Matlab code to …nd the trend taking the actual data series, yt , and parameter, , as inputs. To do this, express the …rst order conditions in (d) in matrix form as follows: T= Y T= 1 Y Where is a T T matrix whose elements are functions of ; T is a T [ 1 2 . . . T ]0 and Y is a T 1 vector equal to [y1 y2 . . . yT ]0 . 1 vector equal to (f) Download quarterly, seasonally adjusted data on US real GDP from 1947 quarter 1 to 2009 quarter 3 (this should be available, for example, on the St. Louis Fed FRED data website). Take natural logs of the data, and then use your code to compute the HP trend 1 using = 1600. Show a plot of the trend. Get the “cycle” series by subtracting the trend from the actual series. Show a plot of the cyclical component. What is the standard deviation of the HP detrended GDP? Hold on the time series for the “cycle” series; you’re going to need it in the next problem. (2) Using a Structural VAR to Decompose GDP Into Trend and Cycle: In the “extreme”version of the permanent income hypothesis (PIH), the response of consumption to transitory income shocks is zero.1 Permanent shocks to income are revealed in surprise movements in consumption. As such, the simple theory suggests that one way to decompose GDP into its trend and cycle is by examining innovations (i.e. surprise movements) in both consumption and GDP. Surprise movements that are common to both consumption and GDP are then taken to be permanent shocks, while surprise movements in GDP that are uncorrelated with movements in consumption should be transitory. (a) In an important paper, Cochrane (1994) estimates a bivariate VAR with the log of real non-durable and services consumption and the log of real GDP. He then performs a Choleski decomposition on the residuals, “ordering” consumption …rst. This means that the …rst structural shock is an innovation to consumption, which, under the theory, ought to have a permanent e¤ect on both consumption and income. The second structural shock, which is an innovation to income orthogonal to consumption, ought to have no e¤ect on consumption at any horizon and a transitory e¤ect on income. Estimate Cochrane’s VAR using quarterly data for the US from 1948-2009. Use a lag speci…cation of p = 2. You can estimate the VAR by using OLS to estimate the following two regression equations: ct = yt = + 2+ 1 1;1 ct 1 + 2;1 ct 1 + 1;2 yt 1 + 2;2 yt 1 + 1;3 ct 2 + 2;3 ct 2 + 1;4 yt 2 + ec;t 2;4 yt 2 + ey;t ec;1 ec;2 ::: ec;T (this should be a 2 T matrix, with each row the ey;1 ey;2 ::: ey;T corresponding vector of residuals). Find the variance-covariance matrix of these residuals, which will be equal to T p 1p q 1 ee0 , where T is the number of observations, p is the number of lags, and q is the number of variables in the VAR. Write out your variance-covariance matrix (the numbers should be small). Denote this variance covariance matrix as e . De…ne the matrix et = (b) Under the theory, permanent shocks impact both consumption and GDP on impact, whereas transitory shocks only a¤ect GDP. This suggests orthogonalizing these innovations via a Choleski decomposition. Setting the variance-covariance matrix of the structural shocks (the structural shocks are denoted by "t ) to be an identity matrix, this means that the Choleski decomposition is some matrix, B, satisfying: e = BB0 1 Formally, the conditions required for this “extreme” version to hold are that utility be quadratic and time seperable and that the real interest rate be constant and equal to the rate of time preference. 2 To …nd this matrix, in Matlab type “B = chol(sigma)” (or whatever you call your variance-covariance matrix of reduced form innovations). Then type “B = B0 ” (this is because Matlab produces an upper triangular matrix, whereas we want a lower triangular one. Write out your B matrix here. (c) The impulse responses to these structural shocks can be found by inverting the reduced form AR parameters and imposing the relationship between reduced form and structural shocks. Formally, the reduced form representation can be written: A(L)xt = et xt = A(L) 1 et xt = A(L) 1 B"t You should be able to trace out the impulse response function given your estimates of A(L) (found from estimation equation by equation using OLS) and B (which comes from the Choleski decomposition of the reduced form residuals). Show the impulse responses of both consumption and GDP to both the …rst and the second shock, where the shock should be equal to one unit in both cases. Do the impulse responses appear loosely in line with the predictions of theory? (d) Given your estimates of the VAR residuals (or innovations) and your estimate of B, you can come up with a time series of the structural shocks. The relationship between structural shocks and reduced form innovations is: et = B"t "t = B 1 et Given B and et , you should now have a time series of "t , with the …rst row corresponding to the time series for the …rst “structural shock” and the second row corresponding to the second “structural shock”. Hold on to these. (e) Take your time series for the cyclical component of output from the HP detrending exercise in #1. Call this series ut . Estimate a univariate autoregression of this series on its own …rst lag. That is, estimate: ut = ut 1 + vt Use your estimate of the autoregressive parameter to come up with a time series of residuals, vbt . Compute the correlation between this series (which can be interpreted as the innovation to the cyclical component of output from an HP detrending exercise) and the second structural shock from the bivariate VAR exercise. Are these two series strongly correlated? Does your answer make sense? Explain. (Note, when computing the correlations make sure that the dates line up properly . . . you’re going to lose the …rst two observations of data when estimating the VAR with two lags, for example). 3