Hi all,
I'm trying to simulate a model with multiple types of agents and am having trouble. I've reduced it to a simple deterministic ramsey model with two agents differentiated by their distaste for labor. Dynare is able to compute steady states for any sets of parameters, but when the agents are different, simulations don't work. That is, I'll simulate changing the utility function of one of the agents and capital for the two agents go off to +/- infinity. Does anybody have any suggestions? My code is below.
var k1, l1, c1, k2, c2, l2;
varexo a1, a2; ** utility is defined as u(c,l) = log(c) + a*log(1-l)
parameters alpha, beta; ** capital share and discount rate
** capital fully depreciates
alpha=.33;
beta=.97;
model;
c1 + k1 = k1(-1)*alpha*((k1(-1)+k2(-1))^(alpha-1))*((l1+l2)^(1-alpha)) + l1*(1-alpha)*((k1(-1)+k2(-1))^(alpha))*((l1+l2)^(-alpha));
c2 + k2 = k2(-1)*alpha*((k1(-1)+k2(-1))^(alpha-1))*((l1+l2)^(1-alpha)) + l2*(1-alpha)*((k1(-1)+k2(-1))^(alpha))*((l1+l2)^(-alpha));
c1(+1)/c1 = beta* (alpha*((k1+k2)^(alpha-1))*((l1(+1)+l2(+1))^(1-alpha)));
c2(+1)/c2 = beta* (alpha*((k1+k2)^(alpha-1))*((l1(+1)+l2(+1))^(1-alpha)));
a1/(1-l1) - ((1-alpha)*((k1(-1)+k2(-1))^(alpha))*((l1+l2)^(-alpha)))/c1 = 0;
a2/(1-l2) - ((1-alpha)*((k1(-1)+k2(-1))^(alpha))*((l1+l2)^(-alpha)))/c2 = 0;
end;
initval;
a1=2;
a2=.5;
c1=.35;
k1=.3;
l1=.7;
c2=.35;
k2=.3;
l2=.7;
end;
steady;
check;
endval;
a1=2;
a2=2;
c1=.35;
k1=.3;
l1=.7;
c2=.35;
k2=.3;
l2=.7;
end;
steady;
check;
simul(periods=250);