Occbin: "increase maxit or check_ahead_periods" with very high maxit and check_ahead_periods

  1. Part of the problem is a bug that will crash Occbin whenever something goes wrong. See Provide error handling to piece-wise linear Kalman filter (#1854) · Issues · Dynare / dynare · GitLab
  2. The other issue is your specification. You had
occbin_constraints;
    name 'ELB'; bind iT - 1e-06*vr_s1*Ups < 0.001247663; relax iT - 1e-06*vr_s1*Ups > 0.001247663;
end;

So the ZLB exactly binding will fall between the two regimes, creating oscillations.
Using

% load OccBin 
occbin_constraints;
    name 'ELB'; bind iT - 1e-06*vr_s1*Ups <= 0.001247663-1e-8; relax iT - 1e-06*vr_s1*Ups > 0.001247663+1e-8;
end;

occbin_setup(likelihood_max_kalman_iterations = 100, likelihood_check_ahead_periods = 200, smoother_maxit = 100, likelihood_maxit = 100, smoother_periods = 200, simul_check_ahead_periods = 200);

seems to work. It introduces a slight numerical buffer to prevent spurious reversals.

2 Likes