*Authors and guest post by Davaajargal Luvsannyam and Ulziikhutag Munkhtsetseg*

In our previous blog entry, we discussed the sign restricted VAR (SRVAR) add-in for EViews. Here, we will discuss imposing a further zero restrictions on the impact period of the impulse response function (IRF) using the ARW and SRVAR add-ins in tandem.

### Table of Contents

- Introduction
- Orthogonal Reduced-Form Parameterization
- ARW Algorithms
- ARW EViews Add-in
- Conclusion
- References

### Introduction

Note that it is certainly possible to impose both sign and exclusion restrictions. For example, Mountford and Uhlig (2009) are motivated by the idea that fiscal policy shocks are identified as orthogonal to both monetary policy and business cycle shocks, and use a penalty function approach (PFA) to impose zero restrictions. (For details on the PFA, please see our SRVAR blog entry.) They also considered anticipated government revenue shocks in which government revenue is restricted to rise one year following some impulse. Furthermore, Beaudry, Nam, and Wang (2011) estimate a structural VAR model including total factor productivity, stock prices, real consumption, real federal funds rate and hours worked. They use the PFA to show that a positive optimism shock causes an increase in both consumption and hours worked. Recently, Arias, Rubio-Ramirez, and Waggoner (2018), henceforth ARW, developed algorithms to independently draw from a family of conjugate posterior distributions over the structural parameterization when sign and zero restrictions are used to identify SRVARs. They showed the dangers of using the PFA when implementing sign and zero restrictions together to identify structural VARs (SVARs).### Orthogonal Reduced-Form Parameterization

ARW focus on two SVAR parameterizations. In addition to the classical structural parameterization, they show that SVARs can also be written as a product of a reduced-form parameters and a set of orthogonal matrices. This is called the*orthogonal reduced-form parameterization*, henceforth, ORF. The algorithms ARW propose draw from a conjugate posterior distribution over the ORF and then transform said draws into a structural parameterization. In particular, they use the normal-inverse-Wishart distribution as the prior conjugate distribution, and develop a change of variable theory that characterizes the induced family of densities over the structural parameterization. This theory shows that a uniform-normal-inverse-Wishart density over the ORF parameterization induces a normal-generalized-normal density over the structural parameterization.

To motivate their contribution, ARW first show that existing algorithms for SVARs identified only by sign restrictions, conditional on a sign restriction using the change of variable theory, operate on independent draws from the normal-generalized-normal distribution over the structural parameterization. These algorithms independently draw from the uniform-normal-inverse-Wishart distribution over the ORF parameterization and only accept draws that impose a sign restriction.

Next, ARW generalize these algorithms to also consider zero restrictions. The key to this generalization is that, conditional on the reduced-form parameters, the class of zero restrictions on the structural parameters maps to linear restrictions on the orthogonal matrices. The resulting approach generalization independently draws from normal-inverse-Wishart over the reduced-form parameters and from the set of orthogonal matrices such that the zero restrictions hold. In this regard, conditional on the zero restrictions, they show that this generalization does not induce a distribution over the structural parameterization from the family of normal-generalized-normal distributions. Furthermore, they derive the induced distribution and write an importance sampler that, conditional on the sign and zero restrictions, independently draws from normal-generalized-normal distributions over the structural parameterization.

To formalize these ideas, consider the SVAR with the general form: \begin{align} Y_t^{\prime} A_{0} = \sum_{i=1}^{p} Y_{t-i}^{\prime}A_{i} + c + \epsilon_t^{\prime}, \quad t=1, \ldots, T \label{eq1} \end{align} where $ Y_t $ is an $ n\times 1 $ vector of endogenous variables, $ A_i $ are parameter matrices of size of $ n\times n $ with $ A_{0} $ invertible, $ c $ is a $ 1\times n $ vector of parameters, $ \epsilon_t $ is an $ n\times 1 $ vector of exogenous structural shocks, $ p $ is the lag length, and $ T $ is the sample size.

We can also summarize equation \eqref{eq1} as follows: \begin{align} Y_{t}^{\prime}A_{0} = X_{t}^{\prime}A_{+} + \epsilon_{t}^{\prime} \label{eq2} \end{align} where $ A_{+}^{\prime} = \left[A_{1}^{\prime}, \ldots, A_{p}^{\prime}, c^{\prime}\right]$ and $ X_{t}^{\prime} = \left[Y_{t-1}^{\prime}, \ldots, Y_{t-p}^{\prime}, 1\right] $.

