%  Clex35a.m
%  To be used with bewley3.m
%  Creates a heterogeneous agent, Lucas-Prescott invest under uncertainty
%  environment.
% Technology 4 (Growth)
% Preferences 3 (Habit persistence)
% We specialize the model to get a version of Lucas's pure endowment
% asset pricing economy
% We modify things to get setup in pure endowment economy
% in order to experiment with heterogeneity. The aggregate endowment
% is the sum of a first order a.r. ( .9) and a second order a.r. (1.2, -.3)
gam=.05
gamma=[gam 0]'
phic=[1 0]'
phig=[0 1]'
phi1=.2
phii=[0 -phi1]'
deltak=.95
thetak=1
beta=1/1.05
ud=[7 1 0 1 0;0 0 0 0 0]
ud1=[3.5 1 0 0 0;0 0 0 0 0]
ud2=[3.5 0 0 1 0; 0 0 0 0 0]
k0i=0
h0i=0
tol=0
a22=[1 0 0 0 0; 0 .96 0 0 0; 0 1 0 0 0;0 0 0 1.2 -.22;0 0 0 1 0]
c2=[0 .2 0 0 0;0 0 0 .25 0]'
lambda=0;
pih=1
deltah=.9
thetah=(1-deltah)
ub=[30 0 0 0 0]
ub1=ub/2
ub2=ub/2
x0=[3 425 1 0 0 0 0]
