Commit cd2b14cd authored by Houtan Bastani's avatar Houtan Bastani

aesthetic changes

parent bb6ce5d9
......@@ -33,20 +33,18 @@
* at <http://www.gnu.org/licenses/>.
*/
var labobs robs pinfobs dy dc dinve dw ewma epinfma zcapf rkf kf pkf cf
invef yf labf wf rrf mc zcap rk k pk c inve y lab pinf w r a b g qs ms
spinf sw kpf kp;
varexo ea eb eg eqs em epinf ew;
var labobs robs pinfobs dy dc dinve dw ewma epinfma zcapf rkf kf pkf cf
invef yf labf wf rrf mc zcap rk k pk c inve y lab pinf w r a b g qs ms
spinf sw kpf kp;
varexo ea eb eg eqs em epinf ew;
parameters curvw cgy curvp constelab constepinf constebeta cmaw cmap calfa
czcap csadjcost ctou csigma chabb ccs cinvs cfc
cindw cprobw cindp cprobp csigl clandaw
crdpi crpi crdy cry crr
crhoa crhoas crhob crhog crhols crhoqs crhoms crhopinf crhow
ctrend cg;
parameters curvw cgy curvp constelab constepinf constebeta cmaw cmap calfa
czcap csadjcost ctou csigma chabb ccs cinvs cfc
cindw cprobw cindp cprobp csigl clandaw
crdpi crpi crdy cry crr
crhoa crhoas crhob crhog crhols crhoqs crhoms crhopinf crhow
ctrend cg;
// fixed parameters
ctou=.025;
......@@ -63,7 +61,7 @@ cfc=1.5;
cgy=0.51;
csadjcost= 6.0144;
chabb= 0.6361;
chabb= 0.6361;
cprobw= 0.8087;
csigl= 1.9423;
cprobp= 0.6;
......@@ -80,7 +78,7 @@ crhob= 0.5799;
crhog= 0.9957;
crhols= 0.9928;
crhoqs= 0.7165;
crhoas=1;
crhoas=1;
crhoms=0;
crhopinf=0;
crhow=0;
......@@ -89,10 +87,10 @@ cmaw = 0;
constelab=0;
model(linear);
//deal with parameter dependencies; taken from usmodel_stst.mod
model(linear);
//deal with parameter dependencies; taken from usmodel_stst.mod
#cpie=1+constepinf/100;
#cgamma=1+ctrend/100 ;
#cgamma=1+ctrend/100;
#cbeta=1/(1+constebeta/100);
#clandap=cfc;
......@@ -100,7 +98,6 @@ model(linear);
#cr=cpie/(cbeta*cgamma^(-csigma));
#crk=(cbeta^(-1))*(cgamma^csigma) - (1-ctou);
#cw = (calfa^calfa*(1-calfa)^(1-calfa)/(clandap*crk^calfa))^(1/(1-calfa));
//cw = (calfa^calfa*(1-calfa)^(1-calfa)/(clandap*((cbeta^(-1))*(cgamma^csigma) - (1-ctou))^calfa))^(1/(1-calfa));
#cikbar=(1-(1-ctou)/cgamma);
#cik=(1-(1-ctou)/cgamma)*cgamma;
#clk=((1-calfa)/calfa)*(crk/cw);
......@@ -113,68 +110,52 @@ model(linear);
#conster=(cr-1)*100;
// flexible economy
0*(1-calfa)*a + 1*a = calfa*rkf+(1-calfa)*(wf) ;
zcapf = (1/(czcap/(1-czcap)))* rkf ;
rkf = (wf)+labf-kf ;
kf = kpf(-1)+zcapf ;
invef = (1/(1+cbetabar*cgamma))* ( invef(-1) + cbetabar*cgamma*invef(1)+(1/(cgamma^2*csadjcost))*pkf ) +qs ;
pkf = -rrf-0*b+(1/((1-chabb/cgamma)/(csigma*(1+chabb/cgamma))))*b +(crk/(crk+(1-ctou)))*rkf(1) + ((1-ctou)/(crk+(1-ctou)))*pkf(1) ;
cf = (chabb/cgamma)/(1+chabb/cgamma)*cf(-1) + (1/(1+chabb/cgamma))*cf(+1) +((csigma-1)*cwhlc/(csigma*(1+chabb/cgamma)))*(labf-labf(+1)) - (1-chabb/cgamma)/(csigma*(1+chabb/cgamma))*(rrf+0*b) + b ;
yf = ccy*cf+ciy*invef+g + crkky*zcapf ;
yf = cfc*( calfa*kf+(1-calfa)*labf +a );
wf = csigl*labf +(1/(1-chabb/cgamma))*cf - (chabb/cgamma)/(1-chabb/cgamma)*cf(-1) ;
kpf = (1-cikbar)*kpf(-1)+(cikbar)*invef + (cikbar)*(cgamma^2*csadjcost)*qs ;
// sticky price - wage economy
mc = calfa*rk+(1-calfa)*(w) - 1*a - 0*(1-calfa)*a ;
zcap = (1/(czcap/(1-czcap)))* rk ;
rk = w+lab-k ;
k = kp(-1)+zcap ;
inve = (1/(1+cbetabar*cgamma))* ( inve(-1) + cbetabar*cgamma*inve(1)+(1/(cgamma^2*csadjcost))*pk ) +qs ;
pk = -r+pinf(1)-0*b +(1/((1-chabb/cgamma)/(csigma*(1+chabb/cgamma))))*b + (crk/(crk+(1-ctou)))*rk(1) + ((1-ctou)/(crk+(1-ctou)))*pk(1) ;
c = (chabb/cgamma)/(1+chabb/cgamma)*c(-1) + (1/(1+chabb/cgamma))*c(+1) +((csigma-1)*cwhlc/(csigma*(1+chabb/cgamma)))*(lab-lab(+1)) - (1-chabb/cgamma)/(csigma*(1+chabb/cgamma))*(r-pinf(+1) + 0*b) +b ;
y = ccy*c+ciy*inve+g + 1*crkky*zcap ;
y = cfc*( calfa*k+(1-calfa)*lab +a );
pinf = (1/(1+cbetabar*cgamma*cindp)) * ( cbetabar*cgamma*pinf(1) +cindp*pinf(-1)
+((1-cprobp)*(1-cbetabar*cgamma*cprobp)/cprobp)/((cfc-1)*curvp+1)*(mc) ) + spinf ;
w = (1/(1+cbetabar*cgamma))*w(-1)
+(cbetabar*cgamma/(1+cbetabar*cgamma))*w(1)
+(cindw/(1+cbetabar*cgamma))*pinf(-1)
-(1+cbetabar*cgamma*cindw)/(1+cbetabar*cgamma)*pinf
+(cbetabar*cgamma)/(1+cbetabar*cgamma)*pinf(1)
+(1-cprobw)*(1-cbetabar*cgamma*cprobw)/((1+cbetabar*cgamma)*cprobw)*(1/((clandaw-1)*curvw+1))*
(csigl*lab + (1/(1-chabb/cgamma))*c - ((chabb/cgamma)/(1-chabb/cgamma))*c(-1) -w)
+ 1*sw ;
r = crpi*(1-crr)*pinf
+cry*(1-crr)*(y-yf)
+crdy*(y-yf-y(-1)+yf(-1))
+crr*r(-1)
+ms ;
a = crhoa*a(-1) + ea;
b = crhob*b(-1) + eb;
g = crhog*(g(-1)) + eg + cgy*ea;
qs = crhoqs*qs(-1) + eqs;
ms = crhoms*ms(-1) + em;
spinf = crhopinf*spinf(-1) + epinfma - cmap*epinfma(-1);
epinfma=epinf;
sw = crhow*sw(-1) + ewma - cmaw*ewma(-1) ;
ewma=ew;
kp = (1-cikbar)*kp(-1)+cikbar*inve + cikbar*cgamma^2*csadjcost*qs ;
// measurment equations
dy=y-y(-1)+ctrend;
dc=c-c(-1)+ctrend;
dinve=inve-inve(-1)+ctrend;
dw=w-w(-1)+ctrend;
pinfobs = 1*(pinf) + constepinf;
robs = 1*(r) + conster;
labobs = lab + constelab;
end;
// flexible economy
0*(1-calfa)*a + 1*a = calfa*rkf+(1-calfa)*(wf);
zcapf = (1/(czcap/(1-czcap)))* rkf;
rkf = (wf)+labf-kf;
kf = kpf(-1)+zcapf;
invef = (1/(1+cbetabar*cgamma))* ( invef(-1) + cbetabar*cgamma*invef(1)+(1/(cgamma^2*csadjcost))*pkf ) +qs;
pkf = -rrf-0*b+(1/((1-chabb/cgamma)/(csigma*(1+chabb/cgamma))))*b +(crk/(crk+(1-ctou)))*rkf(1) + ((1-ctou)/(crk+(1-ctou)))*pkf(1);
cf = (chabb/cgamma)/(1+chabb/cgamma)*cf(-1) + (1/(1+chabb/cgamma))*cf(+1) +((csigma-1)*cwhlc/(csigma*(1+chabb/cgamma)))*(labf-labf(+1)) - (1-chabb/cgamma)/(csigma*(1+chabb/cgamma))*(rrf+0*b) + b;
yf = ccy*cf+ciy*invef+g + crkky*zcapf;
yf = cfc*( calfa*kf+(1-calfa)*labf +a );
wf = csigl*labf +(1/(1-chabb/cgamma))*cf - (chabb/cgamma)/(1-chabb/cgamma)*cf(-1);
kpf = (1-cikbar)*kpf(-1)+(cikbar)*invef + (cikbar)*(cgamma^2*csadjcost)*qs;
// sticky price - wage economy
mc = calfa*rk+(1-calfa)*(w) - 1*a - 0*(1-calfa)*a;
zcap = (1/(czcap/(1-czcap)))* rk;
rk = w+lab-k;
k = kp(-1)+zcap;
inve = (1/(1+cbetabar*cgamma))* ( inve(-1) + cbetabar*cgamma*inve(1)+(1/(cgamma^2*csadjcost))*pk ) +qs;
pk = -r+pinf(1)-0*b +(1/((1-chabb/cgamma)/(csigma*(1+chabb/cgamma))))*b + (crk/(crk+(1-ctou)))*rk(1) + ((1-ctou)/(crk+(1-ctou)))*pk(1);
c = (chabb/cgamma)/(1+chabb/cgamma)*c(-1) + (1/(1+chabb/cgamma))*c(+1) +((csigma-1)*cwhlc/(csigma*(1+chabb/cgamma)))*(lab-lab(+1)) - (1-chabb/cgamma)/(csigma*(1+chabb/cgamma))*(r-pinf(+1) + 0*b) +b;
y = ccy*c+ciy*inve+g + 1*crkky*zcap;
y = cfc*( calfa*k+(1-calfa)*lab +a );
pinf = (1/(1+cbetabar*cgamma*cindp)) * ( cbetabar*cgamma*pinf(1) +cindp*pinf(-1)+((1-cprobp)*(1-cbetabar*cgamma*cprobp)/cprobp)/((cfc-1)*curvp+1)*(mc) ) + spinf;
w = (1/(1+cbetabar*cgamma))*w(-1)+(cbetabar*cgamma/(1+cbetabar*cgamma))*w(1)+(cindw/(1+cbetabar*cgamma))*pinf(-1)-(1+cbetabar*cgamma*cindw)/(1+cbetabar*cgamma)*pinf+(cbetabar*cgamma)/(1+cbetabar*cgamma)*pinf(1)+(1-cprobw)*(1-cbetabar*cgamma*cprobw)/((1+cbetabar*cgamma)*cprobw)*(1/((clandaw-1)*curvw+1))*(csigl*lab + (1/(1-chabb/cgamma))*c - ((chabb/cgamma)/(1-chabb/cgamma))*c(-1) -w)+ 1*sw;
r = crpi*(1-crr)*pinf+cry*(1-crr)*(y-yf)+crdy*(y-yf-y(-1)+yf(-1))+crr*r(-1)+ms;
a = crhoa*a(-1) + ea;
b = crhob*b(-1) + eb;
g = crhog*(g(-1)) + eg + cgy*ea;
qs = crhoqs*qs(-1) + eqs;
ms = crhoms*ms(-1) + em;
spinf = crhopinf*spinf(-1) + epinfma - cmap*epinfma(-1);
epinfma=epinf;
sw = crhow*sw(-1) + ewma - cmaw*ewma(-1);
ewma = ew;
kp = (1-cikbar)*kp(-1)+cikbar*inve + cikbar*cgamma^2*csadjcost*qs;
// measurment equations
dy = y-y(-1)+ctrend;
dc = c-c(-1)+ctrend;
dinve = inve-inve(-1)+ctrend;
dw = w-w(-1)+ctrend;
pinfobs = 1*(pinf) + constepinf;
robs = 1*(r) + conster;
labobs = lab + constelab;
end;
steady_state_model;
dy=ctrend;
......@@ -203,8 +184,6 @@ var ew;
stderr 0.2089;
end;
estimated_params;
// PARAM NAME, INITVAL, LB, UB, PRIOR_SHAPE, PRIOR_P1, PRIOR_P2, PRIOR_P3, PRIOR_P4, JSCALE
// PRIOR_SHAPE: BETA_PDF, GAMMA_PDF, NORMAL_PDF, INV_GAMMA_PDF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment