粘性价格两国模型
请高手看一下这个程序怎么运行不出结果?谢谢啦。。。。
var yh ch nh ih wh mh dcpih dph mch gh zh dphs s2h s2h yf cf nf if wf mf dcpif dpf mcf gf zf dpfs s1f s2f q s tbh
dh df var_ph var_pf;
varexo ezh;
parameters alpha beta sigma nu gamma theta eta eps mu big_theta chi size phi_dph phi_dpf rho_z Nbar Cbar mbaar ibar open delta_h delta_f;
alpha=2/3; beta=0.99; sigma=1; nu=1; esp=3; chi=0.05; size=0.5; open=0.5; delta_h=1-(1-size)*open; delta_f=size*open;
gamma=2/3; theta=6; eta=2; mu=theta/(theta-1); mu=1; big_theta=1/(1+theta*(1-alpha)/alpha);
phi_dph=1.5; phi_dpf=1.5; rho_z=0.9;
Nbar=(alpha/mu)^(1-(sigma*alpha+nu+1-alpha)); ibar=-log(beta); Cbar=Nbar^alpha;
mbar=log(chi*(exp(ibar)/(exp(ibar)-1))*exp(Cbar)^sigma)^(1/eps);
model;
1/(exp(ih)=beta*exp(ch(+1))^(-sigma)/exp(ch)^(-sigma)/exp(dcpih(+1));
1/(exp(if)=beta*exp(cf(+1))^(-sigma)/exp(cf)^(-sigma)/exp(dcpif(+1));
exp(wh)=exp(ch)^sigma*exp(nh)^nu;
exp(wf)=exp(cf)^sigma*exp(nf)^nu;
chi*exp(mh)^(-eps)*exp(ch)^sigma=(exp(ih)-1)/exp(ih);
chi*exp(mf)^(-eps)*exp(cf)^sigma=(exp(if)-1)/exp(if);
exp(mch)=1/alpha*exp(ch)^sigma*exp(nh)^nu*exp(gh)*exp(yh)^((1-alpha)/alpha)*exp(zh)^(-1/alpha);
exp(mcf)=1/alpha*exp(cf)^sigma*exp(nf)^nu*exp(gf)*exp(yf)^((1-alpha)/alpha)*exp(zf)^(-1/alpha);
s1h=exp(dph)^(theta/alpha)*(exp(ch)^(1-sigma)/exp(gh)*exp(mch)+beta*gama*s1h(+1));
s2h=exp(dph)^(theta-1)*(exp(ch)^(1-sigma)/exp(gh)+beta*gamma*s2h(+1));
s1f=exp(dpf)^(theta/alpha)*(exp(cf)^(1-sigma)/exp(gf)*exp(mcf)+beta*gamma*s1f(+1));
s2f=exp(dpf)^(theta-1)*(exp(cf)^(1-sigma)/exp(gf)+beta*gamma*s2f(+1));
dphs*(1+(1-alpha)*theta/alpha)=log(s1h)-log(s2h);
dpfs*(1+(1-alpha)*theta/alpha)=log(s1f)-log(s2f);
exp(dph)^(1-theta)=gamma+(1-gamma)*exp(dphs)^(1-theta);
exp(dpf)^(1-theta)=gamma+(1-gamma)*exp(dpfs)^(1-theta);
//gh=(1-delta_h)*s;//eta=1
//gf=delta_f*(-s);//eta=1
exp(gh)^(1-eta)=delta_h+(1-delta_h)*exp(s)^(1-eta);//eta!=1
exp(gf)^(1-eta)=delta_f*exp(s)^(-(1-eta))+(1-delta_f);//eta!=1
dcpih-dph=gh-gh(-1);
dcpif-dpf=gf-gf(-1);
exp(yh)*exp(gh)^(-eta)=delta_h*exp(ch)+delta_f*(1-size)/size*exp(q)^eta*exp(cf);
exp(yf)*exp(gf)^(-eta)=(1-delta_h)*size/(1-size)*exp(q)^(-eta)*exp(ch)+(1-delta_f)*exp(cf);
exp(nh)=exp(yh-zh)^(1/alpha)*exp(dh);
exp(nf)=exp(yf-zf)^(1/alpha)*exp(df);
dh=theta/(2*alpha*big_theta)*var_ph;
var_ph=var_ph(-1)*gamma+gamma/(1-gamma)*dhp^2;
df=theta/(2*alpha*big_theta)*var_pf;
var_pf=var_pf(-1)*gamma+gamma/(1-gamma)*dpf^2;
ch=cf+1/sigma*q;
q=s+gf-gh;
ih=ibar+phi_dph*dph;
if=ibar+phi_dpf*dpf;
zh=rho_z*zh(-1)-ezh;
zf=0;
tbh*Nbar^alpha=yh-gh-ch;
end;
initval;
nh=log(Nbar); nf=nh; ch=alpha*nh; cf=ch; yh=ch; yf=cf; ih=ibar; if=ibar; wh=sigma*ch+nu*nh;
wf=wh; mh=mbar; mf=mbar; dcpih=0; dcpif=0;
dph=0; dpf=0; dphs=0; dpfs=0; mch=-log(mu); mcf=-log(mu); gh=0; gf=0; gf=0; zh=0; zf=0;s1h=1/(1-beta*gamma); s2h=s1h; s1f=s1h; s2f=s2h;
s=0; q=0; ezh=0; dh=0; df=0; var_ph=0; var_pf=0;
end;
steady; check;
shocks; var ezh; stderr 0.01; end;
stoch_simul(order=1,relative_irf);