Commit 2d8386d3 authored by Thomas Brand's avatar Thomas Brand

Add oil in production function. New steady state.

parent 9f0cefa4
......@@ -27,8 +27,10 @@ GCOYDBAR=0.232;
GIOYDBAR=0.039;
OTHGOVOYDBAR=0.064;
IOYDBAR=0.219;
CMZOYDBAR=0.164;
COOYDBAR=0.016;
CMZOYDBAR=0.159;
CMOOYDBAR=0.021;
COOYDBAR=0.007;
YOOYDBAR=CMOOYDBAR-COOYDBAR;
IMOYDBAR=0.088;
TAUCBAR=0.206;
TAUNBAR=0.084;
......
......@@ -80,6 +80,9 @@ CO
GAMMACO
OMEGACO
GAMMAPRCO
YNO
CMO
YO
M
X
......
......@@ -13,13 +13,15 @@ chix, BETA_PDF, 0.5, 0.2;
chim, BETA_PDF, 0.5, 0.2;
epsc, GAMMA_PDF, 1.5, 0.25;
epsco, GAMMA_PDF, 0.2, 0.05;
epsy, GAMMA_PDF, 0.2, 0.05;
epsi, GAMMA_PDF, 1.5, 0.25;
epsw, GAMMA_PDF, 1.5, 0.25;
kappa, GAMMA_PDF, 4, 0.50;
gammac, GAMMA_PDF, 2.5, 1;
gammaco, GAMMA_PDF, 2.5, 1;
gammai, GAMMA_PDF, 2.5, 1;
gammapi, NORMAL_PDF, 1.7, 0.1;
%gammapi, NORMAL_PDF, 1.7, 0.1;
gammapi, NORMAL_PDF, 5, 1.5;
gammay, BETA_PDF, 0.5, 0.2;
gammab, BETA_PDF, 0.001, 0.0005;
FBAR, BETA_PDF, 0.0075, 0.00375;
......@@ -55,7 +57,8 @@ rhoothgov, BETA_PDF, 0.5, 0.2;
%rhotb, NORMAL_PDF, 0., 2;
%rhoothgovb, NORMAL_PDF, 0., 2;
rhogb, NORMAL_PDF, -0.002, 0.001;
%rhogb, NORMAL_PDF, -0.002, 0.001;
rhogb, NORMAL_PDF, -0.006, 0.0025;
rhogy, NORMAL_PDF, 0, 0.01;
rhotauy, NORMAL_PDF, 0, 0.01;
......
......@@ -13,6 +13,7 @@ chix,0.313556 ;
chim,0.812732 ;
epsc,1.409484 ;
epsco, 0.3420 ;
epsy, 0.3 ;
epsi,1.417517 ;
epsw,2.134332 ;
kappa,5.550699 ;
......
......@@ -91,7 +91,7 @@ end
PIOP=fasol(1);
ni = (1-IMOYDBAR/IOYDBAR*(PMOP/PIOP)^(epsi));
ni=(1-IMOYDBAR/IOYDBAR*(PMOP/PIOP)^(epsi));
Q=PIOP;
......@@ -133,11 +133,12 @@ MC=(EPS-1)/EPS;
phiOyd = (EPS/(EPS-1)-1)*VP;
fun = @(fa) [ ...
(A/Z*((fa(2)^(1/epsk)*KPOYDBAR^((epsk-1)/epsk)+(1-fa(2))^(1/epsk)*KGOYDBAR^((epsk-1)/epsk))^(epsk/(epsk-1)))^alpha*LD^(1-alpha)/(1+phiOyd))^(1/(1-alpha))*((fa(2)^(1/epsk)*KPOYDBAR^((epsk-1)/epsk)+(1-fa(2))^(1/epsk)*KGOYDBAR^((epsk-1)/epsk))^(epsk/(epsk-1)))^((epsk-1)/epsk)/LD*(KPOYDBAR/fa(2))^(1/epsk)-alpha/(1-alpha)*(1+TAUWF)*fa(1)/RENTK*Z*MU ,...
MC-(1/(1-alpha))^(1-alpha)*(1/alpha)^alpha*((1+TAUWF)*fa(1))^(1-alpha)*RENTK^alpha*(KPOYDBAR/(fa(2)*((fa(2)^(1/epsk)*KPOYDBAR^((epsk-1)/epsk)+(1-fa(2))^(1/epsk)*KGOYDBAR^((epsk-1)/epsk))^(epsk/(epsk-1)))))^(alpha/epsk)
1-((fa(2)^(1/epsy)*YOOYDBAR^((epsy-1)/epsy)+(1-fa(2))^(1/epsy)*fa(1)^((epsy-1)/epsy))^(epsy/(epsy-1))-phiOyd),...
(1-fa(2))/fa(2)*fa(1)^(epsy-1)*YOOYDBAR-((1+TAUWF)*fa(3)*LD/(POILOPEX*(1-alpha)))^epsy,...
MC-(((1-fa(2))*((1+TAUWF)*fa(3)*LD/((1-alpha)*fa(1)))^(1-epsy)+fa(2)*POILOPEX^(1-epsy))^(1/(1-epsy)))
];
[fasol, fval, exitflag] = fsolve(fun,[1.3,0.7], options);
[fasol, fval, exitflag] = fsolve(fun,[0.98,0.1,0.6], options);
if exitflag<1
disp('Third Newton failed!')
......@@ -145,17 +146,38 @@ if exitflag<1
return
end
W=fasol(1);
nk=fasol(2);
YNOOYDBAR=fasol(1);
ny=fasol(2);
WOYDBAR=fasol(3);
KOYDBAR= (nk^(1/epsk)*KPOYDBAR^((epsk-1)/epsk)+(1-nk)^(1/epsk)*KGOYDBAR^((epsk-1)/epsk))^(epsk/(epsk-1));
MC=(1/(1-alpha))^(1-alpha)*(1/alpha)^alpha*((1+TAUWF)*W)^(1-alpha)*RENTK^alpha*(KPOYDBAR/(nk*KOYDBAR))^(alpha/epsk);
YD = (A/Z*KOYDBAR^alpha*LD^(1-alpha)/(1+phiOyd))^(1/(1-alpha));
fun = @(fa) [ ...
fa(2)^((epsk-1)/epsk)/LD*(U*KPOYDBAR/fa(1))^(1/epsk)-alpha/(1-alpha)*(1+TAUWF)*WOYDBAR/RENTK*Z*MU,...
fa(2)-(fa(1)^(1/epsk)*KPOYDBAR^((epsk-1)/epsk)+(1-fa(1))^(1/epsk)*KGOYDBAR^((epsk-1)/epsk))^(epsk/(epsk-1))
];
[fasol, fval, exitflag] = fsolve(fun,[0.9,6], options);
if exitflag<1
disp('Fourth Newton failed!')
info = 1;
return
end
nk=fasol(1);
KOYDBAR=fasol(2);
KOYDBAR=(nk^(1/epsk)*KPOYDBAR^((epsk-1)/epsk)+(1-nk)^(1/epsk)*KGOYDBAR^((epsk-1)/epsk))^(epsk/(epsk-1));
YD=(A/Z*KOYDBAR^alpha*LD^(1-alpha)/YNOOYDBAR)^(1/(1-alpha));
YDRZE=YD;
YDZE=YD;
CMO= CMOOYDBAR*YD;
CO = COOYDBAR*YD;
YO = YOOYDBAR*YD;
YNO = YNOOYDBAR*YD;
W = WOYDBAR*YD;
KG = KGOYDBAR*YD;
KP = KPOYDBAR*YD;
K = KOYDBAR*YD;
......@@ -188,7 +210,6 @@ nco=PCZOP^epsco/(CO/CZ+PCZOP^epsco);
PCOP=(nco*PCZOP^(1-epsco)+(1-nco)*(POILOPEX/OMEGACO)^(1-epsco))^(1/(1-epsco));
C=(nco^(1/epsco)*CZ^((epsco-1)/epsco)+(1-nco)^(1/epsco)*(CO*(1-GAMMACO))^((epsco-1)/epsco))^(epsco/(epsco-1));
CNR = ((1-TAUN-TAUWH)*W*LD+TNR)/((1+TAUC)*PCOP);
CR = (omega*CNR-C)/(omega-1);
CINDEX= (ng^(1/epsg)*CR^((epsg-1)/epsg)+(1-ng)^(1/epsg)*GC^((epsg-1)/epsg))^(epsg/(epsg-1));
......@@ -233,7 +254,7 @@ YDOYBAR=Y/YD;
CROYBAR=(1-omega)*PCOP*CR/YD;
CNROYBAR=omega*PCOP*CNR/YD;
IOYBAR=PIOP*I/YD;
MOYBAR=PMOP*M/YD;
MOYBAR=(PMOP*VM*YMZ+POILOPEX*CO)/YD;
XOYBAR=PXOPEX*X/YD;
EXBWOYBAR=EXBW/YD;
BOYBAR=B*YD/YD;
......
......@@ -65,7 +65,9 @@ N=GAMMAN/(PI*Z)*(RK-REFF(-1)-mu*G*(RK))*KP(-1)*Q(-1)+we+GAMMAN*(REFF(-1))*N(-1)/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Production technology
Y=XIA*A/Z*(U*K(-1))^alpha*LD^(1-alpha)-phi;
YNO=XIA*A/Z*(U*K(-1))^alpha*LD^(1-alpha);
Y=(ny^(1/epsy)*YO^((epsy-1)/epsy)+(1-ny)^(1/epsy)*YNO^((epsy-1)/epsy))^(epsy/(epsy-1))-phi;
(1-ny)/ny*YNO^(epsy-1)*YO=((1+TAUWF)*W*LD/(POILOPEX*(1-alpha)))^epsy;
% Law of motion of public capital
KG-(1-delta)*KG(-1)/(Z*MU)-(1-kappa/2*(GI/GI(-1)*Z-ZBAR)^2)*GI=0;
% CES technology of physical capital
......@@ -75,7 +77,7 @@ Z=A^(1/(1-alpha))*MU^(alpha/(1-alpha));
% FOC for production factors
K(-1)^((epsk-1)/epsk)/LD*(U*KP(-1)/nk)^(1/epsk)=alpha/(1-alpha)*(1+TAUWF)*W/RENTK*Z*MU;
% Marginal costs
MC=(1/(1-alpha))^(1-alpha)*(1/alpha)^alpha*((1+TAUWF)*W)^(1-alpha)*RENTK^alpha*(U*KP(-1)/(nk*K(-1)))^(alpha/epsk);
MC=((1-ny)*((1+TAUWF)*W*LD/((1-alpha)*YNO))^(1-epsy)+ny*POILOPEX^(1-epsy))^(1/(1-epsy));
% Optimal sticky prices for intermediate goods
G1=(EPS-1)*LAMBDA*PISTAR^(-EPS)*YD+beta*thetap*(PI^chip*PIBAR^(1-chip)/PI(+1))^(1-EPS(+1))*(PISTAR/PISTAR(+1))^(-EPS(+1))*PI(+1)*G1(+1);
G2=EPS*LAMBDA*PISTAR^(-(1+EPS))*MC*YD+beta*thetap*(PI^chip*PIBAR^(1-chip)/PI(+1))^(-(1+EPS(+1)))*(PISTAR/PISTAR(+1))^(-(1+EPS(+1)))*PI(+1)*G2(+1);
......@@ -104,25 +106,26 @@ EPSX*GX1=(EPSX-1)*GX2;
% FINAL GOOD PRODUCERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Final consumption goods OK
% Final consumption goods
C=(nco^(1/epsco)*CZ^((epsco-1)/epsco)+(1-nco)^(1/epsco)*(CO*(1-GAMMACO))^((epsco-1)/epsco))^(epsco/(epsco-1));
% Consumption goods adjustment costs OK
% Consumption goods adjustment costs
GAMMACO=gammaco/2*(XIM^(-1/gammaco)*(CO/C)/(CO(-1)/C(-1))-1)^2;
% Imported consumption as a share of domestic consumption (FOC) OK
% Imported consumption as a share of domestic consumption (FOC)
CO/CZ=(1-nco)/nco*(POILOPEX/(PCZOP*OMEGACO))^(-epsco)*1/(1-GAMMACO);
% Relative price of consumption goods OK
% Relative price of consumption goods
PCOP=(nco*PCZOP^(1-epsco)+(1-nco)*(POILOPEX/OMEGACO)^(1-epsco))^(1/(1-epsco));
% Adjustment costs for the share of domestic consumption
OMEGACO=1-GAMMACO-GAMMAPRCO*CO;
GAMMAPRCO=gammaco*(XIM^(-1/gammaco)*(CO/C)/(CO(-1)/C(-1))-1)*(XIM^(-1/gammaco)*1/C/(CO(-1)/C(-1)));
CMO=CO+YO;
% Consumption non-oil goods OK
% Consumption non-oil goods
CZ=(nc^(1/epsc)*CD^((epsc-1)/epsc)+(1-nc)^(1/epsc)*(CMZ*(1-GAMMAC))^((epsc-1)/epsc))^(epsc/(epsc-1));
% Consumption non-oil goods adjustment costs OK
% Consumption non-oil goods adjustment costs
GAMMAC=gammac/2*(XIM^(-1/gammac)*(CMZ/CZ)/(CMZ(-1)/CZ(-1))-1)^2;
% Imported non-oil consumption as a share of domestic consumption (FOC) OK
% Imported non-oil consumption as a share of domestic consumption (FOC)
CMZ/CD=(1-nc)/nc*(PMOP/OMEGAC)^(-epsc)*1/(1-GAMMAC);
% Relative price of non-oil consumption goods OK
% Relative price of non-oil consumption goods
PCZOP=(nc+(1-nc)*(PMOP/OMEGAC)^(1-epsc))^(1/(1-epsc));
% Adjustment costs for the share of non-oil consumption
OMEGAC=1-GAMMAC-GAMMAPRC*CMZ;
......
......@@ -19,6 +19,8 @@ IOYDBAR
COOYDBAR
CMZOYDBAR
IMOYDBAR
CMOOYDBAR
YOOYDBAR
TAUCBAR
TAUNBAR
TAUWHBAR
......@@ -47,6 +49,7 @@ nc
nco
ni
nk
ny
%%estimated
omega $\omega$ (long_name='Share of non-ricardian households', measure='economic param')
......@@ -65,6 +68,7 @@ chim $\chi_m$ (long_name='Import price indexing', measure='economic param')
epsc $\epsilon_c$ (long_name='Elasticity of substitution between domestic and foreign consumption', measure='economic param')
epsi $\epsilon_i$ (long_name='Elasticity of substitution between domestic and foreign investment', measure='economic param')
epsco $\epsilon_{co}$ (long_name='Elasticity of substitution between consumption of oil and non-oil goods', measure='economic param')
epsy $\epsilon_y$ (long_name='Elasticity of substitution between production of oil and non-oil goods', measure='economic param')
epsw $\epsilon_w$ (long_name='Price elasticity of exports', measure='economic param')
kappa $\kappa$ (long_name='Adjustment cost in investment', measure='economic param')
gammac $\gamma c$ (long_name='Adjustment cost in imported non-oil consumption', measure='economic param')
......
......@@ -13,6 +13,7 @@ chix = 0.313556;
chim = 0.812732;
epsc = 1.409484;
epsco = 0.3420;
epsy = 0.3;
epsi = 1.417517;
epsw = 2.134332;
kappa = 5.550699;
......
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