ARE/ECN 240C Time Series Analysis Fall 2002 Professor Òscar Jordà Economics, U.C. Davis PROBLEM SET 4 – SOLUTIONS Part I – Analytical Questions Problem 1: Consider a stationary autoregressive process A(L)Xt = t and its corresponding moving average representation, Xt = C(L)t , where C ( L) i 0 Ci Li . (a) Find the moving average coefficients for an VAR(1) process. Solution Because this is a VAR(1), calculation of the MA representation is quite easy. Thus, if Xt = A1Xt-1 + t, then Ci = A1i. (b) Show that the moving average coefficients for a VAR(2) can be found recursively by C0 I ; C1 A1 ; and Ci A1Ci 1 A2Ci 2 for i 2,... Solution A stationary VAR has a moving average representation given by X t i 0 Ci t i . Plugging this formula into that of a VAR(2) such as, X t A1 X t 1 A2 X t 2 t , we find, C A1 i 0 Ci t i 1 A2 i 0 Ci t i 2 t , i 0 i t i which can be rewritten as, 0 (C0 I ) t (C1 A1C0 ) t 1 (C2 A1C1 A2C0 ) t 2 ... , which delivers the coefficients for each of the epsilon. Since the epsilon can take on any value in p , each of these coefficients must equal zero. Hence, C0 = I, C1 = A1, and Ct A1Ct 1 A2Ct 2 t 2,3,... 1 ARE/ECN 240C Time Series Analysis Fall 2002 Professor Òscar Jordà Economics, U.C. Davis Problem 2: Consider the following bivariate VAR, yt yy yt 1 ym mt 1 u yt mt my yt 1 mm mt 1 umt 2 with E (ut ut ' ) y . 2 m (a) Find a matrix H, which is lower triangular and ensures that if Hu t t , then E ( t t ' ) D where D is a diagonal matrix. Solution 1 For example, H 2 y 0 1 (b) Given this matrix H calculate the structural representation of this VAR. Solution yt mt y (my y2 t yy yt 1 ym mt 1 yt 2 yy ) yt 1 (mm 2 ym )mt 1 mt y y (c) Calculate the VMA representation for the reduced form of this VAR (notice that it is very simple in this case – don’t apply the usual formulas mechanically!) Solution yy ym yt u yt yy ym u yt 1 ... mt umt my mm umt 1 my mm k u yt k ... umt k 2 ARE/ECN 240C Time Series Analysis Fall 2002 Professor Òscar Jordà Economics, U.C. Davis (d) Calculate the VMA representation of the structural form of the VAR. Solution 1 0 u 1 0 y t yt yy ym u yt 1 ... 1 1 my mm u umt 2 mt y2 mt 1 y k 0 1 u yy ym yt k ... 1 2 my mm umt k y (e) Under what conditions will the reduced form and the structural form produce identical impulse response functions? Solution: The obvious one is = 0. Less obvious, yy ym 0. (f) Suppose you obtained the structural form as in part (a) but for a system that had the variable m ordered first. Under what conditions would these two structural identification schemes deliver the same impulse responses? Solution: Notice that the matrix H is in this case, 0 1 H 1 2 m Naturally, = 0, would work, but also, either yy ym 0 or my mm 0. Problem 3: Consider the following bivariate VAR y1t 0.3 y1t 1 0.8 y 2t 1 1t y 2t 0.9 y1t 1 0.4 y 2t 1 2t with E ( 1t 1 ) 1 for t = and 0 other wise, E ( 2t 2 ) 2 for t = and 0 other wise, and E ( 1t 2 ) 0 for all t, and . Answer the following questions: 3 ARE/ECN 240C Time Series Analysis Fall 2002 Professor Òscar Jordà Economics, U.C. Davis (a) Is this system covariance-stationary? Solution To answer this question, verify the roots of the polynomial 1 0 0.3 0.8 z (1 0.3z )(1 0.4 z ) (0.8 z )( 0.9 z ) 0 1 0.9 0.4 1 0.7 z 0.6 z 2 The roots are 0.833 and 2, hence the system is not-stationary. (b) Calculate s y t s for s = 0, 1, and 2. What is the limit as s ? t ' Solution 1 0 0.3 0.8 0.81 0.56 0 ; 1 ; 2 0 1 0.9 0.4 0.63 0.88 s 0.3 0.8 Clearly, since s and the process is not stationary, then s . 0.9 0.4 (c) Calculate the fraction of the MSE of the two period-ahead forecast error for 2 variable 1, E y Eˆ ( y | y , y ,...) , that is due to 1,t 1 and 1,t 2 1,t 2 1,t 2 t t 1 Solution 2 2 E y1,t 2 Eˆ ( y1,t 2 | yt , yt 1 ,...) E1,t 2 0.31,t 1 0.8 2,t 1 1 0.32 0.82 2 2.37 The fraction due to 1 is (1 + 0.32)/2.37 = 0.46 or 46%. Problem 4: Consider the process y t z t y t 1 1t | | 1 z t z t 1 2 t | | 1 12 0 t ~ N ; 11 0 12 22 4 ARE/ECN 240C Time Series Analysis Fall 2002 Professor Òscar Jordà Economics, U.C. Davis (a) Derive E ( xt | xt 1 ); V ( xt | xt 1 ) and D( xt | xt 1 ) where D denotes the density function and xt ' ( yt zt ). Hint: the system can be rewritten in matrix form as 1 yt 0 1 zt 0 0 yt 1 1t zt 1 2t Solution 1 Pre-multiply the system by A = , the inverse of the contemporaneous 0 1 correlation matrix, to obtain, yt yt 1 u1t ; zt 0 zt 1 u2t u1t 1 1t u 2 t 0 1 2 t Thus, y t 1 xt 1 ; E ( xt | xt 1 ) 0 zt 1 E (ut ut ' ) E ( A t t ' A' ) 1 11 12 1 0 11 212 2 22 12 22 W . 12 22 22 0 1 12 22 1 Given this expressions for the conditional mean and the variance, and noting that the u’s are linear combinations of the and therefore are normally distributed, the conditional distribution D(xt|xt-1) is multivariate normal with conditional mean and variance given by the expressions derived above. (b) Assume that xt is stationary. Derive E ( xt ); V ( xt ) and show that V ( xt ) V ( xt | xt 1 ) is positive definite. What are the implications of this result? Solution By stationarity, E ( xt ) E ( xt 1 ) 0 and therefore, E ( xt ) 0 . Similarly, V ( xt ) V ( xt 1 ) 'W . Since in (a) we calculated that V ( xt | xt 1 ) W , it follows that V ( xt ) V ( xt | xt 1 ) V ( xt ) ' which is a quadratic form and therefore positive definite for V ( xt ) 0 . The rational is that the conditional variance uses “more information” (hence the conditioning) than the unconditional variance. 5 ARE/ECN 240C Time Series Analysis Fall 2002 Professor Òscar Jordà Economics, U.C. Davis Problem 5: Consider the Gaussian linear regression model, y t x t ' ut with ut ~ i.i.d. N(0, 2) and ut independent of x for all t and . Define ( ' , 2 )'. The log of the likelihood of (y1, …, yT) conditional on (x1,…,xT) is given by T L( ) (T / 2) log( 2 ) (T / 2) log( 2 ) ( y t x t ' ) 2 /( 2 2 ) t 1 (a) Show that the estimate T T 2 log f ( yt | Yt 1 ; ) g ( ; YT ) h( , YT ) ˆ DT ' (1 / T ) (1 / T ) ' ˆT ' ˆ ' t 1 t 1 T ˆT 1 T 2 0 T x t x t ' / ˆ T t 1 ’ where is given by Dˆ T ' uˆt2 1 T 1 0 T t 1 2ˆ T4 ˆ T6 uˆt ( yt x t ' ˆT ) and ̂ T and ˆ T2 denote the maximum likelihood estimates. Solution The proof is straightforward by direct differentiation of the likelihood and noticing T that uˆ t 1 t 0 from the first order conditions. T (b) Show that the estimate SˆT (1 / T ) h(ˆ, Yt ) h(ˆ, Yt ) ' is given by t 1 1 T 2 4 uˆt x t x t ' / ˆ T T t 1 SˆT 1 T uˆ 3x t 6t T t 1 2ˆ T uˆt3x t 6 t 1 2ˆ T 2 . 2 T uˆt 1 1 4 T t 1 2ˆ T 2ˆ T2 1 T T Solution: this proof is also straightforward once you realize h(ˆ, Yt ) is the score of the log-likelihood evaluated at the MLE estimates. 6 ARE/ECN 240C Time Series Analysis Fall 2002 Professor Òscar Jordà Economics, U.C. Davis Q / 2 0 (c) Show that the p lim( SˆT ) p lim( Dˆ T ) where for 1 /( 2 4 ) 0 Q p lim( 1 / T )t 1 x t x t '. T Solution: The proof requires the following intermediate results: p lim 1 T T t 1 uˆt2 2 ; 1 T uˆt 0 . Direct application of conventional asymptotic results delivers the T t 1 desired result. p lim (d) Consider a set of m linear restrictions on of the form R = r for R a known ˆ D̂ , the Wald ( m k ) matrix and r a known ( m 1) vector. Show that for T T 1 g ( ) g ( ) ˆ test statistic given by T g (ˆT ) ' ' T ' ˆT ' ˆT 1 g (ˆ ) is T identical to the Wald test form of the OLS 2 test given by 1 (R ˆ r )' s 2 R(x ' x ) 1 R' (R ˆ r ) with the OLS estimate of the variance T sT2 T T T T replaced with the MLE ˆ . 2 T (e) Show that when the lower left and upper right blocks of Ŝ T are set to their plim of zero, then the quasi-maximum likelihood Wald test of R = r is identical to the heteroskedasticity-consistent form of the OLS 2 test given by ˆ 1 ˆ Q ˆ 1 / T )R' 1 (R ˆ r ) (R ˆ r )' R(Q T T T T T 7 ARE/ECN 240C Time Series Analysis Fall 2002 Professor Òscar Jordà Economics, U.C. Davis II – Empirical Questions VARs The goal of this exercise is to program a simple estimation routine in GAUSS that allows you to compute impulse response functions. Then you can check your results against those reported in EViews. The data that we will use for this analysis is contained in the file ps4.csv and it contains the following variables: Column 1: logarithm of nonagricultural payroll employment. Use mnemonic EM. Column 2: logarithm of personal consumption expenditures deflator (1996 = 100). Use mnemonic P. Column 3: Annual growth rate of the index of sensitive materials prices issued by the Conference Board. Use mnemonic PCOM. Column 4: Federal funds rate. Use mnemonic FF. Column 5: ratio of nonborrowed reserves plus extended credit to total reserves. Use mnemonic NBRX. Column 6: Annual growth rate of M2. Use mnemonic DM2. The data is recorded at a monthly frequency and the sample spans January 1960 to February 2001. These data correspond to the paper “Monetary Policy and the Term Structure of Nominal Interest Rates,” by Charles L. Evans and David A. Marshall, Carnegie-Rochester Conference Series on Public Policy, 1998, v. 49, 53-111. The sample obviously expands the original sample to 2001. I have taken the liberty to transform the data for you so you need not worry about further manipulations. You may consult this paper to understand the purpose of the transformations and the type of experiments that Evans and Marshall (1998) consider. For the homework exercise, however, the goal is more modest. Questions: (a) Load the data in EViews and estimate this VAR with a lag length of 6. Compute the impulse responses to a shock in the variable FF using the Wold causal order implied by the order in which I reported the variables. To make sure you are doing things properly, subsample the data so as to match Evans and Marshall and make sure that you can replicate their results. (b) Now write code in GAUSS that will allow you to: a. Estimate by OLS the reduced form VAR. Hint: notice that you can estimate the whole system in one shot by noticing that in the reduced form VAR, Yt X t B U t , where X t {1, Yt 1 ,..., Yt p }' (so that Y is a (T p ) n vector, X is a (T p ) (1 np ) matrix, and B is a (1 np ) n ), B can be estimated as: Bˆ ( X ' X ) 1 X ' Y . 8 ARE/ECN 240C Time Series Analysis Fall 2002 Professor Òscar Jordà Economics, U.C. Davis b. Calculate the variance-covariance matrix of the residuals of this VAR and compute the Choleski decomposition. Use this decomposition to obtain the structural VAR. c. Compute the impulse responses of all the variables in the VAR to a shock in the variable FF. Make sure that you display these impulse responses and ensure that you replicate those you obtain in EViews. d. Compute standard errors for the impulse responses using two alternative methods: (i) a Monte-Carlo method and (ii) a bootstrap. Both methods are described in the last two paragraphs of page 337 of Hamilton’s book. Make sure that these computations also match those available in EViews. My advice is that you polish your programming skills a bit by using “procs” stored in an auxiliary .src file so that you can keep track of all of these tasks and to save these routines for yourself in case you need them in the future. Otherwise this program is likely to take several pages of code and then it becomes difficult to manage. 9