# ZERO LOWER BOUND wirh OCCBIN

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';

% 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!

Hi mmalmi,

Sure. fomega2 and fomega2open are two functions used for the steady state calculation (NIBNIL_ss). Then the mod files use the values stored after running NIBNIL_ss

fomega2.m (821 Bytes) fomega2open.m (660 Bytes) NIBNIL.mod (24.0 KB) NIBNIL_ss.m (22.1 KB) NIBNIL_ZLB.mod (16.8 KB) runsim_NIBNIL_2.m (1.6 KB)

If I choose `scenario = 1`, then there seems to be no mistake.
`min(irate_p) = -3.588068554181867e-04` and hence there is no violation of the ZLB (which is attained at `1-Rss =-0.017415534656914`). Obtaining the exact same IRFs is correct in this case.

But I should note that the overall implementation looks strange to me.
Why do you set an initval-block and compute steady states if you have the (linear) option set in the model block?

The problem arises when choosing scenario 4. The initval block is redundant, that’s right, but even eliminating it I get the same result…

So, is there probably an error with the constraint that I am implementing?

Again, there is no problem since `min(irate_p) = -0.002998584497758`.
Note that your IRF is scaled by 100, hence the interest rate almost reaches -0.3
But there is again no binding ZLB!