Vector Autoregression (VAR) Toolkit
A comprehensive MATLAB toolkit for Vector Autoregression (VAR) analysis, covering a wide range of identification schemes and estimation methods.
The toolkit includes functions for:
Reduced-form VAR and Granger causality testing
Structural VAR (SVAR) identification via short-run and long-run restrictions (recursive and non-recursive)
Sign restrictions and maximum share identification
Generalised impulse response functions (GIRFs)
Bayesian estimation of SVARs
GMM-based identification
External instruments (IV) with block and wild bootstrap inference
Block exogeneity tests
Historical decomposition
Each function comes with a worked example file.
The code is freely available on my GitHub: here
Linear Rational Expectations Model with Indeterminacy
A MATLAB toolkit for solving linear rational expectations (DSGE) models, with full characterisation of determinacy, indeterminacy, and sunspot equilibria.
The toolkit includes functions for:
Solving linear and nonlinear models via automatic first-order Taylor expansion around the steady state
Characterising determinacy, indeterminacy, and instability using QZ decomposition
Computing the full family of rational expectations equilibria under indeterminacy, indexed by free belief parameters
Generating sunspot/belief shock responses alongside fundamental shock responses
Solving models using the Cho & Moreno forward iteration method with the no-bubble condition
Recovering the belief parameters that make the Lubik-Schorfheide solution match the forward solution
Comparing solution methods and understanding when they agree or diverge (e.g. with unit roots or block-recursive structures)
Each function comes with a worked example file, including a replication of Figure 1 from Lubik & Schorfheide (2003).
The code is freely available on my GitHub: here