$TITLE M8-1.GMS: Small open economy 2x2 * strips out trade costs and tariffs for simplicity of exposition $ONTEXT CALIBRATION: country exports X1, imports X2 in free-trade SOE Production Sectors Consumer Markets | X1 X2 E1 M2 W CONS ---------------------------------------------------------------- P1 | 150 -50 -100 P2 | 50 50 -100 PL | -135 -5 140 PK | -15 -45 60 PW | 200 -200 PFX | 50 -50 ---------------------------------------------------------------- $OFFTEXT * the first four parameters allow changes in (exogenous) world prices PARAMETERS PE2 Export price of good 2 /0.999/ PM1 Import price of good 1 /1.001/ PE1 Export price of good 1 /1/ PM2 Import price of good 2 /1/; NONNEGATIVE VARIABLES X1 Activity level for sector X1 X2 Activity level for sector X2 E1 Activity level for sector E1 E2 Activity level for sector E2 M1 Activity level for sector M1 M2 Activity level for sector M2 W Activity level for sector W P1 Price index for commodity X P2 Price index for commodity Y PL Price index for primary factor L PK Price index for primary factor K PW Price index for welfare (consumer price index) PFX Real exchange rate index CONS Income definition for CONS; EQUATIONS PRF_X1 Zero profit for sector X1 PRF_X2 Zero profit for sector X2 PRF_E1 Zero profit for sector E1 PRF_E2 Zero profit for sector E2 PRF_M1 Zero profit for sector M1 PRF_M2 Zero profit for sector M2 PRF_W Zero profit for sector W MKT_X1 Supply-demand balance for commodity X1 MKT_X2 Supply-demand balance for commodity X2 MKT_PFX Supply-demand balance for commodity PFX MKT_L Supply-demand balance for primary factor L MKT_K Supply-demand balance for primary factor L MKT_W Supply-demand balance for aggregate demand I_CONS Income definition for CONS; * Zero profit conditions PRF_X1.. 150*PL**(0.9) * PK**(0.1) =G= 150*P1; PRF_X2.. 50*PL**(0.1) * PK**(0.9) =G= 50*P2; PRF_E1.. 50*P1 =G= 50*PFX*PE1; PRF_E2.. 50*P2 =G= 50*PFX*PE2; PRF_M1.. 50*PFX*PM1 =G= 50*P1; PRF_M2.. 50*PFX*PM2 =G= 50*P2; PRF_W.. 100*P1**0.5 * P2**0.5 =G= 100*PW; * Market clearance conditions MKT_X1.. 150*X1 + 50*M1 =G= 50*E1 + 100*W*PW/P1; MKT_X2.. 50*X2 + 50*M2 =G= 50*E2 + 100*W*PW/P2 ; MKT_PFX.. 50*E2*PE2 + 50*E1*PE1 =G= 50*PM2*M2 + 50*PM1*M1; MKT_W.. 200*W =G= CONS / PW; MKT_L.. 140 =G= 135*X1 * P1/PL + 5*X2*P2/PL; MKT_K.. 60 =G= 15*X1*P1/PK + 45*X2*P2/PK; * Income balance I_CONS.. CONS =E= 140*PL + 60*PK; MODEL SOE1 /PRF_X1.X1, PRF_X2.X2, PRF_E1.E1, PRF_E2.E2, PRF_M1.M1, PRF_M2.M2, PRF_W.W, MKT_X1.P1, MKT_X2.P2, MKT_PFX.PFX, MKT_L.PL, MKT_K.PK, MKT_W.PW, I_CONS.CONS /; * set SOE values: X1.L =1; X2.L =1; E2.L =0; M1.L =0; E1.L =1; M2.L =1; W.L =1; P1.L =1; P2.L =1; PFX.L =1; PK.L =1; PL.L =1; CONS.L =200; * choose the real consumer price index as numeraire PW.FX =1; * check for calibration and starting-value errors SOE1.ITERLIM = 0; SOLVE SOE1 USING MCP; SOE1.ITERLIM = 2000; SOLVE SOE1 USING MCP; * counterfactual: a terms-of-trade improvement PE1 = 1.2; PM1 = 1.21; SOE1.ITERLIM = 2000; SOLVE SOE1 USING MCP;