# Blanchard-Kahn conditions fail

Hi

I have a problem with simulating model. I’m running a DSGE model for debt on Cash in Advance framework. Although I tried every change in stock variables timing, I got “Blanchard-Kahn conditions are not satisfied”’ error. It is an emergency case and I will be very grateful if someone can help me immediately. This is my code.

``````var r w pi i cp l kp m  y uc ul xp k c b mu ;
predetermined_variables k b m ;
varexo une s d;
parameters alpha beta gamma delta sai tao sigma A cgy kgy v oy;
alpha = 0.66;
beta = 0.95;
gamma = 0.5;
delta = 0.09;
sai = 1.95;
tao = 0.071;
sigma = 1;
A = 1;
cgy = 0.13;
kgy = 0.66;
v=0;
oy=1/10;

model;

c=cp+cgy*y;
k=kp+kgy*y;
uc = (l^(sai))*((c*(l^(sai)))^(-sigma));
ul = sai*c*(l^(sai-1))*((c*(l^(sai)))^(-sigma));
y = A*(k^(alpha))*((1-l)^(1-alpha));
r=alpha*y/k;
w=(1-alpha)*y/(1-l);
cp+xp+b(+1)+m(+1)=(1-tao)*(y)+((1+i)/(1+pi))*b+(1/(1+pi))*m+s-v;
gamma*c+b(+1)=(1/(1+pi))*m;
kp(+1)=xp+(1-delta)*kp;
((1+i)/(1+pi))*b+une =((1+i)/(1+pi))*b+b(+1);
uc = beta*uc(+1)*((1-tao)*r(+1)+(1-delta))*(((1-gamma)+gamma*((1-tao)*r+(1-delta))*(1+pi))/((1-gamma)+gamma*((1-tao)*r(+1)+(1-delta))*(1+pi(+1))));
uc=(1-gamma)*(ul/(w*(1-tao)))+gamma*(1+i(+1))*(beta*ul(+1)/(w*(1-tao)*(1+pi(+1))));
1+i(+1)=((1-tao)*r+(1-delta))*(1+pi)*((1-tao)*r(+1)+(1-delta))*(1+pi(+1));
m(+1)=(1/(1+pi))*m+d(+1)+s(+1)+((1+i)/(1+pi))*b;
m(+1)=((1+mu)/(1+pi))*m;
end;

initval;

r=0.1535;
w=5.7665;
pi=0.2;
i=0.5956;
cp=1.4205;
l=0.8188;
kp=10.3329;
m = 0.8523;
d=0.054;
y=4.3638;
xp=0.9299;
k=13.213;
c=1.9878;
s=0.0479;
b=0;
uc=0.5;
ul=2.3815;
mu=0.2;
end;

check;