Bayesian Vector Autoregression
Introduction
The repository BayesianVAR.jl contains the code to estimate a Bayesian VAR with Minnesota, sum-of-coefficients and dummy-initial-observation priors, and to perform structural analysis using sign restrictions or external instruments.
The repository includes an Excel file (Data > FinalData > test.xlsx) that can be used to test and run the model with main_executer.jl. The settings for the VAR (sample dates, location of the data file, name of the results folder, required packages, etc.) can be changed in Code > SetUp > SetupBVAR.jl. Every function contains a brief description of the econometric framework, with equations and references.
Brief Comment on the Excel File
The model can combine series at different frequencies by interpolating them with splines (Code > DataSection > readdata_haver.jl). Every worksheet with data must follow the “Haver convention” (see the first column and the first 18 rows of worksheet Data_m in the Excel file), and must be named “Data_” + frequency (“d”, “w”, “m”, “q”). The function Code > Toolbox > transformation.jl, called inside readdata_haver.jl, applies standard transformations to the data following the instructions in worksheet “Legend” - columns C-E: “LOG” = 1 takes logs, “DIFF” = 1 takes the first difference, and “FILT” transforms the series into year-on-year growth rates when the other two cells are also set to 1. Worksheet “Legend” - column F specifies the Minnesota prior for each series, and worksheet “Legend” - column G specifies which series to include.
Further instructions on the structure of the Excel file are provided in Code > DataSection > readdata_haver.jl and, for structural analysis, at the end of this page.
Setting the Priors
Let $Y_t = (y_{1t},\dots,y_{nt})'$ be a potentially large vector of random variables. We estimate the following VAR(p) model: $$Y_t = c + A_1 Y_{t-1}+\dots+A_p Y_{t-p} + u_t$$ using the Bayesian approach, which overcomes the curse of dimensionality by imposing prior beliefs on the parameters. In setting the prior distributions, we follow standard practice and use the procedure developed in Litterman (1986), with the modifications proposed by Kadiyala and Karlsson (1997) and Sims and Zha (1998). The priors are implemented using dummy observations, and the informativeness of the prior distribution is chosen by maximizing the marginal likelihood of the observed data. In this respect, we closely follow the exposition and the procedure of Bańbura, Giannone and Reichlin (2010) and Giannone, Lenza and Primiceri (2015).
Minnesota Prior
Litterman (1986) introduced the well-known Minnesota prior. Its basic principle is that all the equations are centered around a random walk with drift:
$$ Y_t = c + Y_{t-1} + u_t\,.$$This amounts to shrinking the diagonal elements of $A_1$ toward one and the remaining coefficients in $A_1,\dots,A_p$ toward zero. In addition, the prior incorporates the beliefs that more recent lags carry more reliable information than more distant ones, and that own lags explain more of the variation of a given variable than the lags of other variables in the equation.
Assuming the coefficients in $\beta = [A_1 \;A_2 \;\dots \;A_p]$ to be a priori independent and normally distributed, the prior beliefs are imposed by setting the following moments for the prior distribution of the coefficients: $$E[(A_k)_{ij}] = \begin{cases} \delta_i \quad \text{if} \;\; j=i,\; k=1 \\ 0 \quad\; \text{otherwise} \end{cases}\;.$$ Litterman (1986) originally sets $\delta_i = 1$ for all $i$, reflecting the belief that all the variables are highly persistent. However, this prior is not appropriate for variables displaying substantial mean reversion. For those, we impose the prior belief of white noise by setting $\delta_i = 0$. The variance of the coefficients is: $$Var((A_k)_{ij}) = \begin{cases} \frac{\lambda^2}{k^2} \quad\quad\quad \text{if}\; i=j \\ \vartheta\frac{\lambda^2}{k^2}\frac{\sigma_i^2}{\sigma_j^2} \quad\text{ otherwise} \end{cases}\;,$$ where $k$ is the lag, so the prior tightens as the lag increases. In the original formulation of the Minnesota prior, the covariance matrix of the residuals is assumed to be diagonal and known: $\Psi = \Sigma$, where $\Sigma = diag(\sigma_1^2,\;\dots, \sigma_n^2)$. However, structural analysis requires taking into account the possible correlation among the residuals of different variables. To overcome this problem, we follow Kadiyala and Karlsson (1997) and impose a Normal-inverse-Wishart prior, which retains the principles of the Minnesota prior. This is possible under the condition that $\vartheta = 1$, which we assume in what follows. Finally, the prior on the intercept $c$ is diffuse.
The Minnesota prior is implemented in Code > BVAR > bvar_minnesota_prior.jl. First, the function shrinks each variable toward a random walk or white noise, as specified in worksheet “Legend” - column F; then, it calculates $\{\sigma^2_1,\dots,\sigma^2_n\}$.
Sum-of-Coefficients Prior
The literature has suggested that forecasting performance can be improved by imposing additional priors that constrain the sum of the coefficients (see, e.g., Sims, 1993; Sims and Zha, 1998; Robertson and Tallman, 1999). This is the same as imposing “inexact differencing”, and it is a simple modification of the Minnesota prior involving linear combinations of the VAR coefficients.
To see this, we rewrite the VAR in its error-correction form:
$$Y_t = c + A_1 Y_{t-1}+\dots+A_p Y_{t-p} + u_t$$$$\begin{aligned}\Delta Y_t = {} & c - (I_n - A_1 - A_2- \dots- A_p) Y_{t-1} \\ & + C_1 \Delta Y_{t-1} + \dots + C_{p-1} \Delta Y_{t-p+1} + u_t\end{aligned}$$with $C_k = - \sum_{j=k+1}^p A_j$. The term $- (I_n - A_1 - A_2- \dots- A_p) Y_{t-1}$ is the error-correction term: it corrects the current-period change in $Y_t$ with part of the previous period’s deviation from the long-run relation among the variables. The remaining terms, $C_1 \Delta Y_{t-1} + \dots + C_{p-1} \Delta Y_{t-p+1} + u_t$, involve only first differences.
A VAR in first differences implies $\Pi = I_n - A_1 - A_2- \dots- A_p = 0$. By inexact differencing, that is, by imposing the sum-of-coefficients prior, we shrink $\Pi$ toward zero, so that the posterior draws are characterized by unit roots rather than by explosive behavior. In this case, $Y_t$ is equal to its previous value plus terms in first differences. It follows that, in the limit ($\Pi \to 0$), each variable in $Y_t$ contains a unit root and the model rules out cointegration.
Dummy-Initial-Observation Prior
As mentioned above, the sum-of-coefficients prior rules out cointegration in the limit, which may be undesirable. Starting from
$$\begin{aligned}\Delta Y_t = {} & c - (I_n - A_1 - A_2- \dots- A_p) Y_{t-1} \\ & + C_1 \Delta Y_{t-1} + \dots + C_{p-1} \Delta Y_{t-p+1} + u_t\,,\end{aligned}$$the sum-of-coefficients prior implies, in the limit $\Pi \to 0$:
$$\Delta Y_t= c + C_1 \Delta Y_{t-1} + \dots + C_{p-1} \Delta Y_{t-p+1} + u_t\,,$$which is equivalent to
$$\begin{aligned}Y_t = {} & c + Y_{t-1} \\ & + C_1 \Delta Y_{t-1} + \dots + C_{p-1} \Delta Y_{t-p+1} + u_t\;.\end{aligned}$$Without an error-correction term, there can be no cointegration relations. For this reason, Sims (1993) proposed an additional prior, known as the “dummy-initial-observation” prior.
This prior states that a no-change forecast for all variables is a good forecast at the beginning of the sample. Then, either all the variables are at their unconditional mean, which implies that the model is stationary despite the unit roots in the variables (implying cointegration), or the dynamics of the system are characterized by an unspecified number of unit roots, and the variables share a common stochastic trend.
Implementation of the Priors
Prior Distribution
Following Kadiyala and Karlsson (1997) and Robertson and Tallman (1999), we impose a Normal-inverse-Wishart prior distribution of the form:
$$ \begin{gathered} vec(\beta)|\Psi \sim N(vec(\beta_0), \Psi \otimes \Omega_0 ) \\ \text{and}\quad \Psi \sim iW(S_0, \alpha_0)\,, \end{gathered} $$where the prior parameters $\beta_0$, $\Omega_0$, $S_0$ and $\alpha_0$ are chosen so that the prior expectations and variances of $\beta$ coincide with those implied by the Minnesota prior, and the expectation of $\Psi$ is equal to the fixed residual covariance matrix $\Sigma$. We implement the prior by adding dummy observations: it can be shown that adding $T_d$ dummy observations $Y_d$ and $X_d$ to the VAR(p) is equivalent to imposing the Normal-inverse-Wishart prior with:
- $\beta_0 = (X_d'X_d)^{-1}(X_d'Y_d)$;
- $\Omega_0 = (X_d'X_d)^{-1}$;
- $S_0 = (Y_d - X_d \beta_0)'(Y_d - X_d\beta_0)$;
- $\alpha_0 = T_d - k$,
where $k = np+1$ is the number of regressors in each equation, $S_0$ is the $(n\times n)$ scale matrix and $\alpha_0$ the degrees of freedom of the inverse-Wishart distribution.
Dummy Observations
We follow Bańbura, Giannone and Reichlin (2010) and implement the prior distribution using dummy observations. The dummy observations $Y_d$ and $X_d$ are constructed as follows:
$$ Y_d = \begin{bmatrix} diag(\delta_1\sigma_1,\dots,\delta_n\sigma_n)/\lambda\\ 0_{n(p-1)\times n}\\[0.5em]\hline\\[-0.8em] diag(\sigma_1,\dots,\sigma_n)\\[0.5em]\hline\\[-0.8em] 0_{1\times n}\\[0.5em]\hline\\[-0.8em] diag(\mu_1\delta_1,\dots,\mu_n\delta_n)/\tau\\[0.5em]\hline\\[-0.8em] (\mu_1,\dots,\mu_n)/\gamma \end{bmatrix} $$ $$ X_d = \begin{bmatrix} J_p \otimes diag(\sigma_1,\dots,\sigma_n)/\lambda & 0_{np \times 1}\\[0.5em]\hline\\[-0.8em] 0_{n \times np} & 0_{n \times 1} \\[0.5em]\hline\\[-0.8em] 0_{1 \times np} & \varepsilon\\[0.5em]\hline\\[-0.8em] \mathbf{1}_p'\otimes diag(\mu_1\delta_1,\dots,\mu_n\delta_n)/\tau & 0_{n \times 1} \\[0.5em]\hline\\[-0.8em] \mathbf{1}_p'\otimes (\mu_1,\dots,\mu_n)/\gamma & 1/\gamma \end{bmatrix} $$where $J_p = diag(1,2,\dots,p)$ and $\mathbf{1}_p$ is a $p$-dimensional vector of ones. The first block of dummies imposes the prior beliefs on the autoregressive coefficients, the second block implements the prior for the covariance matrix, the third block reflects the uninformative prior for the intercept ($\varepsilon$ is a very small number), the fourth block implements the sum-of-coefficients prior, and the fifth one the dummy-initial-observation prior. The function that constructs the dummy observations can be found in Code > BVAR > bvar_dummies.jl.
Notice that the priors are parametrized by additional parameters, known as hyperparameters:
- $\delta_i$, which takes the value 1 or 0, reflecting the belief that the $i^{th}$ series is highly persistent (random walk) or displays substantial mean reversion (white noise).
- $\sigma_i$, the standard deviation of the residuals of the random walk or the white noise.
- $\lambda$, which controls the overall tightness of the prior distribution around the random walk or white noise, and governs the relative importance of the prior beliefs with respect to the information contained in the data. When $\lambda = 0$ the posterior equals the prior, while as $\lambda \to \infty$ the posterior mean approaches the OLS estimate.
- $\tau$, which controls the degree of shrinkage of the sum-of-coefficients prior: as $\tau$ goes to zero we approach the case of exact differences and, as $\tau$ goes to infinity, we approach the case of no shrinkage.
- $\mu_i$, which aims at capturing the unconditional mean of variable $y_{it}$.
- $\gamma$, which controls the tightness of the dummy-initial-observation prior: as it approaches infinity, there is no shrinkage.
How should the hyperparameters be specified? What is the optimal number of lags? What are the best shrinkage values for the prior distribution? The goal is to ensure that the model’s prior assumptions align well with the observed data, improving the model’s overall performance without overfitting. The procedure to choose their values is illustrated in the next section.
Informativeness of the Prior Distribution
From a Bayesian perspective, choosing the informativeness of the prior distribution is conceptually identical to inference on any other unknown parameter of the model. Suppose, for instance, that a model is described by a likelihood function $p(y|\theta)$ and a prior distribution $p_\eta(\theta)$, where $\theta$ is the vector of the VAR(p) parameters and $\eta$ collects the hyperparameters, i.e. the coefficients that parameterize the prior distribution but do not directly affect the likelihood. It is then natural to choose these hyperparameters by interpreting the model as a hierarchical model, i.e. replacing $p_\eta(\theta)$ with $p(\theta|\eta)$ and evaluating their posterior (Berger, 1985; Koop, 2003).
By Bayes’ rule, the posterior of the hyperparameters is
$$ p(\eta|y) \propto p(y|\eta)\, p(\eta)\,, $$where $p(\eta)$ is a prior on the hyperparameters (a hyperprior) and $p(y|\eta)$ is the marginal likelihood, obtained by integrating out the VAR parameters:
$$ p(y|\eta) = \int p(y|\theta)\, p(\theta|\eta)\, d\theta\,. $$Following Giannone, Lenza and Primiceri (2015), with a flat hyperprior, maximizing the posterior of $\eta$ amounts to maximizing the marginal likelihood, i.e. picking the hyperparameters that make the data most likely after integrating out the uncertainty about the model parameters.
Why is this a sensible criterion? By the chain rule of probability, the marginal likelihood can be written as
$$ p(y|\eta) = \prod_{t=1}^{T} p(y_t \,|\, y_1,\dots,y_{t-1}, \eta)\,, $$the product of one-step-ahead predictive densities. It therefore rewards the hyperparameters that would have produced the best out-of-sample forecasts. A prior that is too loose fits the sample well but forecasts poorly (overfitting), while a prior that is too tight ignores the information in the data.
Because the Normal-inverse-Wishart prior is conjugate, the integral has a closed form. Let $Y$ $(T\times n)$ and $X$ $(T\times k)$ collect the observed data, without the dummy observations, and let $\beta_0$, $\Omega_0$, $S_0$ and $\alpha_0$ be the prior parameters implied by the dummies, all of which depend on $\eta$. The log marginal likelihood is
$$ \begin{aligned} & \log p(y|\eta) = -\frac{Tn}{2}\log\pi + \log\Gamma_n\Big(\frac{T+\alpha_0}{2}\Big) \\ & \quad - \log\Gamma_n\Big(\frac{\alpha_0}{2}\Big) - \frac{n}{2}\log\big|I_T + X\Omega_0X'\big| \\ & \quad + \frac{\alpha_0}{2}\log\big|S_0\big| - \frac{T+\alpha_0}{2}\log\big|S_0 \\ & \quad + (Y - X\beta_0)'(I_T + X\Omega_0 X')^{-1}(Y - X\beta_0)\big|\,, \end{aligned} $$where $\Gamma_n(\cdot)$ is the multivariate gamma function. The last term rewards fit: it is large when the data are close to the prior mean $X\beta_0$, relative to the prior uncertainty. The term $-\frac{n}{2}\log|I_T + X\Omega_0X'|$ penalizes complexity: it falls as the prior becomes looser or as more lags are added. Equivalently, the marginal likelihood is the ratio between the marginal likelihood of the data augmented with the dummies and that of the dummies alone, $p(y|\eta) = p(Y_*|\eta)/p(Y_d|\eta)$.
The lag order and the hyperparameters are then chosen as
$$ (\hat p, \hat\lambda, \hat\tau, \hat\gamma) = \arg\max_{p,\,\lambda,\,\tau,\,\gamma}\; \log p(y\,|\,p, \lambda, \tau, \gamma)\,. $$The code performs this maximization by grid search: for each lag order $p$ and each set of values $(\lambda, \tau, \gamma)$ in the grid (by default $\tau = \gamma = 10\lambda$), it builds the dummy observations, computes the log marginal likelihood and keeps the combination with the highest value. To make different lag orders comparable, all of them are evaluated on the same sample, which starts after the largest lag in the grid. The procedure is implemented in Code > BVAR > bvar_opt_hyperprior.jl, and the marginal likelihood is computed in Code > BVAR > bvar_marginal_likelihood.jl.
Posterior Distribution
We now augment the data with the dummy observations:
- $Y_* = (Y', Y_d')'$;
- $X_* = (X', X_d')'$;
- $U_* = (U', U_d')'$;
and we rewrite the VAR(p) as a general regression model:
$$Y_* = X_* \,\beta + U_*\,.$$The posterior distribution has the form:
$$ \begin{gathered} vec(\beta)|\Psi,Y \sim N(vec(\tilde \beta), \Psi \otimes (X_*' X_*)^{-1} ) \\ \text{and}\quad \Psi|Y \sim iW(\tilde \Sigma, T_d + T + 2 - k)\,. \end{gathered} $$Notice that the posterior expectations of the coefficients correspond to the OLS estimates of the regression model based on the augmented data, with:
- $\tilde \beta = (X_*'X_*)^{-1}(X_*'Y_*)$;
- $\tilde \Sigma = (Y_* - X_* \tilde \beta)'(Y_* - X_* \tilde \beta)$.
For structural analysis, the code draws from the posterior with a Gibbs sampler that alternates between $p(\beta|\Psi,Y)$, the normal distribution above, and $p(\Psi|\beta,Y)$, an inverse-Wishart distribution with scale matrix $(Y_* - X_* \beta)'(Y_* - X_* \beta)$. Draws of $\beta$ for which the VAR is not stable are discarded. The functions that perform the draws can be found in Code > BVAR > bvar_gibbs_helper.jl > bvar_IWRD (inverse Wishart) and bvar_MNRD (multivariate normal).
Structural Identification
The structural VAR(p) is specified as
$$ B_0Y_t=B_1Y_{t-1}+\dots+B_pY_{t-p}+\varepsilon_t\,.$$If we multiply both sides of the structural form of the VAR by $B_0^{-1}$, the matrix governing the contemporaneous relations among the endogenous variables, also known as the structural impact multiplier matrix, we obtain the reduced-form representation:
$$ Y_t=B_0^{-1}B_1Y_{t-1}+\dots+B_0^{-1}B_pY_{t-p}+B_0^{-1}\varepsilon_t $$ $$ Y_t=A_1Y_{t-1}+\dots+A_pY_{t-p}+u_t \;.$$The key implication is that the vector of structural shocks $\varepsilon_t$ is a linear combination of the reduced-form residuals $u_t$, i.e. $\varepsilon_t=B_0u_t$. Since the sampler keeps only draws for which the VAR is stable, we can express $Y_t$ as an infinite sum of the reduced-form residuals $u_t$, weighted by the dynamic multipliers $\Phi_h$ (Wold representation):
$$Y_t=\sum_{h=0}^{\infty}\Phi_hu_{t-h}\;.$$We then derive the structural moving-average representation of the VAR by multiplying and dividing each element of the sum by the matrix $B_0$:
$$ Y_t=\sum_{h=0}^{\infty}\Phi_hB_0^{-1}B_0u_{t-h}=\sum_{h=0}^{\infty}\Theta_h\varepsilon_{t-h}\;.$$Our goal is to estimate the structural impulse response functions of the endogenous variables to the structural shocks of interest. We define the impulse responses at horizon $h$ as:
$$ \frac{\partial Y_{t+h}}{\partial \varepsilon_t}=\Theta_h= \Phi_h B_0^{-1}\,, $$where $\Phi_h$ is computed from each posterior draw of the VAR coefficients. The main goal is to estimate $B_0^{-1}$, or the column of it associated with the structural shock of interest $\varepsilon_{jt}$. The repository implements two identification strategies: sign restrictions and external instruments.
Sign Restrictions
The Gibbs sampler cycles through two steps, sampling successively from $p(\beta|\Psi,Y)$ and $p(\Psi|\beta,Y)$. After the burn-in stage, the following steps are used to compute the structural impact multiplier matrix $B_0^{-1}$ via sign restrictions, following Rubio-Ramírez, Waggoner and Zha (2010):
- Draw an $(n\times n)$ matrix $K$ from the standard normal distribution.
- Compute the matrix $Q$ from the $QR$ decomposition of $K$. Note that $Q$ is orthonormal, i.e. $Q'Q = I_n$.
- Compute the Cholesky decomposition of the current draw $\Psi = PP'$, where $P$ is lower triangular.
- Compute the candidate impact matrix $B_0^{-1} = P Q'$. Because $Q'Q = I_n$, the candidate still satisfies $B_0^{-1}(B_0^{-1})' = P Q' Q P' = \Psi$: rotating $P$ changes its elements but not the covariance matrix it implies.
- Check the sign restrictions on the $j^{th}$ column of $B_0^{-1}$. If all the signs are reversed, flip the sign of the candidate; if the restrictions are not satisfied, go back to step 1 and try a new matrix $K$.
- For a valid candidate, compute the structural IRFs recursively, assuming that the system was at its steady state at time $t$ when the shock hit; then save the structural IRFs for each retained Gibbs draw.
The procedure is implemented in Code > BVAR > bvar_sign_gibbs.jl.
IV Identification
This identification strategy uses external instruments that capture a fraction of the true structural shock. The methodology was introduced by Stock and Watson (2012), and it has become increasingly popular in the literature estimating the effects of monetary policy shocks. We apply the procedure outlined in Stock and Watson (2018).
Without loss of generality, assume that we are interested in the shock ordered first, $\varepsilon_{1t}$. The instrument $Z_t$ must satisfy the so-called “SVAR-IV” conditions:
- $E[Z_t\varepsilon_{1t}]=\alpha\neq 0 \quad\quad\quad\quad \text{(relevance)}$
- $E[Z_t\varepsilon_{jt}]=0\quad \forall j\neq 1 \quad\quad\, \text{(exogeneity)}$
Given the construction of $\Theta_h$, the goal is to identify only the first column of $B_0^{-1}$:
$$ \begin{gather*} \begin{split} &\Theta_0=\mathrm{I}B_0^{-1}\quad\\ &\Theta_1=\Phi_1B_0^{-1}\\ &\;\vdots\\ &\Theta_h=\Phi_hB_0^{-1} \end{split}\quad\quad \begin{split} B_0^{-1}=\begin{bmatrix} b_{1,1}&*&*&\dots\\ b_{2,1}&*&*&\dots\\ \vdots&\vdots&\vdots&\vdots\\ b_{n,1}&*&*&\dots \end{bmatrix}{} \end{split}{} \end{gather*} $$Exploiting the relation between structural shocks and reduced-form residuals, $u_t = B_0^{-1}\varepsilon_t$, together with the SVAR-IV conditions, we obtain:
$$ \begin{gather*} \begin{split} &\mathrm{E}[Z_tu_t]=B_0^{-1}\mathrm{E}[Z_t\varepsilon_t]\\[0.3em] &\mathrm{E}[Z_tu_t]=B_0^{-1}\begin{bmatrix} \alpha\\ 0 \end{bmatrix}\\[0.3em] & \mathrm{E}[Z_tu_t]=\begin{bmatrix} b_{1,1}\,\alpha\\ b_{2:n,1}\,\alpha \end{bmatrix} \end{split} \end{gather*} $$If we normalize the impact on the instrumented variable, $b_{1,1}$, to one, the remaining elements of the first column of $B_0^{-1}$ can be expressed as:
$$ \begin{gathered} b_{j,1}=\big(\mathrm{E}[Z_tu_{1,t}]\big)^{-1}\,\mathrm{E}[Z_tu_{j,t}] \\ \textit{with}\quad j=2,\dots,n\;. \end{gathered} $$As for sign restrictions, the Gibbs sampler cycles through two steps, sampling successively from $p(\beta|\Psi,Y)$ and $p(\Psi|\beta,Y)$. After the burn-in stage, for each draw of $\beta$ and $\Psi$ we compute the corresponding sequence of residuals $u_t = Y_t - X_t \beta$ on the actual sample, without the dummy observations. We then estimate $\hat b_{j,1}$ for $j=2,\dots,n$ by replacing the population moments above with their sample counterparts. The function performing these steps is Code > BVAR > bvar_iv_gibbs.jl.
What to Do in the Excel File
Create worksheet “Sign” if you want to perform structural identification via sign restrictions. The first column, “policy variable”, assigns each shock to the corresponding column of $B_0^{-1}$. In the Excel file, the first shock (1), column “Global Supply Chain Shock”, corresponds to the column of $B_0^{-1}$ associated with the variable GSCPI. The second shock (2), column “Other Shock”, corresponds to the column of $B_0^{-1}$ associated with the variable United States_GDP. The sign of the response of each variable is set with $\textcolor{red}{(+1)}$ or $\textcolor{blue}{(-1)}$; leave the cell blank if you do not want to impose any restriction.
Create worksheet “IV” if you want to compute structural IRFs using an external instrument. The first column of the worksheet must contain the dates and the second one the instrument. Currently, only one instrument per run is supported. The column name of the instrument must be the ticker of the instrumented variable, since only the column of $B_0^{-1}$ corresponding to that variable is identified.
References
Bańbura, Marta, Domenico Giannone, and Lucrezia Reichlin. 2010. “Large Bayesian vector auto regressions.” Journal of Applied Econometrics, 25(1): 71–92.
Berger, James O. 1985. Statistical Decision Theory and Bayesian Analysis. 2nd ed. New York: Springer.
Giannone, Domenico, Michele Lenza, and Giorgio E Primiceri. 2015. “Prior selection for vector autoregressions.” Review of Economics and Statistics, 97(2): 436–451.
Kadiyala, K Rao, and Sune Karlsson. 1997. “Numerical methods for estimation and inference in Bayesian VAR-models.” Journal of Applied Econometrics, 12(2): 99–132.
Koop, Gary. 2003. Bayesian Econometrics. Chichester: John Wiley & Sons.
Litterman, Robert B. 1986. “Forecasting with Bayesian vector autoregressions: Five years of experience.” Journal of Business & Economic Statistics, 4(1): 25–38.
Robertson, John C, and Ellis W Tallman. 1999. “Vector autoregressions: Forecasting and reality.” Federal Reserve Bank of Atlanta Economic Review, 84(1): 4–18.
Rubio-Ramírez, Juan F, Daniel F Waggoner, and Tao Zha. 2010. “Structural vector autoregressions: Theory of identification and algorithms for inference.” Review of Economic Studies, 77(2): 665–696.
Sims, Christopher A. 1993. “A nine-variable probabilistic macroeconomic forecasting model.” In Business Cycles, Indicators, and Forecasting, ed. James H Stock and Mark W Watson, 179–212. Chicago: University of Chicago Press.
Sims, Christopher A, and Tao Zha. 1998. “Bayesian methods for dynamic multivariate models.” International Economic Review, 39(4): 949–968.
Stock, James H, and Mark W Watson. 2012. “Disentangling the channels of the 2007–09 recession.” Brookings Papers on Economic Activity, 2012(1): 81–135.
Stock, James H, and Mark W Watson. 2018. “Identification and estimation of dynamic causal effects in macroeconomics using external instruments.” Economic Journal, 128(610): 917–948.