$TITLE Model M1_VEC: Closed 2x2 Economy -- An Introduction to the Basics *This is the exact same model as M1_MPS.GMS but uses vector syntax. TABLE BENCH(*,*) Benchmark financial flows (e.g. an input-output table) X Y W CONS X 100 -100 Y 100 -100 W 200 -200 L -40 -60 100 K -60 -40 100; SET I Produced goods /X, Y/, F Factors of production /L, K/; ALIAS (I,J), (F,FF); PARAMETER Z0(I) Benchmark sectoral output, FD0(F,I) Benchmark factor demands, C0(I) Benchmark consumption demand, E(F) Factor endowments, T(I) Sectoral ad-valorem tax rate, W0 Benchmark total consumption; * Extract data from the original format into model-specific arrays: Z0(I) = BENCH(I,I); FD0(F,I) = -BENCH(F,I); C0(I) = -BENCH(I,"W"); W0 = SUM(I, C0(I)); E(F) = BENCH(F,"CONS"); T(I) = 0; DISPLAY Z0, FD0, C0, E, T; $ONTEXT $MODEL:M1_VEC $SECTORS: Z(I) ! Commodity production index W ! Welfare index $COMMODITIES: PW ! Utility price index PC(I) ! Commodity price index PF(F) ! Factor price index $CONSUMERS: CONS ! Representative consumer $PROD:Z(I) s:1 O:PC(I) Q:Z0(I) I:PF(F) Q:FD0(F,I) A:CONS T:T(I) $PROD:W s:1 O:PW Q:W0 I:PC(I) Q:C0(I) $DEMAND:CONS D:PW Q:W0 E:PF(F) Q:E(F) $OFFTEXT $SYSINCLUDE mpsgeset M1_VEC PW.FX = 1; $INCLUDE M1_VEC.GEN SOLVE M1_VEC USING MCP; * Solve the counterfactuals: T("X") = 0.5; $INCLUDE M1_VEC.GEN SOLVE M1_VEC USING MCP; E("L") = 2 * E("L"); T(I) = 0; $INCLUDE M1_VEC.GEN SOLVE M1_VEC USING MCP; * Present the MCP version for the sake of completeness: PARAMETER ALPHA(F,I) Factor input benchmark value share BETA(I) Consumption value share; ALPHA(F,I) = FD0(F,I) / SUM(FF, FD0(FF,I)); BETA(I) = C0(I) / W0; EQUATIONS PROFIT(I) Zero profit condition CMKT(I) Commodity market clearance FMKT(F) Factor market clearance PRF_W Zero profit for aggregate consumption MKT_W Market clearance for aggregate consumption I_CONS Income = factor earnings plus taxes; PROFIT(I).. (1+T(I)) * PROD(F, PF(F)**ALPHA(F,I)) =E= PC(I); PRF_W.. PROD(I, PC(I)**BETA(I)) =E= PW; CMKT(I).. Z0(I) * Z(I) =E= C0(I) * W * PROD(J, PC(J)**BETA(J)) / PC(I); MKT_W.. W0 * W =E= CONS / PW; FMKT(F).. E(F) =E= SUM(I, FD0(F,I) * Z(I) * PROD(FF, PF(FF)**ALPHA(FF,I))) / PF(F); I_CONS.. CONS =E= SUM(F, PF(F) * E(F)) + SUM(I, T(I) * Z0(I) * Z(I) * PROD(F, PF(F)**ALPHA(F,I)) ); MODEL ALGEBRAIC /PROFIT.Z, PRF_W.W, CMKT.PC, FMKT.PF, MKT_W.PW, I_CONS.CONS/; E("L") = 100; T(I) = 0; SOLVE ALGEBRAIC USING MCP; E("L") = 100; T("X") = 0.5; SOLVE ALGEBRAIC USING MCP; E("L") = 2*E("L"); T(I) = 0; SOLVE ALGEBRAIC USING MCP;