MPSGE:Closed Economy Models. Solution to Model M1_2S

Closed Economy Models: Solution to Model M1_2S

Josefina Martinez
Department of Economics
University of Colorado

$TITLE  Model M1_2S: Closed 2X2 Economy with Intermediate Inputs and Nesting

$ontext
		 Production Sectors          Consumers
   Markets  |    X       Y        W    |       CONS
   ------------------------------------------------------
       PX   |  120     -20     -100    |
       PY   |  -20     120     -100    |
       PW   |                   200    |       -200
       PL   |  -40     -60             |        100
       PK   |  -60     -40             |        100
    ------------------------------------------------------
$offtext

SCALAR  TX      Ad-valorem tax rate for X sector inputs /0/;

$ONTEXT

$MODEL: M1_2S

$SECTORS:
	X       ! Activity level for sector X
	Y       ! Activity level for sector Y
	W       ! Activity level for sector W (Hicksian welfare index)

$COMMODITIES:
	PX      ! Price index for commodity X
	PY      ! 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)

$CONSUMERS:
	CONS    ! Income level for consumer CONS

*       The following production function is a two-level CES.
*       In the VA, L and K form a Cobb-Douglas aggregate.
*       In the top level, Y and VA(L,K) have an elasticity of 
*       substitution equal to 0.5

$PROD:X s:0.5  va:1
	O:PX  Q:120
	I:PY  Q: 20
	I:PL   Q:40  va: A:CONS  T:TX
	I:PK   Q:60  va: A:CONS  T:TX

$PROD:Y s:0.75  va:1
	O:PY   Q:120
	I:PX   Q: 20
	I:PL   Q: 60  va:
	I:PK   Q: 40  va:

$PROD:W s:1
	O:PW   Q:200
	I:PX   Q:100
	I:PY   Q:100

$DEMAND:CONS
	D:PW   Q:200
	E:PL   Q:100
	E:PK   Q:100

$OFFTEXT
$SYSINCLUDE mpsgeset M1_2S

*       Benchmark replication:

	M1_2S.ITERLIM = 0;

$INCLUDE M1_2S.GEN
	SOLVE M1_2S USING MCP;

*       Fix the wage rate as numeraire: 

	PL.FX = 1;

*       Counterfactual:  100% tax on X sector inputs:
	M1_2S.ITERLIM = 2000;
	TX = 1.0;

$INCLUDE M1_2S.GEN
	SOLVE M1_2S USING MCP;

*       Declare a GAMS parameter to hold the solution values:

PARAMETER       WELF          Summary report;

*       Extract solution values into this parameter:
WELF("MOD1")= W.L;


*-------------------------------------------------------------------
*       Algebraic representation

EQUATIONS

* "0" profit 
	PRF_X   Zero profit for sector X
	PRF_Y   Zero profit for sector Y
	PRF_W   Zero profit for sector W (Hicksian welfare index)

* Market clearance
	MKT_X   Supply-demand balance for commodity X
	MKT_Y   Supply-demand balance for commodity Y
	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

* Income Balance
	I_CONS  Income definition for CONS;

PRF_X.. 120 * ( 1/6 * PY**(1-0.5) +
		5/6 * (PL**0.4 * PK**0.6 * (1+TX))**(1-0.5) )**(1/(1-0.5))
			=E= 120 * PX;

PRF_Y.. 120 * ( 1/6 * PX**(1-0.75) +
		5/6 * (PL**0.6 * PK**0.4)**(1-0.75) )**(1/(1-0.75))  
			=E= 120 * PY;

PRF_W.. 200 * PX**0.5 * PY**0.5 =E= 200 * PW;

MKT_X.. 120 * X =E= 100 * W * PX**0.5 * PY**0.5 / PX + 20*Y*(PY/PX)**0.75;

MKT_Y.. 120 * Y =E= 100 * W * PX**0.5 * PY**0.5 / PY + 20*X*(PX/PY)**0.5;

MKT_W.. 200 * W =E= CONS / PW;

