[ZIP] Tao Zha's Matlab Library ZhaMatlabLibrary. This library contains common Matlab functions used by other programs. Before using other programs, please download the library first and then put all the library files in a subdirectory that can be accessed by Matlab.
[ZIP] The Matlab code,
LWZ_RED_PublicCode.zip (104KB),
for the Review of Economic Dynamics paper "Asymmetric Expectation Effects of Regime Switches in Monetary Policy" by Liu, Waggoner, and Zha. Read the file readme_lwzmodel.prn for instructions of how to use this program.
[ASCII] The RWZ algorithm
SRestrictRWZalg.m for implementing VAR sign restrictions of Canova,
Faust, and Uhlig. This new algorithm proves very efficient as compared to
the existing algorithms and is coded up in Matlab. The algorithm is
described in detail in the Review of Economic Studies paper "Structural Vector Autoregressions: Theory of Identification and Algorithms for Inference" by Rubio, Waggoner, and Zha.
[ZIP] The Matlab and C program,
PublicCode_swzestimate.zip (4.8MB),
for the Journal of Econometrics paper "Methods for Inference in Large Multiple-Equation Markov-Switching Models" by Sims, Waggoner, and ZhaMarkov-Switching BVAR models.
Read the file Instructions_swz_estimate.prn
for instructions of how to use this
program. The executable files swzmsbvario.exe
and swzestimate.exe are for Windows; the executable files swzmsbvario and swzestimate
for Linux. If you wish to compile and link the C source files yourself, click on
TZCcode.zip (562KB)
to download the source code. You need a modern C++ complier, Intel MKL, and IMSL C library to compile. For compilation questions under the Windows or
Linux operating system, please write to Eric Wang at Keyun.Wang@atl.frb.org. [ZIP] The Matlab code for structural VARs with linear
over-identified restrictions on both current and lagged coefficients discussed in Cushman and Zha (1997) and
Zha (1999). This example, motivated by Dhawan and
Jeske's DSGE model, uses the four variables: energy prices, durable investment,
capital investment, and output. It is assumed that energy prices follow an
exogenous autoregressive process. The code performs the three common tasks:
(1)
estimates the model parameters and impulse responses with or without the standard
Bayesian prior, (2) computes the error bands for impulse responses, and (3) computes the marginal likelihood
or data density. Click on readme_restrictedVAR.zip
(34KB) to download the core files. Consult the file readme_mdd.prn
for detailed explanations and instructions.
[ASCII] The C source code for
Shocks and Government Beliefs: The Rise and Fall of American Inflation by
Sargent, Williams, and Zha. To download this program, click on the files
modeleconomy.c, modeleconomy.h,
swz_comfuns.c,
swz_comfuns.h, and probconst.c. [ZIP] The Matlab code
ReducedFormBVAR.zip (9KB) for unconditional forecasts from a
reduced-form Bayesian Vector Autoregressive (BVAR) model with the
Sims and Zha (IER, 1998)'s prior.
[ZIP] The Matlab code for estimating the
Bayesian Vector Autoregressive (BVAR) models, just-identified and
over-identified, with the
Sims and Zha (IER, 1998)'s prior. Read the Word file
Readme_BVAR.doc to see the instruction of how to use this code and
click on AlphaModel_Files.zip (1.1MB) to
download. The code was originally written by Zha and is extensively modified by
Andy Bauer, a senior economic analyst, at the Federal Reserve Bank of
Atlanta. The article by Robertson and Tallman
is particularly useful for understanding the prior as well as various features
of the model (e.g., the out-of-sample forecasts from this kind of BVAR model is
insensitive to whether the data are of real time nature or in final revised
form).
[ZIP] The Matlab code for computing the
marginal likelihood or data density for structural BVAR models (including
overidentified cases). Click on swz_mardd.zip
(23KB) to download. Read the file readme_mdd.prn
to see the instructions of how to use this code.
[ZIP] The Matlab code for a Gibbs sampler for
just-identified and overidentified BVARs. To download it, click on
GibbsVar.zip (129KB).
[ZIP] The Matlab sample code that uses the
Waggoner-Zha Gibbs (and optionally Metropolis) sampler, Waggoner-Zha
normalization, and optionally the Sims-Zha prior. To see an example of
using this code, click on example.zip (97KB).
[ZIP] The Matlab code for
Conditional Forecasts in Dynamic Multivariate Models by Waggoner and
Zha (Review of Economics and Statistics 1999). Click on Cfprob.zip
(80KB) to download.
[ZIP] The Matlab code for
Error Bands for Impulse Responses by Sims and Zha (Econometrica 1999).
To download it, click on EconometricaSimsZha1999.zip
(482KB) and SimpleModel_ClassicalBootstrap.zip
(438KB).
[ZIP] The Matlab code for
Block Recursion and Structural Vector Autoregressions by Zha (J of
Econometrics 1999). To download it, click on Blkwk.zip (26KB),
meg.zip (6KB), TZBlk.zip (22KB),
and Xd12.zip (11KB).
[ZIP] The Matlab code for
Identifying Monetary Policy in a Small Open Economy under Flexible Exchange
Rates by Cushman and Zha (JME 1997). To download it, click on
CushmanZha_JME.zip (943KB) and fig2.zip (203KB).