I replicated the Heutel (2012, RED) E-DSGE model deriving the steady states and solved it using the Anderson–Moore algorithm just like the author did. I tried to implement the model into Dynare using the same equations and identical steady states (i double-checked values and formulas for each variable) as in the AMA computation. Unfortunately, Dynare cannot find steady states and reports two (rather) small residuals :

Residuals of the static equations:

Equation number 1 : 8.2921e-08 : 1
Equation number 2 : 0 : r
Equation number 3 : 0 : tau
Equation number 4 : 0 : c
Equation number 5 : 0 : i
Equation number 6 : 0 : x
Equation number 7 : 0 : e
Equation number 8 : 0 : z
Equation number 9 : 0 : y
Equation number 10 : 0 : 10
Equation number 11 : 0 : zy
Equation number 12 : 0 : ztau
Equation number 13 : 0 : etau
Equation number 14 : 0 : ey
Equation number 15 : 0 : rtau
Equation number 16 : 0 : ry
Equation number 17 : 0 : rk
Equation number 18 : 0 : 18
Equation number 19 : 0 : zeta
Equation number 20 : 0 : 20
Equation number 21 : 3.1153e-05 : 21

If I use the initval method of Dynare choosing the proposed steady states of Heutel it works but Dynare reports slightly different steady states compared to the AMA. I am curious, has anybody ever encountered such a problem? And is there maybe an intuitive explanation for this (e.g. roundoff error, but the residuals might be too big)?

Can you provide the file? The upload did not finish. How big are the differences across softwares? And did you use exactly the same parameter values? Here, all digits matter.

Sorry for this mistake. Here is the the mod file I used to replicate the results in dynare. The analytical expressions are identical and the parameter values and steady state values for capital and emissions are identical up to the last decimal place. replica_heutel_steady_state.mod (5.2 KB)

I used the following matlab code provided by the author to compute the steady state values. This code uses the Anderson Moore Algorithm to solve the model.

only holds true as the steady state value of rest-of-world emissions e_row is set to
three times the value of domestic emissions e, hence 4*e. As e_ss is in my version set to the same value in, namely 2.21601162526919, it does not fix my initial problem, even though you are completely right it is bad style.

Unfortunately, even changing it to the suggested equation by the authors leads to the exact same residuals as mentioned before.

I works perfectly fine, thank you so much!
Could you give me some background information on the tolerance of fsolveor refer me to some threads or literature on this?

The numerical solver for the steady state system terminates once the solution is sufficiently close to 0. But it was not close enough for Dynare’s internal consistency check. The additional issue was your hardcoding of e in the model-block, which I removed.