Solving the Model

Solving the Model

The gensys routine

The DSGE model is written down in its canonical representation:

\[\Gamma_0 s_t = \Gamma_1 s_{t-1} + C + \Psi \epsilon_t + \Pi \eta_t\]

where $\Gamma_0$, $\Gamma_1$, $C$, $\Psi$, and $\Pi$ are matrices of coefficients for $s_t$ (states at time $t$), $s_{t-1}$ (lagged states), $\epsilon_t$ (exogenous shocks) and $\eta_t$ (expectational shocks).

DSGE.jl solves the model to obtain its state-space form:

\[\begin{align*} s_t &= T s_{t-1} + R \epsilon_t + C & \epsilon_t &\sim N(0, Q) & \mathrm{(transition)} \\ y_t &= Z s_t + D + u_t & u_t &\sim N(0, E) & \mathrm{(measurement)} \end{align*}\]

using the gensys routine of Chris Sims, introduced in this paper. We provide a standalone native Julia implementation of the routine (gensys) as well as a wrapper for AbstractModel subtypes (solve). When the Gensys.jl package becomes ready for use, we intend to deprecate our gensys code and substitute the gensysdt method for our code.

DSGE.solveFunction.
solve(m::AbstractModel; apply_altpolicy = false)

Driver to compute the model solution and augment transition matrices.

Inputs

  • m: the model object

Keyword Arguments

  • apply_altpolicy::Bool: whether or not to solve the model under the alternative policy. This should be true when we solve the model to forecast, but false when computing smoothed historical states (since the past was estimated under the baseline rule).

Outputs

  • TTT, RRR, and CCC matrices of the state transition equation: S_t = TTT*S_{t-1} + RRR*ϵ_t + CCC
source