The reduced form can now be written as: \begin{align} Y_{t}^{\prime} = X_{t}^{\prime}B + u_{t}^{\prime} \label{eq3} \end{align} where $ B = A_{+}A_{0}^{-1}, u_{t}^{\prime} = \epsilon_{t}^{\prime}A_{0}^{-1} $, and $ E(u_{t}u_{t}^{\prime}) = \Sigma = \left(A_{0}A_{0}^{\prime}\right)^{-1} $. Naturally, $ B $ and $ \Sigma $ are the reduced form parameters.

We can further write equation \eqref{eq3} as the orthogonal reduced-form parameterization \begin{align} Y_{t}^{\prime} = X_{t}^{\prime}B + \epsilon_{t}^{\prime}Q^{\prime}h(\Sigma) \label{eq4} \end{align} where the $ n\times n $ matrix $ h(\Sigma) $ is the Cholesky decomposition of covariance matrix $ \Sigma $.

Given equations \eqref{eq2} and \eqref{eq4}, in addition to the Cholesky decomposition $ h $, we can define a mapping between $ \left(A_{0}, A_{+}\right) $ and $ (B, \Sigma, Q) $ by: \begin{align} f_{h}\left(A_{0}, A_{+}\right) = \left(A_{+}A_{0}^{-1}, \left(A_{0}A_{0}^{\prime}\right)^{-1}, h\left(\left(A_{0}A_{0}^{\prime}\right)^{-1}\right)A_{0}\right) \label{eq5} \end{align} where the first element of the triad on the right corresponds to $ B $, the second to $ \Sigma $, and the third to $ Q $.

Note further that the function $ f_{h} $ is invertible with inverse defined by: \begin{align} f_{h}^{-1} (B,\Sigma, Q) = \left(h(\Sigma)^{-1}Q, Bh(\Sigma)^{-1}Q\right) \label{eq6} \end{align} where the first term on the right corresponds to $ A_{0} $ and the second to $ A_{+} $.

Thus, the ORF parameterization makes clear how the structural parameters depend on the reduced form parameters and orthogonal matrices.

### ARW Algorithms

Although ARW propose three different algorithms, the most important is in fact the third. The latter draws from a distribution over the ORF parameterization conditional on the sign and zero restriction and then transforms the draws into the structural parameterization. Since Algorithm 3 also depends on Algorithm 2, we present the latter here and recommend readers to refer to the supplementary materials of ARW (2018) if they require further details.#### Algorithm 2

Let $ Z_j $ define the zero restriction matrix on the $ j^{\text{th}} $ structural shock, and let $ z_{j} $ denote the number of zero restrictions associated with the $ j^{\text{th}} $ structural shock. Then:- Draw $ (B, \Sigma) $ independently from Normal-inverse-Wishart distribution.
- For $ j \in \{1, \ldots, n\} $ draw $ X_{j} \in \mathbf{R}^{n+1-j-Z_{j}} $ independently from a standard normal distribution and set $ W_{j} = X_{j} / ||X_{j}||$.
- Define $ Q = [q_{1}, \ldots q_{n}] $ recursively as $ q_{j} = K_{j}W_{j} $ for any matrix $ K_{j} $ whose columns form an orthonormal basis for the null space of the $ (j-1+z_{j})\times n $ matrix \begin{align} M_{j} = \left[q_{1}, \ldots, q_{j-1},\left(Z_{j}F\left(f_{h}^{-1}(B, \Sigma, I_{n})\right)\right)\right] \end{align}
- Set $ (A_{0},A_{+}) = f_{h}^{-1}(B,\Sigma,Q) $.

#### Algorithm 3

Let $ \mathcal{Z} $ denote the set of all structural parameters that satisfy the zero restrictions, and define $ v_{(g^{\circ}f_{h})|\mathcal{Z}} $ as te volume element. Then:- Use Algorithm 2 to independently draw $ (A_{0}, A_{+}) $.
- If $ (A_{0}, A_{+}) $ satisfies the sign restrictions, set its importance weight to $$ \frac{|\det(A_{0})|^{-(2n+m+1)}}{v_{(g^{\circ}f_{h})|\mathcal{Z}}(A_{0}A_{+})} $$ otherwise, set its importance weight to zero.
- Return to Step 1 until the required number of draws has been obtained.
- Re-sample with replacement using the importance weights.

