Blanchard & kahn condition

hi, I got an error saying that “Blanchard & Kahn conditions are not satisfied: indeterminacy.”

my code is as below:

var Y K C p n w r A g i;

varexo e_g e_A;

parameters beta sigma gamma delta theta rho_A rho_g B sigma_A sigma_g g_bar A_bar;

beta = 0.99;

sigma = 1.5;

gamma = 2;

delta = 0.025;

theta = 0.33;

rho_A = 0.9;

rho_g = 0.5;

B = 2.291;

sigma_A = 0.01;

sigma_g = 0.01;

g_bar = 1.02;

A_bar = 1;

model;

(1/beta) * n^(1/gamma) / (n(+1))^(1/gamma) = (w / (w(+1))) * ((r(+1)) + (1 - delta));

n^(1/gamma) * B * (g(+1)) * (p(+1)) / w = beta * p / (C(+1))^(-sigma);

w = (1-theta)*A*K(-1)^(theta)*n^(-theta);

r = theta*A*K(-1)^(theta-1)*n^(1-theta);

i = K-(1-delta)*K(-1);

C + i = w * n + r * K(-1);

p = 1/C;

Y = A*K(-1)^(theta)*n^(1-theta);

log(g) = rho_g*log(g(-1))+(1-rho_g)*log(g_bar)+e_g;

log(A) = rho_A*log(A(-1))+e_A;

end;

initval;


r = (1/beta)-1+gamma;

A = A_bar;

w = (1-theta)*A*((r+gamma)/theta*A)^(theta/(1-theta));

g = g_bar;

n = 1/3;

C = 1;

K = 1;

p= 1;

Y = C + gamma*K;

i = gamma*K;

end;

shocks;

var e_g = (sigma_g)^2;

var e_A = (sigma_A)^2;

end;

steady;

stoch_simul(order=1,irf=20,hp_filter=1600) Y K C p n w r A g i;

could someone let me know what is the problem? since steady state is derived, foc doesn’t seem to be a problem.
thanks in advance!

sorry I solved the problem. I had a typo in foc
thanks!

1 Like