I am trying to solve a two-country model using Deverux and Sutherland method of portfolio choice.
However, I am having problems with the steady-state. I have solved the SS by hand and introduced the analytical solution with steady_state_model command and it yields:ERROR: Division by zero!
Also, I have used MatLab to solve it, and I`ve use the numerical solution using initval command, yielding the very same error.
Any help would be appreciated,
Thanks in advance,
EDIT: FILES WERE REMOVED SINCE PROBLEM HAS BEEN SOLVED.( 03/11/2015)
First of all, your numbering is wrong. When you get
ERROR: Division by zero!
...division by zero error encountred when converting equation 29 to static
equation 29 is actually the equation you number 30. This one reads
Here, it is obivous that in steady state the denominator evaluates to 0, which is the source of the error message. It seems you are confusing logs and levels.
Thanks for your quick response.
Yes, there was a mistake, now I have changed the equation 29 with the following one
so that there is no zero in the denominator.
However, I find that the Jacobian contains Inf or NaN. It says that the problem arises when doing the derivatives w.r.t. the different variables. It says that the initial value of each var is= 0, BUT I have written an initval with non-zero values ( calculated with MatLab), as you can see in the attached code. Is not taken into account the initial values I already gave?
Also, what command do you use to see how dynare numbers the equations?
That is because you have the model_diagnostics command (which tries to compute the steady state) before your initial values.