### ARW EViews Add-in

Now we turn to the implementation of the ARW add-in. First, we need to download and install the add-in from the EViews website. The latter can be found at https://www.eviews.com/Addins/arw.aipz. We can also do this from inside EViews itself. In particular, after opening EViews, click on**Add-ins**from the main menu, and click on

**Download Add-ins...**. From here, locate the

*ARW*add-in and click on

**Install**.

Figure 1: Add-in installation

*data.WF1*which can be found in the installation folder, typically located in

**[Windows User Folder]/Documents/EViews Addins/ARW**.

Figure 2: ARW (2018) Data

- Click on the
**Add-ins**menu item in the main EViews menu, and click on**Sign restricted VAR**. - Under
**Endogenous variables**enter*tfp stock cons ffr hour*. - Check the
**Include constant**option. - Under
**Number of lags**, enter*4*. - In the
**Sign restriction vector**textbox enter*+2*. - Under
**Sign restriction method**check*Penalty*. - In the
**Number of horizons**enter*40* - Under
**Zero restriction**textbox enter*tfp*. - Check the
**variance decomposition box**. - Hit
**OK**.

Figure 3: SRVAR Add-in (PFA)

Figure 4: PFA Output

- Click on the
**Add-ins**menu item in the main EViews menu, and click on**Sign and zero restricted VAR**. - Under
**Endogenous variables**enter*tfp stock cons ffr hour*. - Check the
**Include constant**option. - Under
**Number of lags**, enter*4*. - In the
**Sign restriction vector**textbox enter*+stock*. - In the
**Zero restrictions**textbox enter*tfp*. - Under
**Number of steps**enter*40*. - Check the
**variance decomposition box**. - Hit
**OK**.

Figure 5: ARW Add-in (Importance Sampler)

Figure 6: Importance Sampler Output

Alternatively, the IRFs of the same variables obtained using the importance sampler yield a different result. For consumption and hours worked, the confidence bands are wider and contain zero. Furthermore, the corresponding point-wise median IRFs are closer to zero compared to those obtained using the PFA. This shows that the PFA exaggerates the effects of optimism shocks on stock prices, consumption, and hours worked, by generating much narrower confidence bands and larger point-wise median IRFs. In this regard, as pointed out by Uhlig (2005), we can see that the PFA includes additional identification restrictions when implementing sign and zero restrictions.

To further summarize the results, we present the table below which gives the specifics of the output figures above.

Penalty Function Approach | Importance Sampler | |||||
---|---|---|---|---|---|---|

Adjusted TFP | 0.07 | 0.17 |
0.29 | 0.03 | 0.11 |
0.23 |

Stock Prices | 0.54 | 0.72 |
0.84 | 0.05 | 0.29 |
0.57 |

Consumption | 0.13 | 0.27 |
0.43 | 0.03 | 0.17 |
0.50 |

Real Interest Rate | 0.07 | 0.14 |
0.23 | 0.08 | 0.20 |
0.39 |

Hours Worked | 0.20 | 0.31 |
0.45 | 0.04 | 0.18 |
0.56 |

### Conclusion

In this blog entry we presented the ARW add-in for EViews. The add-in is based on the work of ARW (2018) and generates impulse response curves based on the importance sampler which accommodates both sign and zero restrictions in the VAR model.### References

- Arias J., Rubio-Ramirez J., and Waggoner D.: Inference Based on SVARs Identified with Sign and Zero Restrictions: Theory and Applications Econometrica, 86:685–720, 2018.
- Beaudry P., Nam D., and Wang J.: Do mood swing drive business cycle and is it rational? NBER Working Paper 17651, 2011.
- Mountford A. and Uhlig H.: What are the effects of fiscal policy shocks? Journal of Applied Econometrics, 24:960–992, 2009.
- Uhlig H.: What are the effects of monetary policy on output? Results from an agnostic identification procedure. Journal of Monetary Economics, 52(2):381–419, 2005.

Greeting Sir,

ReplyDeleteI was trying to replicate ARW as show in figure 5 above but it was giving an error message saying "@RIWISH is illegal or reserved name".

Please, what can I do to resolve the problem.

Thank you.

Hello, I have the same error. Is there a fix about that?

DeleteThanks for your work. It is very interesting to read the opinion and analysis of the professionals.

ReplyDelete