MKT_L.. 100  =E= 40 * X * (PX/((1+TX)*PL**0.4*PK**0.6))**0.5 
				* PL**0.4 * PK**0.6 / PL +
		 60 * Y * (PY/(PL**0.6 * PK**0.4))**0.75
				* PL**0.6 * PK**0.4 / PL;

MKT_K.. 100 =E=  60 * X * (PX/((1+TX)*PL**0.4*PK**0.6))**0.5 
			* PL**0.4 * PK**0.6 / PK +
		 40 * Y * (PY/(PL**0.6 * PK**0.4))**0.75
			* PL**0.6 * PK**0.4 / PK;

I_CONS.. CONS =E= 100*PL + 100*PK + 
		  TX * 100 * X * PL**0.4*PK**0.6 * 
			(PX/((1+TX)*PL**0.4*PK**0.6))**0.5;

MODEL ALGEBRAIC /PRF_X.X, PRF_Y.Y, PRF_W.W, MKT_X.PX, MKT_Y.PY, MKT_L.PL, 
		 MKT_K.PK, MKT_W.PW, I_CONS.CONS /;

*       Check the benchmark:
	
	X.L=1; Y.L=1; W.L=1; PX.L=1; PY.L=1; PK.L=1; PW.L=1; CONS.L=200;
	TX = 0; 
	ALGEBRAIC.ITERLIM = 0;
	
	SOLVE ALGEBRAIC USING MCP;

	ALGEBRAIC.ITERLIM = 2000;
*       Solve the same counterfactual:
	
	TX = 1; 
	
	SOLVE ALGEBRAIC USING MCP;


*--------------------------------------------------------------------
*       EXERCISE (1).  Revise the X sector production to nest Y with 
*       K at the bottom (Cobb-Douglas) level, and then let these 
*       inputs trade off with L at the top (CES) nest.  

$ONTEXT

$MODEL:MOD_NEST

$SECTORS:
	X       ! Activity level for sector X
	Y       ! Activity level for sector X
	W       ! Activity level for sector W (Hicksian welfare index)

$COMMODITIES:
	PX      ! Price index for commodity X
	PY      ! 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)

$CONSUMERS:
	CONS    ! Income level for consumer CONS


* Modified nested CES

$PROD:X s:0.5   LY:1
	O:PX    Q:120
	I:PY    Q:20    LY:
	I:PL    Q:40    A:CONS  T:TX
	I:PK    Q:60    LY:     A:CONS  T:TX

$PROD:Y s:0.75  va:1
	O:PY    Q:120
	I:PX    Q:20
	I:PL    Q:60    va:
	I:PK    Q:40    va:

$PROD:W s:1
	O:PW    Q:200
	I:PX    Q:100
	I:PY    Q:100

$DEMAND:CONS
	D:PW    Q:200
	E:PL    Q:100
	E:PK    Q:100

$OFFTEXT

$SYSINCLUDE mpsgeset MOD_NEST

*       Benchmark replication

	TX = 0;	
	MOD_NEST.ITERLIM = 0;

$INCLUDE MOD_NEST.GEN
	SOLVE MOD_NEST USING MCP;

	MOD_NEST.ITERLIM = 2000;
*       Solve same counterfactual: 100% tax on X sector inputs:
	
	TX  = 1.0;

$INCLUDE MOD_NEST.GEN
	SOLVE MOD_NEST USING MCP;

*       Extract solution values into this parameter:

WELF("MOD2")= W.L;

PARAMETER	REPORT;

REPORT("EX_BURDEN", "MOD1") = 100 * (WELF("MOD1") - 1);
REPORT("EX_BURDEN", "MOD2") = 100 * (WELF("MOD2") - 1);

DISPLAY "Compare Excess Burden of Taxation", REPORT;


*--------------------------------------------------------------------
*       EXERCISE (2).  Rewrite the algebraic model in accordance  
*       with the new nesting structure:

EQUATIONS

* "0" profit 
	PPPRF_X Zero profit for sector X
	PPRF_Y  Zero profit for sector Y
	PPRF_W  Zero profit for sector W

