Forward guidance not working for nonlinear model

Dear Forum,

I am trying to adapt the forward guidance example provided by @jpfeifer here: DSGE_mod/NK_linear_forward_guidance at master · JohannesPfeifer/DSGE_mod · GitHub

I am using a simple nonlinear NK model with price rigidity. Unfortunately I am getting error when I run the file. The error is related to ‘Warning: Matrix is singular to working precision’. Can you please provide some idea about what is wrong here?
nk.mod (2.6 KB)
distance.m (1.8 KB)

I played around with some shock values and it seems there is an asymptote arising. Are you sure there is a solution?

Dear Prof. Pfeifer,

Thank you very much for your support.

When you mention ‘solution’, did you mean solution specific to the forward guidance problem?

here, I have attached a perfect foresight simulation with interest rate shock of value 0.01 in first period. The solution looks normal to me. Thus in this context, I fail to understand the ‘asymptote’. can you please elaborate on that?
nk.mod (2.7 KB)


(inflation and interest rate are annualised, all are % deviation from ss)

I meant a solution to the particular forward guidance problem.

Use a shock in just period 4:

x=[0,0,0,0.01]';

shocks;
var e_r;
periods 1:4;
values (x);
end;

perfect_foresight_setup(periods=100);
perfect_foresight_solver;

rplot i_m;

to see

When you try to set shocks to prevent these oscillations, the problem becomes worse.