Page 1 of 1

Deterministic simulation not converging (BK satisfied)

PostPosted: Wed Mar 14, 2012 5:26 pm
by makota
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

Re: Deterministic simulation not converging (BK satisfied)

PostPosted: Tue Apr 24, 2012 10:01 am
by fabio_portugal
Hi,
I have the same problem with my model.
Have you found a way to fix it?
Best
Fabio

Re: Deterministic simulation not converging (BK satisfied)

PostPosted: Tue Sep 18, 2012 11:05 am
by makota
Hey,

Yeah I'm able to (deterministically) simulate the model. There is a problem, though, because the feasibility constraint doesn't hold in my economy during the simulation. That I don't know how to fix. How about you?

t
M

Re: Deterministic simulation not converging (BK satisfied)

PostPosted: Thu May 02, 2013 4:22 pm
by davidkelley
Hey I was just coming across the same problem. Did you have any luck in finding a solution?