Non zero residuals in static equations

Hi!

Very new to dynare.
I’m trying to solve this model, but I get that the static equations are not zero, and I have no idea how to spot the issue.

Any ideas are greatly appreciated!!
model_estimation.mod (10.2 KB)

You need to clean up your file. For example, equation
theta = (1-rho_theta)*theta_ss+rho_theta*theta(-1)+sde_theta*eC;
implies that theta=theta_ss in steady state. But the steady_state_model-block never makes sure that
theta =((1-sigma)+M*phi*(1-sigma)*(Rf-Rd)*(1/pi))/(phi*(1-sigma)-M*sigma*(phi^2)*(Rf-Rd)*(1/pi));
is consistent with the value of theta_ss.

Thanks!
Already removed those, but the steady state is not zero. Any further ideas?

No, except for thoroughly checking all equations and your steady state computations. There must be other mistakes.

Right, so I’m really stucked, and I’d appreciate any sort of guidance.
Below I attach three files, 2 are mod files and one is a.m file.
One of the mod files calculates the steady state inside the mod file, but it fails in getting 0 in static equations. The other mod file calls on the .m file and runs perfectly.
The idea I have in mind is to translate everything from the .m file into the steady_state_model-block of the first mod file

TS_UR_LM.mod (6.0 KB)
model_estimation.mod (10.6 KB)
TS_UR_calibration_LM.m (5.0 KB)