RainbowStats™ · DSGE commands
FORECAST_DSGE
Display a deterministic path.
Syntax
F=FORECAST_DSGE(M,horizon)Retain returned model updates
Always assign model-building results back to the model variable. Use M=ADD_DSGE_EQUATION(M,...), M=COMPILE_DSGE(M), M=SOLVE_DSGE(M) and M=SET_DSGE_INITIAL(M,...). Unassigned calls are not a reliable way to retain updates in the script evaluator. Model-building commands return a model; FORECAST_DSGE returns a presentation.
Complete runnable example
M=DSGE_MODEL()
M=ADD_DSGE_SHOCK(M,"EPS")
M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS")
M=COMPILE_DSGE(M)
M=SOLVE_DSGE(M)
M=SET_DSGE_INITIAL(M,"X",2)
FORECAST_DSGE(M,12)The first displayed point is 2, followed by 1 and 0.5. The registered EPS innovation is zero during this deterministic forecast.
Behavior and interpretation
Requires a solved model and a positive integer horizon accepted by the engine. Period zero contains the initial values; periods 1 through the horizon apply the solved transition rule and intercept, with future innovations set to zero. The example produces X(0)=2, X(1)=1, X(2)=0.5.
A period has the frequency of the equations and calibration. Twelve means twelve months only for a monthly model; it means twelve quarters for a quarterly model. Calendar frequency is not inferred.
Returns a slideshow containing an initial-conditions table and a forecast line chart. Save it separately as F=FORECAST_DSGE(M,12); do not overwrite M with this presentation. Use SLIDE(F) or include F with other presentation panels.
The generic vertical-axis label is Deviation from steady state. The numerical path uses the units of the supplied equations and may instead represent levels in an affine model. Explain the units in a text slide when necessary. SET_TITLE(F,"title") changes the containing presentation title; it does not rename the inner forecast chart.
This is a deterministic conditional path, not a forecast with uncertainty bands, an estimated data forecast or a future shock scenario. Registering a shock does not apply a future innovation. Extract model diagnostics from M, not from F.
Error handling
If a build, compile or solve step returns an error or diagnostic string instead of a model, stop and correct that step. Do not assume that later commands can forecast an unchanged or unsolved model.