Positive Hessian when starting non-linear estimation

Dear All,

I am trying to estimate a non-linear small new-Keynesian model using cubature Kalman filter.

I have written a code and tested it with linear estimation. It went through.
When moving to non-linear filters, the following message pops up.
(measurement errors have been included in the block for prior definition)

What would you do to overecome it?

Here, please, find attached code, data and results for the linear and non-linear case.

NK_test.zip (824.1 KB)

Many thanks in advance.



Error using chol
Matrix must be positive definite.

Error in nonlinear_kalman_filter (line 116)
StateVectorVarianceSquareRoot =
chol(ReducedForm.StateVectorVariance)';

Error in non_linear_dsge_likelihood (line 334)
LIK =
feval(DynareOptions.particle.algorithm,ReducedForm,Y,start,DynareOptions.particle,DynareOptions.threads);

Error in initial_estimation_checks (line 137)
    [fval,info] =
    feval(objective_function,xparam1,DynareDataset,DatasetInfo,DynareOptions,Model,EstimatedParameters,BayesInfo,BoundsInfo,DynareResults);
    
Error in dynare_estimation_1 (line 165)
    oo_ =
    initial_estimation_checks(objective_function,xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);
    
Error in dynare_estimation (line 105)
    dynare_estimation_1(var_list,dname);

Error in NKt_estYPIR (line 301)
oo_recursive_=dynare_estimation(var_list_);

Error in dynare (line 235)
evalin('base',fname) ;

Just as additional information, I have also tried using the following options:

nonlinear_filter_initialization=1

New option nonlinear_filter_initialization for the estimation command. Controls the initial covariance matrix of the state variables in nonlinear filters. Default value is 1, the initial covariance matrix is the unconditional covariance matrix of the reduced form solution of the model approximated at order one. If the model has unit roots, the user must set this option equal to 3, the initial covariance matrix is then an identity matrix.

Lik_init=1
And
Prior_trunc=0

Best regards, DB

I would carefully check identification. I get

    [sigma_g,Sg_STEADY] are PAIRWISE collinear (with tol = 1.e-10) !

Also, some of the likelihood graphs at the mode are extremely flat, suggesting no identification or weak identification. I don’t see how you can estimate A_STEADY