complex non-linear DSGE model and steady state

Hello Dynare community!

My model contains exactly 225 equations, covering three production sectors and distinguishing between **SMEs (PME)**and large enterprises (GE). Most equations are nonlinear and written in exp-form, while a few are linear. The entire model is implemented directly in Dynare.

At this stage, I do not yet have analytical steady-state equations nor reliable initial values, as my goal is first to obtain a preliminary simulation before calibrating or estimating parameters specific to Québec. However, Dynare is unable to compute the steady state:

  • The steady command does not converge, even after trying different steady-state options.

  • I reviewed the system carefully, and the equations appear correctly specified.

  • I also attempted to generate initial values using CMA-ES. These values result in small residuals in my external residual-evaluation script, but when inserted into Dynare (in initval or in a steady_state_model block), Dynare again reports large residuals.

  • I suspect the problem may stem from the log/exp transformations, normalization choices, or differences between the way my external script computes residuals and Dynare’s internal evaluation.

Given your expertise with Dynare and large-scale nonlinear DSGE models, I would be extremely grateful for any guidance on how to diagnose this type of steady-state problem or how to align external CMA-ES solutions with Dynare’s steady-state solver.

A first step is always to get rid of the exp() substitution. It does not add anything valuable and dramatically increases the potential for mistakes and inconsistencies. You can always append the logs of the relevant variables once the model works.

I removed all the exp() terms from the model and kept everything in levels. However, since I don’t have initial values for all the variables — and because there is no longer the exp() transformation to keep variables strictly positive — the model now generates several NaN values in the residuals of the static equations.

Is there any workaround for this, or do I absolutely need to provide initial values for all variables?

1 Like

Hi,

By default, if the user does not provide initial values, Dynare uses zero as the initial guess for the endogenous variables. This approach can result in NaN values when evaluating certain static equations. For instance, the initial value for x cannot be zero if expression \frac{1}{x} appears in the model. Therefore, it is essential to supply appropriate initial values (at least for the variables involved in expressions that cannot be evaluated at zero),

Best,
Stéphane