# Implementing ZLB in Ireland (2004)

I am trying to implement the zero lower bound in a simple NK-model. As it is at the moment, the model does not converge, and I am struggling to figure out why

``````var y, x, g, r, pi, a, e, z, rt ;

varexo eps_r, eps_a, eps_e, eps_z ;

parameters beta, omega, psi, rho_pi, rho_g, rho_x, rho_a, rho_e,
sig_r, sig_z, sig_a, sig_e ;

beta   = 0.99   ;  rho_x  = 0.0347 ;  sig_a  = 0.0405 ;
psi    = 0.1    ;  rho_g  = 0.0000 ;  sig_e  = 0.0012 ;
omega  = 0.0617 ;  rho_a  = 0.9470 ;  sig_z  = 0.0109 ;
rho_pi = 0.3597 ;  rho_e  = 0.9625 ;  sig_r  = 0.0031 ;

model (linear) ;
x = x(+1)-(r-pi(+1))+(1-omega)*(1-rho_a)*a;
pi = beta * pi(+1) + psi * x - e ;
rt = r(-1)+rho_pi*pi+rho_g*g+rho_x*x+eps_r;
x = y-omega*a;
g = y-y(-1)+z;
a = rho_a * a(-1) + eps_a ;
e = rho_e * e(-1) + eps_e ;
z = eps_z ;

[name='Interest rate',relax = 'zlb']
r = rt;
[name='Interest rate',bind = 'zlb']
r = 0;
end ;

occbin_constraints;
name 'zlb'; bind r <= 0; relax r > 0;
end;

shocks(surprise);
% var eps_a;
% periods 1:10, 11, 12:40;
% values 0, -0.1, 0;

var eps_e;
periods 1:10, 11, 12:40;
values 0, 0.01, 0;

% var eps_z;
% periods 1:10, 11, 12:40;
% values 0, -0.1, 0;
%
% var eps_r;
% periods 1:10, 11, 12:40;
% values 0, -0.1, 0;
end ;

occbin_setup;
Your constraint is wrong. The ZLB does not bind when `r=0` and therefore the interest rate is in steady state. Rather, it can fall by `1-1/beta`. See also