Impossible to find the steady state

Hi, I am still a rookie in dynare and I am working on a small open economy model with financial frictions(as in Carlstrom Fuerst) from a paper but I have trouble with the steady state in dynare

I hope someone can help me with the problem. I think the problem either comes from the guessing initial values I set, which might be too far from the steady state values

or it might be because some equations are misspecified.

The attachment is the mod file.
small_open.mod (3.63 KB)

Ideally, first start with a simple model that runs and then add the financial frictions. You can then use the starting values from the easier model. One obvious thing is that

pt = 0.87*pt(-1)+stdep*eP;
implies a steady state of pt of 0, but your initial value says it is 1.

Thanks for the reply.

I changed the code slightly but I still got the following error message:
Error using erfc
Input must be real and full.
Error in normcdf (line 90)
p(todo) = 0.5 * erfc(-z ./ sqrt(2));
Error in small_open_static (line 145)
rhs =normcdf(T237,0,1);
Error in lnsrch1 (line 95)
fvec = feval(func,x,varargin{:}) ;
Error in solve1 (line 107)
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});
Error in dynare_solve (line 150)
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag, …
Error in evaluate_steady_state (line 66)
[ys,check] = dynare_solve([M.fname 'static’],…
Error in steady
(line 54)
[steady_state,params,info] =
evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);
Error in steady (line 81)
[steady_state,M_.params,info] = steady_(M_,options_,oo_);
Error in small_open (line 359)
steady;
Error in dynare (line 180)
evalin(‘base’,fname) ;
small_open.mod (3.68 KB)