Code

MATLAB code for selected applications in the book. Click to download.

Chapter 2:

LS estimation

Restricted GLS estimation

Bias-corrected LS estimation

Lag-augmented LS estimation

Table 2.1: Alternative lag-order selection criteria for VAR models

Chapter 3:

Johansen MLE of VECM with unknown cointegrating vector and unrestricted intercept

Johansen MLE of VECM with unknown cointegrating vector and with intercept absorbed into error correction term

MLE of VECM with known cointegrating vector and unrestricted intercept

FGLS estimaor of VECM with unknown cointegratingvector and unrestricted intercept

Table 3.1: Trace and Maximum Eigenvalue Tests for Cointegrating Rank (Unrestricted Intercept)

Table 3.1: Trace and Maximum Eigenvalue Tests for Cointegrating Rank (Restricted Intercept)

Chapter 4:

Table 4.1: Forecast Error Variance Decomposition for U.S. Real Dividend Growth

Table 4.2: Real-Time Risk Measures as of December 2010

Figure 4.1: Point estimates of responses of U.S. real dividends to selected structural shocks

Figure 4.2: Historical decomposition of the real price of crude oil in percent deviations from the mean

Figure 4.3: Contribution of each structural shock to the cumulative change in the real price of oil from January 2003 to June 2008

Figure 4.4: Historical counterfactuals for the real price of crude oil from January 2003 to June 2008

Figure 4.5: Selected real-time forecast scenarios for the real price of crude oil as of December 2010

Figure 4.6: Real-time probability weighted 1-year ahead density forecasts as of December 2010 under different scenarios about the future state of the global economy

Figure 4.7: Actual level of global oil production and counterfactual level in the absence of the U.S. shale oil boom

Figure 4.8: Counterfactual sequence of flow supply shocks in the absence of the U.S. shale oil boom

Figure 4.9: Evolution of the nominal Brent price of crude oil with and without shale oil

Figure 4.10: Counterfactual paths of key observables under alternative policy counterfactuals

Figure 4.11: Sequence of policy shocks required to implement the KL policy counterfactual

Chapter 5:

Figure 5.2: Simulated quantiles of inflation responses to monetary policy shocks for different Minnesota priors

Figure 5.3: Simulated quantiles of inflation responses to monetary policy shocks for different Gaussian-inverse Wishart priors

Figure 5.4: Simulated quantiles of inflation responses to monetary policy shocks for different independent Gaussian-inverse Wishart priors

Chapter 9:

Figure 9.1: Responses of the U.S. economy to an unexpected increase in the real price of oil (Cholesky decomposition)

Figure 9.1: Responses of the U.S. economy to an unexpected increase in the real price of oil (Iterative solution)

Figure 9.1: Responses of the U.S. economy to an unexpected increase in the real price of oil (Rubio-Ramirez, Waggoner and Zha (2010) algorithm)

Figure 9.2: Responses of the U.S. economy to an aggregate supply shock in the nonrecursive Keating (1992) model (Iterative solution)

Section 9.3: IV estimation of the recursive structural VAR(p) model

Section 9.4: Two-step ML estimation of the recursive structural VAR model

Section 9.4: Two-step ML estimation of the nonrecursive Keating (1992) model

Chapter 11:

Figure 11.1: Responses to technology and non-technology shocks (Cholesky decomposition)

Figure 11.1: Responses to technology and non-technology shocks (Rubio-Ramirez, Waggoner and Zha (2010) algorithm)

Figure 11.1: Responses to technology and non-technology shocks (Iterative solution)

Figure 11.2: Responses to an unexpected U.S. monetary policy tightening (Rubio-Ramirez, Waggoner and Zha (2010) algorithm)

Figure 11.2: Responses to an unexpected U.S. monetary policy tightening (Iterative solution)

Figure 11.3: Responses to a productivity shock in the baseline model of King et al. (1991)

Chapter 12:

Table 12.1: Percentage of Models in Joint Wald Confidence Set Consistent with a Hump-shaped Response Function of Real GNP to an Unexpected Loosening of Monetary Policy

Figure 12.1: Example of how resampling overlapping blocks may destroy the dependence structure in the bootstrap data at the point of transition from one block to the next

Figure 12.2: Responses of U.S. real GNP to an unexpected loosening of monetary policy: Shotgun plot implied by joint 68% Wald confidence set

Figure 12.3: Responses to an unexpected increase in the real price of oil: Shotgun plot implied by joint 68% Wald confidence set with subset of stagflationary responses highlighted

Figure 12.4: Global oil market data

Figure 12.5: 95% delta method confidence intervals based on bootstrap standard error estimates

Figure 12.6: Alternative 95% bootstrap confidence intervals

Figure 12.7: Responses of the real price of oil to oil demand and supply shocks with alternative 95% confidence intervals

Figure 12.8: 95% delta method confidence intervals based on bootstrap standard error estimates in the overidentified model

Chapter 13:

Numerical example for subrotation algorithm for block-recursive models in Section 13.9.2

Numerical example for general algorithm allowing for sign and exclusion restrictions in Section 13.9.2

Figure 13.7: Sign-identified oil market model impulse response functions in the modal model and 68% joint HPD regions

Figure 13.8: Structural impulse responses in the sign-identified oil market model

Figure 13.9: Responses to a monetary policy tightening in the original sign-identified model: Response functions in the modal model and 68% joint HPD regions

Figure 13.10: Responses to a monetary policy tightening in the modified sign-identified model: Response functions in the modal model and 68% joint HPD regions

Figure 13.11: Responses to a monetary policy tightening in the modified sign-identified model