$TITLE: M8-5B.GMS: Large open economy model * same as M8-5a except uses and export tax here * modeled as an MCP and then as an MPEC to solve for the optimal export tax $ONTEXT This is similar to model M8-1.gms, but the terms of trade now depend on the level of exports: high exports, lower prices here this is modeled with an auxiliary variable TOT where TOT is the relative price of exports to imports TOT is set by the constraint equation T_TOT: TOT = E1**(-0.3) Production Sectors Consumer Markets | X1 X2 E1 M2 W CONSH ---------------------------------------------------------------- P1 | 150 -50 -100 P2 | 50 50 -100 PL | -100 -10 110 PK | -50 -40 90 PW | 200 -200 PFX | 50 -50 ---------------------------------------------------------------- $OFFTEXT PARAMETERS FIXT Fixed values of the tarifF OPTIMALT Optimal tariff in the MPEC; FIXT = 0; 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 (expenditure function), PFX Read exchange rate index, CONSH Income definition for home agent TOT Terms of trade: world price of export good 1 TE1 Export tax on good 1 - initially held fixed; 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_CONSH Income definition for CONSH T_TOT Equation for TOT TARIFF Dummy equation to fix the tariff as if a parameter; * Zero profit conditions PRF_X1.. 150*PL**(2/3) * PK**(1/3) =G= 150*P1; PRF_X2.. 50*PL**(1/4) * PK**(3/4) =G= 50*P2; PRF_E1.. 50*P1 =G= 50*PFX*TOT*(1 - TE1); PRF_E2.. 50*P2 =G= 50*0.99*PFX; PRF_M1.. 50*PFX*TOT*1.01 =G= 50*P1; PRF_M2.. 50*PFX =G= 50*P2; PRF_W.. 200*P1**0.5*P2**0.5 =G= 200*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*0.99*E2 + (50*TOT)*E1 =G= 50*M2 + 50*1.01*M1; MKT_W.. 200*W =G= CONSH / PW; MKT_L.. 110 =G= 100*X1*P1/PL + 10*X2*P2/PL; MKT_K.. 90 =G= 50*X1*P1/PK + 40*X2*P2/PK; * Income balance, auxiliary equation I_CONSH.. CONSH =E= 110*PL + 90*PK + 50*PFX*TOT*TE1*E1; T_TOT.. TOT =G= E1**(-0.3); TARIFF.. TE1 =E= FIXT; MODEL LOE /PRF_X1.X1, PRF_X2.X2, PRF_E1.E1, PRF_E2.E2, PRF_W.W, PRF_M1.M1, PRF_M2.M2, MKT_X1.P1, MKT_X2.P2, MKT_PFX.PFX, MKT_L.PL, MKT_K.PK, MKT_W.PW, I_CONSH.CONSH, T_TOT.TOT, TARIFF.TE1 /; * Check the benchmark: X1.L =1; X2.L =1; E2.L =0; E1.L =1; M2.L =1; M1.L =0; W.L =1; P1.L =1; P2.L =1; PFX.L =1; PK.L =1; PW.FX =1; PL.L =1; CONSH.L =200; TOT.L = 1; TE1.L = 0; LOE.ITERLIM = 0; SOLVE LOE USING MCP; LOE.ITERLIM = 10000; SOLVE LOE USING MCP; * Apply a tariff which improves the terms of trade and home * welfare: FIXT = 0.2; SOLVE LOE USING MCP; * now let's reformulate the problem as an MPEC to solve for the * optimal tariff VARIABLES WELOPT; EQUATIONS WELFOPT; WELFOPT.. WELOPT =E= W; * ADD the objective function and DELETE the dummy equation TARIFF MODEL OPTTARIFF /WELFOPT, PRF_X1.X1, PRF_X2.X2, PRF_E1.E1, PRF_E2.E2, PRF_W.W, PRF_M1.M1, PRF_M2.M2, MKT_X1.P1, MKT_X2.P2, MKT_PFX.PFX, MKT_L.PL, MKT_K.PK, MKT_W.PW, I_CONSH.CONSH, T_TOT.TOT/; OPTION MPEC = nlpec; SOLVE OPTTARIFF USING MPEC MAXIMIZING WELOPT; OPTIMALT = TE1.L; DISPLAY OPTIMALT; $EXIT * go back to the orignal MCP and "brute force" search for the optimal * tariff and see if it matches the MPEC value SETS I /I1*I51/; PARAMETERS EXTAX(I) WELFARE(I); LOOP(I, FIXT = 0.005*ORD(I)**2 - 0.005; SOLVE LOE USING MCP; EXTAX(I) = TE1.L; WELFARE(I) = W.L; ); DISPLAY EXTAX, WELFARE;