Second order cannot compute

First order looks ok (I think). When I set order to 2, I get the following. Can someone check the attached file and let me know how to go about it? I in the first order I also get LAMBDAR and lambda greater than 5.

Model1_DynarF.mod (8.6 KB)

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =
1.712298e-21.

In dyn_first_order_solver (line 292)
In stochastic_solvers (line 262)
In resol (line 103)
In stoch_simul (line 92)
In Model1_DynarF.driver (line 473)
In dynare (line 293)

At QuasiTriangular.cc:142:Matrix is not quasi-triangular

Error using mexErrCheck (line 41)
Error encountered in: gensylv.
Error in dyn_second_order_solver (line 92)
mexErrCheck(‘gensylv’, err);
Error in stochastic_solvers (line 270)
dr = dyn_second_order_solver(jacobia_,hessian1,dr,M_,…
Error in resol (line 103)
[dr,info] = stochastic_solvers(dr,check_flag,M,options,oo);
Error in stoch_simul (line 92)
[~,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
Error in Model1_DynarF.driver (line 473)
[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list_);
Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;

@jpfeifer Any clue?

The steady state helper is missing.

By setting

check(qz_zero_threshold= 1e-20);

you force the model to work at first order despite a fundamental singularity. But the problem reappears at order=2. You need to find out what is going on. For one, I find the zero interest rates strange.

Thanks. I will revisit again.