* Market clearance
	MMKT_X  Supply-demand balance for commodity X
	MMKT_Y  Supply-demand balance for commodity Y
	MMKT_L  Supply-demand balance for primary factor L
	MMKT_K  Supply-demand balance for primary factor K
	MMKT_W  Supply-demand balance for aggregate demand

* Income Balance
	II_CONS Income definition for CONS;

PPPRF_X.. 120 * ( 1/3 * (PL*(1+TX))**(1-0.5) +
		  2/3 * (PY**0.25 * (PK * (1+TX))**0.75)**(1-0.5))**(1/(1-0.5))
		  =E= 120 * PX;

PPRF_Y..  120 * ( 1/6 * PX**(1-0.75) +
		  5/6 * (PL**0.6 * PK**0.4)**(1-0.75))**(1/(1-0.75))
		  =E= 120 * PY;

PPRF_W..  200 * PX**0.5 * PY**0.5 =E= 200 * PW;

MMKT_X..  120 * X =E= 100 * W * (PX**0.5 * PY**0.5) / PX + 
		20*Y*(PY/PX)**0.75;

MMKT_Y..  120 * Y =E= 100 * W * (PX**0.5 * PY**0.5) / PY + 
		20*X*PX**0.5 * (PY**0.25 * (PK * (1+TX))**0.75)**(1-0.5) / PY;

MMKT_W.. 200 * W =E= CONS / PW;

MMKT_L.. 100 =E= 40 * X * PX**0.5 * (PL*(1+TX))**(1-0.5) /(PL*(1+TX))  +
		 60 * Y * (PY/(PL**0.6 * PK**0.4))**0.75 * 
			  (PL**0.6 * PK**0.4) / PL;

MMKT_K.. 100 =E= 60 * X * PX**0.5*(PY**0.25*(PK*(1+TX))**0.75)**(1-0.5) 
				/ (PK *(1+TX))  +
		 40 * Y * (PY/(PL**0.6 * PK**0.4))**0.75
			       * PL**0.6 * PK**0.4 / PK;

II_CONS.. CONS =E= 100 * PL + 100 * PK +
		  TX * X * PX**0.5 * (40 * (PL*(1+TX))**(1-0.5)/ (1+TX)
		  +  60 * (PY**0.25 * (PK*(1+TX))**0.75)**(1-0.5) / (1+TX)); 

MODEL ALGEBA /PPPRF_X.X, PPRF_Y.Y, PPRF_W.W, MMKT_X.PX, MMKT_Y.PY, MMKT_L.PL,
		MMKT_K.PK, MMKT_W.PW, II_CONS.CONS /;

*       Check the benchmark:
	
	X.L=1; Y.L=1; W.L=1; PX.L=1; PY.L=1; PK.L=1; PW.L=1; CONS.L=200;
	
	TX = 0; 
	
	ALGEBA.ITERLIM = 0;
	SOLVE ALGEBA USING MCP;

	ALGEBA.ITERLIM =2000;
*       solve the same counterfactual:
	
	TX = 1;
	
	SOLVE ALGEBA USING MCP;


The solution listing appears as follows:

	       S O L V E      S U M M A R Y

     MODEL   M1_2S               

 Default price normalization using income for CONS

		       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.000     +INF       .         
---- VAR Y               .        1.000     +INF       .         
---- VAR W               .        1.000     +INF       .         
---- VAR PX              .        1.000     +INF       .         
---- VAR PY              .        1.000     +INF       .         
---- VAR PL              .        1.000     +INF       .         
---- VAR PK              .        1.000     +INF       .         
---- VAR PW              .        1.000     +INF       .         
---- VAR CONS            .      200.000     +INF       .         

  X           Activity level for sector X
  Y           Activity level for sector Y
  W           Activity level for sector W (Hicksian welfare index)
  PX          Price index for commodity X
  PY          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)
  CONS        Income level for consumer CONS

Counterfactual model: 100% tax on X sector inputs

	       S O L V E      S U M M A R Y

     MODEL   M1_2S               

		       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        0.760     +INF       .         
