clear all
close all
beta    =    0.99;
omega   =    0.5;
gamma   =    2;
kaiy    =    0.5;
kaipi   =    1.5;
deltah  =    0.06;
delta   =    0.1;
alphah  =    0.1;
alpha   =    0.5;
hr      =    5;
theta   =    6;  
qr      =    0.75;
phi     =    0.1;

rhov    =    0.9;
rhog    =    0.9;
rhoz    =    0.9;
rhozh   =    0.9;
rhoR    =    0;   

piss    =    0;
qss     =    1;
vss     =    1;
zss     =    1;
rss     =    1/beta-1;
ghss    =    1;
Rss     =    (1+piss)*(1+rss)-1;
rkss    =    rss+delta;
mss     =    (theta-1)/theta;
wss     =    (mss*(alpha^alpha)*((1-alpha)^(1-alpha))*zss/(rkss^alpha))^(1/(1-alpha));
Pjss    =    1;
Pss     =    1;
ihss    =    ghss+deltah-1;

a1ss    =    0.2;  
a2ss    =    (1-alpha)*mss/(rss+deltah-(1-alphah)*ihss);  
a3ss    =    a2ss*alphah*ihss/rkss; 
a4ss    =    a2ss*(1-alphah)*ihss/wss;  
a5ss    =    a3ss+alpha*mss/rkss; 
a6ss    =    a5ss*(ghss+delta-1);  
a7ss    =    1-a6ss-a1ss;  
a8ss    =    (1-alpha)*mss/wss;  

yss     =    omega*wss/((1-omega)*a7ss+omega*wss*a8ss+omega*wss*a4ss);
gss     =    a1ss*yss;
muss    =    a2ss*yss;
khss    =    a3ss*yss;
enss    =    a4ss*yss;
kss    =     a5ss*yss;
iss    =     a6ss*yss;
css    =     a7ss*yss;
lss    =     a8ss*yss;
bss    =     5*yss;  

zhss   =     (rkss^alphah)*(wss^(1-alphah))/((alphah^alphah)*((1-alphah)^(1-alphah))*muss);

lamss  =     (1-gamma)*omega*vss/(1-gamma)*((css^omega)*((1-lss-enss)^(1-omega)))^(1-gamma)/css;
f1ss   =     lamss*yss/(1-beta*qr*(ghss^(1-gamma)));
f2ss   =     f1ss;
tss    =     gss+rss*bss;

pfss   =     1;
sss    =     1;

save cha6hn4index;

dynare Cha6hn4
