Smets-Wouters model with OccBin with U.S. updated data

Hello,
I am working on updating the SW07 model without price indexation for the U.S. economy up to 2019 using the OccBin tool. I have updated the data using the Fred data following the excel file in the replication file usmodel_data.xls.

My Occbin block is:

%%OCCBIND
[name=‘Notional rate Taylor rule’]
r_not = crpi*(1-crr)pinf
+cry
(1-crr)(y-yf)
+crdy
(y-yf-y(-1)+yf(-1))
+crr*r_not(-1)
+ms ;

[name=‘Observed interest rate’, relax=‘zlb’]
r = r_not;
[name=‘Observed interest rate’, bind=‘zlb’]
r = -conster;

%%

I have a problem with the mod file, which struggles to converge around the 177 period (around the start of the 2008 crisis) saying that the piecewise Kalman filter has NaN or the Matrix is close to singular and never finds the mode.
So far this is what I tried that has not worked out:

  1. Estimate the SW up to 2019 without the Occbin to get the mode, then use that mode file with the Occbin setup.
  2. Try different priors. The attached mod file has the original SW07 priors but I have considered the Professor Pfeifer priors on [here] (DSGE_mod/Smets_Wouters_2007/Smets_Wouters_2007_45.mod at master · JohannesPfeifer/DSGE_mod · GitHub).
  3. Explore different regimes on the Occbin specification. My baseline case is:

name ‘zlb’; bind r < -(((1+constepinf/100)/((1/(1+constebeta/100))*(1+ctrend/100)^(-csigma)))-1)100 -1e-4; relax r_not > -(((1+constepinf/100)/((1/(1+constebeta/100))(1+ctrend/100)^(-csigma)))-1)*100 + 1e-4;

where the (((1+constepinf/100)/((1/(1+constebeta/100))*(1+ctrend/100)^(-csigma)))-1)*100 is the parameter conster, avoiding to call it as local parameter. To help buffering the Occbin constrain, I am setting a big ZLB value, r_elb =0.5 because around the period 177 where the Kalmar filter struggles, the robs drops from 0.485 in the observation 245 to 0.045 in observation 247. Here I am using the trick shown here here, on the mod file called SW07_SG.mod to avoid stochastic singularity by setting the binding values of robs to NaN (see p. 87 in the Dynare manual). I also have consider a simpler constraint like:
name ‘zlb’; bind robs < r_elb - 1e-6; relax robs > r_elb + 1e-6;

Any idea or suggestion would be really appreciated,
Many thanks
Best

SW_occbin.mod (10.3 KB)
usmodel_data_updated.mat (14.0 KB)

Sorry for the delay. Is the problem still current?

Hello Professor,
Many thanks for your response. I have managed the following solution.

  1. Estimate the SW07 model using data up to 2019, without occbin to get updated files of the mode and priors.
  2. Use the above mode and prior data as input with the occbin implementation.

Please see the updated files. Doing this the model works, however I am concerned that it prints out 2 warnings.

  1. Around period 177 the Kalman filter is not converging
  2. Between periods 181 and 185 the occbin smoother is not converging as well.

Would this represent a problem? Is there any workaround this issue?
Best

SW_updated_occbin.mod (10.4 KB)
usmodel_data_updated.mat (14.0 KB)
usmodel_mode.mat (8.0 KB)

To me that looks like output from

options_.debug=true;  // see Dynare post on piecewise Kalman filter
options_.occbin.smoother.debug=1;

that is not critical.