Problem Set 5: Structural VARs Binder

The exercises are based on this problem set and the answers can be found here.

Exercise 1

Consider the following simple vector autoregression. Let \(y_t\) be detrended log GDP, \(m_t\) be detrended log money, and let \(X_t\) be the vector \((y_t, m_t)'\). Assume that both time series are stationary. Our structural model is given by: \(X_t = A X_t + B X_{t-1} + C u_t\), or:

\[\begin{split}\begin{align} \begin{bmatrix} y_t \\ m_t\end{bmatrix} = \begin{bmatrix}0 & 0 \\ a & 0\end{bmatrix} \begin{bmatrix} y_t \\ m_t\end{bmatrix} + \begin{bmatrix}b_{11} & b_{12} \\ b_{21} & b_{22}\end{bmatrix} \begin{bmatrix}y_{t-1} \\ m_{t-1} \end{bmatrix} + \begin{bmatrix}\sigma_y & 0 \\ 0 & \sigma_m\end{bmatrix} \begin{bmatrix} u^y_t \\ u^m_t\end{bmatrix} \end{align}\end{split}\]

where \(E[u_t] = 0\) and \(E[u_t u'_t] = I\).

Our reduced form model is given by \(X_t = \Gamma X_{t-1} + \epsilon_t\), or:

\[\begin{split}\begin{align} \begin{bmatrix} y_t \\ m_t\end{bmatrix} = \begin{bmatrix}g_{11} & g_{12} \\ g_{21} & g_{22}\end{bmatrix} \begin{bmatrix}y_{t-1} \\ m_{t-1} \end{bmatrix} + \begin{bmatrix} \epsilon^y_t \\ \epsilon^m_t\end{bmatrix} \end{align}\end{split}\]

where \(E[\epsilon] = 0\) and

\[\begin{split}\begin{align} E[\epsilon_t \epsilon'_t] = \Omega = \begin{bmatrix}\omega_{11} & \omega_{12} \\ \omega_{21} & \omega_{22}\end{bmatrix} \end{align}\end{split}\]
  1. Solve for the structural parameters as a function of the reduced form coefficients.

If we write the vector with \(y_t\) and \(m_t\) on the left hand side, we can recover \(B_0\).

\[\begin{split}\begin{align} B_0 &= \begin{bmatrix}1 & 0\\0 & 1\end{bmatrix} - \begin{bmatrix}0 & 0\\a & 0\end{bmatrix}\\ &= \begin{bmatrix}1 & 0\\-a & 1\end{bmatrix} \end{align}\end{split}\]

and the inverse is

\[\begin{split}\begin{align} B^{-1}_0 &= \begin{bmatrix}1 & 0\\-a & 1\end{bmatrix}^{-1}\\ &= \frac{1}{1 \cdot 1 + a \cdot 0}\begin{bmatrix}1 & a\\0 & 1\end{bmatrix} \end{align}\end{split}\]

For the coefficients of the first lagged vector, we get the following relation between reduced and structural form.

\[\begin{split}\begin{align} B_1 &= B_0 G\\ \begin{bmatrix}b_{11} & b_{12} \\ b_{21} & b_{22}\end{bmatrix} &= \begin{bmatrix}1 & 0\\-a & 1\end{bmatrix} \begin{bmatrix}g_{11} & g_{12} \\ g_{21} & g_{22}\end{bmatrix}\\ &= \begin{bmatrix}g_{11} & g_{12} \\ g_{21} - ag_{11} & g_{22} - ag_{12}\end{bmatrix} \end{align}\end{split}\]

For the error term, we have

\[\begin{align} \epsilon_t &= B_0^{-1} C u_t \end{align}\]

And we know that

\[\begin{split}\begin{align} E[\epsilon_t \epsilon'_t] &= E[B_0^{-1} C u_t (B_0^{-1} C u_t)']\\ &= E[B_0^{-1} C u_t u_t' C' B_0^{-1'}]\\ &= B_0^{-1} C E[u_t u_t'] C' B_0^{-1'}\\ &= B_0^{-1} C C' B_0^{-1'}\\ &= B_0^{-1} \begin{bmatrix}\sigma^2_y & 0 \\ 0 & \sigma^2_m\end{bmatrix} B_0^{-1'}\\ &= \begin{bmatrix} \sigma_y^2 & a\sigma^2_m \\ 0 & \sigma^2_m\end{bmatrix} B_0^{-1'}\\ &= \begin{bmatrix} \sigma^2_y + a^2 \sigma_m^2 & a \sigma^2_m \\ a \sigma^2_m & \sigma^2_m\end{bmatrix} \end{align}\end{split}\]

With the four equations, we can back out \(\sigma_y\), \(\sigma_m\) and \(a\) in relation to the \(\omega_i\).

\[\begin{split}\begin{align} \sigma^2_m &= \omega_{22}\\ \omega_{11} &= a \sigma^2_m \leftrightarrow a = \frac{\omega_{12}}{\omega_{22}} = \frac{\omega_{21}}{\omega_{22}}\\ \sigma^2_y &= \omega_{11} - (\frac{\omega_{12}}{\omega_{22}} \omega_{22})^2 = \omega_{11} - \omega_{12} \end{align}\end{split}\]

Inserting \(a\) in the former expression for \(B_1 = B_0 G\) leads to

\[\begin{split}\begin{align} b_{11} &= g_{11}\\ b_{12} &= g_{12}\\ b_{21} &= g_{21} - \frac{\omega_{21}}{\omega_{22}} g_{11}\\ b_{22} &= g_{22} - \frac{\omega_{21}}{\omega_{22}} g_{12} \end{align}\end{split}\]
  1. We say that \(m_t\) Granger causes \(y_t\) if
\[E[y_t \mid y_{t-1}, y_{t-2}, \dots] \neq E[y_t \mid y_{t-1}, m_{t-1}, y_{t-2}, m_{t-2}, \dots]\]

In the context of our model, we can test whether \(m_t\) Granger causes \(y_t\) by testing a fairly simple hypothesis on the reduced form coefficients. Identify the appropriate null and alternative hypotheses on the reduced form coefficients for testing whether output Granger causes money, and the appropriate null and alternative hypotheses for testing whether money Granger causes output.

In general, Granger causality means not causality in the common sense that \(A\) causes \(B\), but more that \(A\) is predictive of or precedes \(B\).

Following this logic, we have to look at the matrix \(G\) of the reduced form. Given that money does not Granger cause output \(g_{12}\) should be zero and if it does \(g_{12}\) should be different. Therefore, we have the following hypotheses:

\[\begin{align} H_0: g_{12} = 0 && H_1: g_{12} \neq 0 \end{align}\]

The same argument applies to the question whether output Granger causes money. The hypotheses are

\[\begin{align} H_0: g_{21} = 0 && H_1: g_{21} \neq 0 \end{align}\]

As we estimate the equations by OLS, the test is equal to a t-test for the coefficients being different to 0. If the problem has not been presented as a \(SVAR(1)\) process, but as a \(SVAR(p)\), we had to employ a F-test for the joint hypothesis that all coeffcients for all lagged versions of the other entity are equal to 0.

  1. What conditions on the structural parameters imply that output fails to Granger cause money? What conditions on the the structural parameters imply that money fails to Granger cause output?

Assuming that output fails to Granger cause money, then

\[\begin{split}\begin{align} 0 &= g_{21}\\ 0 &= b_{21} + \frac{\omega_{21}}{\omega_{22}} b_{11}\\ 0 &= b_{21} + a b_{11} \end{align}\end{split}\]

If money fails to Granger cause output, then

\[\begin{align} 0 &= g_{12} = b_{12} \end{align}\]
  1. Next, we will consider impulse response functions. Let:
\[\begin{split}\begin{align} IRF(k) = \begin{bmatrix} \frac{\partial y_{t+k}}{\partial u_{yt}} & \frac{\partial y_{t+k}}{\partial u_{mt}} \\ \frac{\partial m_{t+k}}{\partial u_{yt}} & \frac{\partial m_{t+k}}{\partial u_{mt}} \end{bmatrix} \end{align}\end{split}\]

Calculate the \(IRF(k)\) in terms of \(A\), \(B\), and \(C\).

As the impulse response function is equal to the matrix in the vector moving average representation, we are rewriting the process to the reduced form, then using lag operators to get the moving average representation.

\[\begin{split}\begin{align} X_t &= A X_t + B X_{t-1} + C u_t\\ (I_k - A) X_t &= B X_{t-1} + C u_t\\ X_t &= (I_k - A)^{-1} B X_{t-1} + (I_k - A)^{-1} C u_t && \to \text{reduced form}\\ X_t &= (I_k - A)^{-1} B L X_t + (I_k - A)^{-1} C u_t\\ (I_k - (I_k - A)^{-1} B L) X_t &= (I_k - A)^{-1} C u_t\\ (I_k - DL) X_t &= (I_k - A)^{-1} C u_t \end{align}\end{split}\]

Note that, in the last line we applied a small simplification where \(D = (I_k - A)^{-1} B\). Now, we want to find another lag operator polynomial \(\Phi(L)\) with \(\Phi(L)D(L) = I_k\).

\[\begin{split}\begin{align} I_k &= \Phi(L)(I_k - DL)\\ &= \Phi_0 + \Phi_1 L + \Phi_2 L^2 + \dots\\ &- \Phi_0 D L + \Phi_1 D L^2 + \Phi_2 D L^3 \dots\\ \end{align}\end{split}\]

which leads to

\[\begin{split}\begin{align} L = 0: && \Phi_0 = I_k\\ L = 1: && \Phi_1 = \Phi_0 D = D\\ L = 2: && \Phi_2 = \Phi_1 D = D^2\\ L = i: && \Phi_i = \Phi_{i-1} D = D^i \end{align}\end{split}\]

Therefore, the Wold representation looks like this

\[\begin{split}\begin{align} X_t &= \sum^\infty_{k=0} \Phi_k (I_k - A)^{-1} C u_t\\ &= \sum^\infty_{k=0} D^k (I_k - A)^{-1} C u_t\\ &= \underbrace{\underbrace{\sum^\infty_{k=0} ((I_k - A)^{-1} B)^k}_{=\Phi(L)} (I_k - A)^{-1} C}_{=\Theta(L)} u_t\\ \end{align}\end{split}\]

The impulse response function is therefore

\[IRF(k) = ((I_k - A)^{-1} B)^k (I_k - A)^{-1} C\]
  1. Next, we will calculate variance decompositions. Let the squared k-step-ahead forecast error for a variable \(x_t\) be defined as
\[e_k = E[(x_{t+k} - E_t[x_{t+k}])^2]\]

Find the squared 1-step-ahead forecast error for \(y_t\) as a function of the structural model parameters. Calculate the associated variance decomposition. Do the same for \(m_t\).

Remember that the h-step ahead forecast error is defined as

\[\begin{align} y_{t+h} - y_{t+h\mid t} = \sum^{h-1}_{i=0} \Phi_i u_{t+h-i} = \sum^{h-1}_{i=0} \Theta_i \omega_{t+h-i} \end{align}\]

where we use that \(u_t = B_0^{-1} \omega_t\). Start with the Wold representation and calculate the expected value.

\[\begin{split}\begin{align} e_1 &= E[(x_{t+1} - E_t[x_{t+1}])^2]\\ &= E[(\sum^{1-1}_{i=0} \Theta_i u_{t+1})^2]\\ &= E[(B^{-1}_0 C u_{t+1})^2]\\ &= E\left[\left(\begin{bmatrix}1 & a\\0 & 1\end{bmatrix} \begin{bmatrix}\sigma_y & 0 \\ 0 & \sigma_m\end{bmatrix} \begin{bmatrix} u_t^y \\ u_t^m \end{bmatrix}\right)^2\right]\\ &= E\left[\left(\begin{bmatrix} \sigma_y & a \sigma_m \\ 0 & \sigma_m\end{bmatrix} \begin{bmatrix} u_t^y \\ u_t^m \end{bmatrix} \right)^2\right]\\ &= E\left[\left(\begin{bmatrix}\sigma_y u_t^y + a \sigma^m u_t^m \\ \sigma_m u^m_t \end{bmatrix}\right)^2\right]\\ &= E\left[\begin{bmatrix} \sigma_y^2 u_t^{2y} + 2 \sigma_y u_t^y a \sigma_m u_t^m + a^2 \sigma_m u_t^{2m} \\ \sigma_m^2 u_t^{2m} \end{bmatrix}\right]\\ &= \begin{bmatrix} \sigma_y^2 \underbrace{E[u_t^{2y}]}_{=1} + 2 \sigma_y \underbrace{E[u_t^y u_t^m]}_{=0} a \sigma_m + a^2 \sigma_m \underbrace{E[u_t^{2m}]}_{=1} \\ \sigma_m^2 \underbrace{E[u_t^{2m}]}_{=1} \end{bmatrix}\\ &= \begin{bmatrix} \sigma_y^2 + a^2 \sigma_m^2 \\ \sigma_m^2 \end{bmatrix} \end{align}\end{split}\]

The associated variance decompositions can be calculated

TODO: I must have wrong something - a transposition? - because the indices do not match with the provided answers.

Exercise 2

  1. Explain the four steps you would have to go through to bootstrap the standard error of a regression coefficient in the basic linear model.

To compute the standard error for the regression coeffcients we need to set up bootstrap samples, fit the \(VAR(p)\) with intercept, construct structural IRFs and compute the confidence intervals as the quantiles of the bootstrapped IRF distribution.

  1. For the first step, we need the initial conditions for the \(VAR(p)\), \([y*_{-p+1}, \dots, y*_0]\), which can be drawn from the sample values with replacement or fixed at the sample values. Furthermore, we need random draws of \(u*_t\) where the distribution can be Gaussian in the parametric case or depending on the draws with replacement from the regression residuals in a nonparametric setting.
  2. Fit the \(VAR(p)\).
  3. Construct the structural IRFs
  4. Compute confidence intervals as quantiles of the distribution of IRFs
  5. Briefly walk the reader through the following code. What is the purpose?

1-3: The first three lines draw 100 random numbers and compute the median for this sample. 4-5: Declare the number of bootstrap samples, 1000, and a vector for storing the medians of the bootstrap sample. 6-10: For each bootstrap sample, draw 100 random numbers between 1 and 0, multiply them with 100 and convert them to integers using the ceil function. These integers are now used to draw with replacement from the original 100 random numbers defined in lines 1-3. For this new bootstrap sample, compute the median and store it.

After running this program, we are left with an array of median values. Computing the standard error for this distribution gives us the standard error of the previously calculated metric.

Exercise 3

Estimating the reduced form of the Blanchard-Quah VAR, we receive the following plot of the residuals: Looking at the plot, name two issues that could potentially lead to the VAR being misspecified. Use Gretl (replace with Julia) and the supplied data file BQ_data.gdt to test for these issues (use 8 lags and a constant).

Exercise 4

Given an \(VAR(1)\) process, compute the autocovariances for this process.

A \(VAR(1)\) process can be given as

\[\begin{split}\begin{align} y_t &= \nu + A_1 y_{t-1} + u_t\\ y_t - \mu &= A_1 (y_{t-1} - \mu) + u_t \end{align}\end{split}\]

Multiplying \((y_{t-h} - \mu)'\) and taking expectations yields

\[\begin{align} E[(y_t - \mu)(y_{t-h} - \mu)'] &= A_1 E[(y_{t-1} - \mu)(y_{t-h} - \mu)'] + E[u_t(y_{t-h} - \mu)'] \end{align}\]

Depeding on \(h\), we get the following equations:

\[\begin{split}\begin{align} h = 0: && \Gamma(0) = A_1 \Gamma(-1) + \Sigma_u = A_1 \Gamma(1)' + \Sigma_u = A_1 \Gamma(0) A_1' + \Sigma_u\\ h = 1: && \Gamma(1) = A_1 \Gamma(0)\\ \vdots && \vdots\\ h = i: && \Gamma(i) = A_1 \Gamma(i-1) \end{align}\end{split}\]