Hi everyone,

I am trying to solve a simple linear NK model at the ZLB, using the OCCBIN toolkit. I think I am missing something because I get exactly the same IRFS for the linear and for the piecewise solution. Here is my “runsim” code, could anyone help me understand whats wrong?

```
global M_ oo_
modnam = 'NIBNIL';
modnamstar = 'NIBNIL_ZLB';
constraint = 'irate <(1-Rss)';
constraint_relax ='iratenot >(1-Rss)';
% Pick innovation for IRFs
irfshock =char('epssigma'); % label for innovation for IRFs
shockssequence = [1; zeros(30,1)];
nperiods = 30;
% Solve model, generate model IRFs
[zdatalinear zdatapiecewise zdatass oobase_ Mbase_ ] = ...
solve_one_constraint(modnam,modnamstar,...
constraint, constraint_relax,...
shockssequence,irfshock,nperiods);
% unpack the IRFs
for i=1:M_.endo_nbr
eval([deblank(M_.endo_names(i,:)),'_l=zdatalinear(:,i);']);
eval([deblank(M_.endo_names(i,:)),'_p=zdatapiecewise(:,i);']);
eval([deblank(M_.endo_names(i,:)),'_ss=zdatass(i);']);
end
% define inputs for plotting
titlelist = char('prod (GDP)','prodfor (Foreign GDP)','irate (Interest rate)','bgdp (Private debt)');
percent = 'Percent';
level = 'Level';
ylabels = char(percent,percent,percent,percent,level);
figtitle = '';
legendlist = cellstr(char('Piecewise Linear','Linear'));
line1=100*[prod_p,prodfor_p,irate_p,bgdp_p];
line2=100*[prod_l,prodfor_l,irate_l,bgdp_l];
% create plots
makechart(titlelist,legendlist,figtitle,ylabels,line1,line2)
```

Thank you!