Passed stoch_simul(), but error in MLE

Hi all,

I’m new to Dynare. I’m trying to solve a new Keynesian Phillips curve system in FRB/US. I followed Pfeifer (2013) Remark 2, and ran steady; check; stoch_simul(); first. The output didn’t give me any errors or warnings. But when I ran the estimation step, it said " Blanchard & Kahn conditions are not satisfied: no stable equilibrium."
I’ve gone over the equations several times. I’m (almost) 100% sure that the equations are right (unless there are typos in their documentation).

The attachments are my code, log, and data.
nkpc_new.log (15.8 KB)
nkpc_new.mod (3.6 KB)
load_nkpc_data.m (207 Bytes)
data.mat (6.7 KB)

Could someone help? Thank you in advance for your time.

If your model has a unit root, you need to set diffuse_filter in estimation.

Thank you, professor.

Dear Professor,

As I added diffuse_filter in estimation, the estimation gave me no std errors and the following warnings:

POSTERIOR KERNEL OPTIMIZATION PROBLEM!
(minus) the hessian matrix at the “mode” is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.
Warning: The results below are most likely wrong!

In dynare_estimation_1 (line 324)
In dynare_estimation (line 105)
In nkpc_new.driver (line 575)
In dynare (line 293)
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.
In dynare_estimation_1 (line 347)
In dynare_estimation (line 105)
In nkpc_new.driver (line 575)
In dynare (line 293)

Even after I added an empty estimated_param_init block with use_calibration option, I still got the warning.

Does that mean there is some problem with the model?

Thank you so much for your time.

Xizi
nkpc_new.log (57.5 KB)
nkpc_new.mod (3.6 KB)

  1. Your data is not mean 0, while your steady state values for the observables are. That suggests a wrong data treatment.
  2. Why do your obervables like inflation contain a unit root?

Thank you for the reply.

  1. Do you think I should add a steady_state_model block so that I can guide Dynare to find the optimal? I’m pretty new to Dynare. I’m not really sure how to set steady-state values.
  2. The unit root equations are to represent random walks. For example, pi_p_bar is the long-run inflation expectations. It is assumed to follow a random walk, same to r_bar (long-run federal funds rate expectations) and g (trends in the difference between price and wage price level).

Thank you so much for your time.

Xizi

It depends, Your model is linearized and Dynare does find the trivial steady state. The issue is that there are infinitely many steady states in your model. So you may want to use a steady state file with a constant term that you estimate. That would be similar to the steady_state_model-block of
https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Smets_Wouters_2007/Smets_Wouters_2007_45.mod