Solving the Model
The gensys routine
The DSGE model is written down in its canonical representation:
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:
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.solve — Function.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 betruewhen we solve the model to forecast, butfalsewhen 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