---- VAR Y               .        1.173     +INF       .         
---- VAR W               .        0.954     +INF       .         
---- VAR PX              .        1.719     +INF       .         
---- VAR PY              .        1.061     +INF       .         
---- VAR PL             1.000     1.000     1.000      EPS       
---- VAR PK              .        0.894     +INF       .         
---- VAR PW              .        1.350     +INF       .         
---- VAR CONS            .      257.541     +INF       .         

Algebraic model

	       S O L V E      S U M M A R Y

     MODEL   ALGEBRAIC           

		       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.000     +INF       .         
---- VAR Y               .        1.000     +INF       .         
---- VAR W               .        1.000     +INF       .         
---- VAR PX              .        1.000     +INF       .         
---- VAR PY              .        1.000     +INF       .         
---- VAR PL             1.000     1.000     1.000      EPS       
---- VAR PK              .        1.000     +INF       .         
---- VAR PW              .        1.000     +INF       .         
---- VAR CONS            .      200.000     +INF       .         

Algebraic model- Counterfactual: 100% tax on X sector inputs

	       S O L V E      S U M M A R Y

     MODEL   ALGEBRAIC           

		       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        0.760     +INF       .         
---- VAR Y               .        1.173     +INF       .         
---- VAR W               .        0.954     +INF       .         
---- VAR PX              .        1.719     +INF       .         
---- VAR PY              .        1.061     +INF       .         
---- VAR PL             1.000     1.000     1.000 1.094E-12      
---- VAR PK              .        0.894     +INF       .         
---- VAR PW              .        1.350     +INF       .         
---- VAR CONS            .      257.541     +INF       .         

EXERCISE (1). Revise the X sector production

	       S O L V E      S U M M A R Y

     MODEL   MOD_NEST            

		       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.000     +INF       .         
---- VAR Y               .        1.000     +INF       .         
---- VAR W               .        1.000     +INF       .         
---- VAR PX              .        1.000     +INF       .         
---- VAR PY              .        1.000     +INF       .         
---- VAR PL             1.000     1.000     1.000      EPS       
---- VAR PK              .        1.000     +INF       .         
---- VAR PW              .        1.000     +INF       .         
---- VAR CONS            .      200.000     +INF       .         

Counterfactual model: 100% tax on X sector inputs

	       S O L V E      S U M M A R Y

     MODEL   MOD_NEST            

		       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        0.766     +INF       .         
---- VAR Y               .        1.195     +INF       .         
---- VAR W               .        0.950     +INF       .         
---- VAR PX              .        1.651     +INF       .         
---- VAR PY              .        1.032     +INF       .         
---- VAR PL             1.000     1.000     1.000      EPS       
---- VAR PK              .        0.841     +INF       .         
---- VAR PW              .        1.306     +INF       .         
---- VAR CONS            .      248.001     +INF       .         


E x e c u t i o n

----    991 Compare Excess Burden of Taxation

----    991 PARAMETER REPORT         

                 MOD1        MOD2

EX_BURDEN      -4.647      -5.024

EXERCISE (2). Algebraic representation of MOD_NEST model. Benchmark replication

	       S O L V E      S U M M A R Y

     MODEL   ALGEBA              

		       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.000     +INF       .         
---- VAR Y               .        1.000     +INF       .         
---- VAR W               .        1.000     +INF       .         
---- VAR PX              .        1.000     +INF       .         
---- VAR PY              .        1.000     +INF       .         
---- VAR PL             1.000     1.000     1.000      EPS       
---- VAR PK              .        1.000     +INF       .         
---- VAR PW              .        1.000     +INF       .         
---- VAR CONS            .      200.000     +INF       .         

Algebraic representation of MOD_NEST. Counterfactual: 100% tax on X sector inputs

	       S O L V E      S U M M A R Y

     MODEL   ALGEBA              

		       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        0.766     +INF       .         
---- VAR Y               .        1.195     +INF       .         
---- VAR W               .        0.950     +INF       .         
---- VAR PX              .        1.651     +INF       .         
---- VAR PY              .        1.032     +INF       .         
---- VAR PL             1.000     1.000     1.000 1.3579E-8      
---- VAR PK              .        0.841     +INF       .         
---- VAR PW              .        1.306     +INF       .         
---- VAR CONS            .      248.001     +INF       .