Nonzero residuals of static equations

Hi professor
I have two equations:
1- b=d+kb
2- jb=rbb-rdd.
In steady state model block i use these two equations as below:
1- d=ln(exp(b)-exp(kb));
2- jb=ln(exp(rb)*exp(b)-exp(d)*exp(d));

But in residuals of static equations part, the residuals of two equations mentioned earlier are nonzero.
Would you please help me?
Best regards.
AAA.mod (16.5 KB)

Your equations above are impossible to read, because some multiplication signs must be missing.

It is usually better to work with auxiliary equations to get a log-linearization. See Question about understanding irfs in dynare

Excuse me
the two equations are:
1- b=d+kb;
2- jb=brb-drd
thanks for your tips, but if you see the steady state model block i find the steady state value of all variables by mentioned method and residuals of all get zero instead of 2 mentioned equations.
would you please check it again?
Best regards

Hi professor
as you said in the topics, I performed an exp() substituion and the right form of above equations are:
1- exp(b)=exp(d)+exp(kb);
would you now check the model again?



you are getting a negative number inside of the bracket.

Excuse me professor
How do you understand that the exparation (ln(exp(b)-exp(kb)) become negative?
Because i experience this problem before and dynare give an error that “resid: The initial values for the steady state of the following variables are complex”.
But dynare do not give me this error now?
How i can fix the error?

You can execute the parameter definitions and the steady state model equations using F9 in Matlab. You will then see the problem. Tip: use % instead of // to add comments. Otherwise Matlab will complain if you execute lines with appended comments.