Hey,
I have a two period OLG with some extra stuff in it. It seems to work. That is steady state is found nicely and BK conditions are satisfied. However, the model doesn't seem to converge when I try to (deterministically) simulate it. Dynare complains about singular matrix, but I can't figure out what's wrong in the model. Here's the code:
model;
c1 + s + b = w - d;
c2(+1) = (1+r(+1))*s + (1+r_f(+1))*b + x(+1);
x = 0.5*w;
x = mu_f(-1)*(1+r)*d(-1) + (1+n)*(1-mu_f)*d; //CONTRIBUTIONS
1/c1 = beta*(1+r(+1))/c2(+1);
1/c1 = beta*(1+r_f(+1))/c2(+1);
y = k(-1)^alpha;
w = (1-alpha)*k(-1)^alpha;
r = alpha*k(-1)^(alpha-1) - delta;
r_f = r_star - a*b;
c = c1 + c2/(1+n);
(1-omega)*i = (1+n)*k - (1-delta)*k(-1);
omega = kappa*( exp( i/i(-1)-1 ) + exp( -(i/i(-1)-1) ) - 2 );
y = c + i + b - (1+r_f)*b(-1)/(1+n);
check1 = (1+n)*k - s - mu_f*d;
end;
initval;
r_star=r_starss; r_f=r_fss; b=bss; n=nss; mu_f=mu_fss;
k = kss; c1 = c1ss; c2 = c2ss; r=rss; w=wss; c=css; y = yss; s=sss;
d=dss; i=iss;
end;
steady;
check;
shocks;
var mu_f;
periods 1 2 3 4 5 6 7 8 9 10;
values 0 0 0 0 0 0 0 0 0 0;
end;
simul(periods=20);
......
......
"Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN."
I would greatly appreciate if somebody could give me a hint what might be wrong.
Cheers,
M