Short presentation of a DSGE model using MathWorks® with sections of code. A quick look into how people put these things together.
The Smets-Wouters model (2002, 2004, 2007) is a nonlinear system of equations in the form of a Dynamic Stochastic General Equilibrium (DSGE) model that seeks to characterize an economy derived from economic first principles.
The basic model works with 7 time series: output, prices, wages, hours worked, interest rates, consumption, and investment.
Whereas a common approach in macroeconomics has been to create "large" empirically-motivated regression models, the DSGE approach focuses on "small" theoretically-derived models. It is this combination of normative rigor and parsimony that is one of the main attractions of the DSGE approach.
Armed with a small model of this sort, the linearized form can be cast as a VAR model that can be handled with standard methods of multiple time series analysis. It is an unrestricted form of this VAR model that we will examine subsequently.
For illustrative purposes, we will add an eighth time series: unemployment. Although this is not a part of the basic model (and is actually superfluous within the Smets-Wouters framework), unemployment tracks a widely-perceived measure of the "health" of an economy.
Modeling the United States Economy