Estimation fails at initial values – BK condition not satisfied( discretionary NK model)

Dear all,
I’m trying to run a Bayesian estimation of a New-Keynesian model under discretionary policy
closediscre.mod (2.2 KB)
dat.mat (5.1 KB)
(the “optimal x = −κ/ϑ π” feedback).
The model simulates fine with stoch_simul, but the moment I call estimation I get

Error in computing likelihood for initial parameter values
Blanchard & Kahn conditions are not satisfied: no stable equilibrium

Full console output is attached below.

–Environment
Dynare 6.2, MATLAB R2022b, Windows 10

–Files attached
closediscre.mod – current version of the model (18 variables, 18 equations)
dat.mat – quarterly data (dy_obs, pie_obs, ii_obs)

Your model has a unit root. You need to use the diffuse_filter option.

Thanks professor for your reply. But after adding diffuse_filter the unit-root warning disappeared

estimation(datafile=dat,  diffuse_filter,      
           mode_check,               
           mode_compute=4,
           mh_replic=500,
           mh_nblocks=2,
           mh_jscale=.99,
           mh_drop=0.2);

, but now the estimation stops with

OPTIMIZATION PROBLEM!
(minus) the hessian matrix at the "mode" is not positive definite!
...
I don't understand it.
Error using chol
Matrix must be positive definite.

Your observation equations are wrong. For example, output growth is mean 0 in the model, but has about mean 0.9 in your data.

Thank you professor very much!