Error code

Hi everyone,

I am trying to replicate “Understanding Macro and Asset Price Dynamics During the Climate Transition” by Donadelli, Grüning and Hitzemann.
When I run the code attached, I have the following error:
Caught ogu::Exception: dynamic_atoms.cpp:470: A wrong lag/lead of a variable in VarOrdering::do_pbspbfbf░5╚
Can someone help me?
DonadelliGruningHitaemann.mod (10.2 KB)

Which Dynare version generated that error? Also note that your file is a Dynare++ file.

Because I am using dynare++. the version is 4.6.4. Should I change it?

No, but we will have to investigate the source of the problem.

I rewrite it. Here I attach it. The following error appears:
Error using print_info (line 32)
Impossible to find the steady state (the sum of square residuals of the static equations is Inf). Either the model doesn’t have a steady state, there are an infinity of steady states, or the guess values are too far from the solution

The model seems to me written correctly. Could You help me?

Always provide the lastest version.

decentralized.mod (8.2 KB)

Version of dynare 4.6.4

You need to provide initial values. Also, only do exp()-substitutions once the model works.

The problem is that by using steady through dynare, the following message appears:
Error using print_info (line 32)
Impossible to find the steady state (the sum of square residuals of the static equations is
Inf). Either the model doesn’t have a steady state, there are an infinity of steady states,
or the guess values are too far from the solution.
Do I need to provide initial values anyway?

The initial values are for steady state finding. So yes.

It gives me again: “Error using print_info (line 32)
Impossible to find the steady state (the sum of square residuals of the static equations is Inf). Either the model doesn’t have a steady state, there are an infinity of steady states, or the guess values are too far from the solution.”
decentralized-2.mod (10.4 KB)

Check your equations and initial values. Putting resid; in the mod-file shows

Equation number 54 : -7.239188238214424e+17 : lambdax

which suggests a problem.

@dynevol the error “A wrong lag/lead of a variable in VarOrdering” likely means that you declared more variables than you have equations. to be sure, first try counting the number of endogenous model variables and compare to the number of model equations. assuming you find more declared variables than equations, you will need to remove the endogenous variables that are never referenced in your model equations. I just ran into the same error in my own code and it turned out I had 90 variables and 89 equations. once I found the extra variable, the error stopped.