History, Theory and Applications
V. The Mathematical Programming System for General Equilibrium (MPSGE)
rules make it too complicated to employ for large- scale models23. Therefore, in 1987 Rutherford created a new tool which he thought may be useful in the GAMS framework but which was specifically for GE problems. As the author himself declared: “MPSGE is a language for concise representation of Arrow- Debreu economic equilibrium models. […]
MPSGE provides a short-hand representation for the complicated system of non-linear inequalities which underlie general equilibrium models. The MPSGE framework is based on nested constant elasticity of substitution utility functions and production functions, the data requirements for a model include hare and elasticity parameters, endowments, and tax rates for all the consumers and production sectors included in the model”. Rutherford (2005) asserts that these two programs have different philosophies: “MPSGE was (and is) appropriate for a specific class of nonlinear equations, while GAMS is capable of representing any system of algebraic equations”.
The great innovation of this system is double. It is an interface of GAMS. Indeed contemporaneously modellers may exploit the easier data handling and report writing facilities of GAMS and the lower data requirement of MPSGE24. It is also a system that
“thinks” like an economist. It is not only able to solve mathematical systems but it organizes data according to an MCP. This is the innovation: having demonstrated that the Arrow-Debreu model may have at least two different formal representations, Rutherford has built a program which reconstructs the complementarity conditions as we have presented them in the previous paragraph. To empirically demonstrate these statements, we present in boxes 6 and 7 both the GAMS and the MPSGE versions of a simple program. We should demonstrate firstly that the GAMS version is time- consuming while in MPSGE is less so in writing down the program. Secondly, GAMS requires the extensive written record of all the equalities and inequalities. MPSGE automatically recognizes CES function (and nested CES functions). It is sufficient to point out the function and the elasticity of substitution (which is a piece of information, we can say, on the slope of the curve) thus MPSGE recognizes exactly which of the infinite CES functions is the correct one. It is evident that both programs run the MCP solver because the solution statement is common, as is the variable declaration in both cases.
Referring to the examples, at first glance the reader may rebut our thesis and say that GAMS code is shorter and therefore it requires less time to be written. If we count the lines of the codes (54 against 75) this rebut is correct, but if we analyse the contents of the model, the
23 To have information on the features of GAMS, see Rosenthal’s (2008) user’s guide.
24 Using the words of its inventor: “the interface between GAMS and MPSGE combines the strengths of both programs. The system uses GAMS as the “front end” and the “back end” to MPSGE, facilitating data handling and report writing. The language employs an extended MPSGE syntax based on GAMS sets, so that model specification is concise” (Rutherford, 2005).
great advantages of the MPSGE code are clear. The fundamental element is the definition of equilibrium conditions. In GAMS the modeller has to write down the whole functional form of each condition. In our example, which has only an illustrative aim, the chosen functions are simple: Cobb-Douglas production functions. Many times, there are more complex functions, even multistage functions. In these cases, writing down the functional form is time consuming and prone to error. In MPSGE, functions are not required to be written extensively because it is sufficient to give limited information and the program is already able to solve the problem.
What we need is only the benchmark data.
This advantage makes MPSGE useful both for experts and novice modellers: “the expert knowledge embodied in MPSGE is of particular use to economists who are interested in the insight provided by formal models but who are unable to devote many hours to programming.
MPSGE provides a structured framework for novice modellers. When used by experts, MPSGE reduces the setup cost of producing an operational model and the cost of producing an operational model and the cost of testing alternative specifications” (Rutherford, 2005).
Box 7: The GAMS code for the solution of an illustrative CGE
$TITLE: SIMPLE CGE IN GAMS Parameters
sw Worker propensity to save sr Rentier propensity to save
alphaz Worker savings share on total savings INV Exogenous real investment level
;
sw=0.125;
sr=0.25;
alphaz=0.25;
INV = 100*(sw*(40/100)+sr*(60/100)) ; Positive Variables
V Acivity level for productive sector Q Price index for commodity (value added) r Profit rate
w Wage rate
WORK Consumer Expenditures RENT Rentier Expenditures Equations
ZPC_V Zero profit condition productive sector MC_V Market clearing commodity
MC_L Market clearing factor L MC_K Market clearing commodity K IWORK Worker expenditures
IRENT Rentier expenditures;
Box 8: The MPSGE code for the solution of an illustrative CGE
$TITLE: SIMPLE CGE IN MPSGE Parameters
sw Worker propensity to save sr Rentier propensity to save alphaz Worker's share of private savings INVZ Benchmark real investment level WORKZ Benchmark real worker consumption RENTZ Benchmark real renter consumption GDP Benchmark real GDP
L Employment level in the benchmark K Employment level in the benchmark
;
sw = 0.125 ; sr = 0.25 ; alphaz = 0.25;
INVZ = 20 ; WORKZ = 35 ; RENTZ = 45;
GDP = WORKZ + RENTZ + INVZ ; L = 40 ;
K = 60;
$ontext
$model:CGE1
$SECTORS:
V ! Activity level for productive sector (Box 7 continues)
ZPC_V.. 100 * w**0.4 * r**0.6 =G= 100 * Q ; MC_V.. 100 * V =G= ((WORK+RENT)/Q) + INV ; MC_L.. 40 =G= 100 * V * 0.4 * w**0.4 * r**0.6/w ; MC_K.. 60 =G= 100 * V * 0.6 * w**0.4 * r**0.6/r ; IWORK.. WORK =E= 40*w - alphaz*(INV*Q);
IRENT.. RENT =E= 60*r - (1 - alphaz)*(INV*Q);
Model CGE1 /ZPC_V.V, MC_V.Q, MC_L.w, MC_K.r, IWORK.WORK, IRENT.RENT / ; w.fx = 1 ;
V.L=1;
Q.L=1;
r.L=1;
WORK.L=35;
RENT.L=45;
Solve CGE1 using MCP ;
Therefore, defining general equilibrium as an MCP is not only a theoretical innovation but it is translated into a new instrument for empirical analysis25.
Here, we present the main features of this system since we will employ it in our further simulations. We will start with the benchmark, how to build it and its importance, and then move on to the syntax.
Like any tool used for policy evaluation, we need an initial benchmark to calibrate our model; to check the benchmark replication in order to affirm that the system is well written and ready to be employed for analysis. Any AGE requires a benchmark that is commonly represented by a SAM (Social Accounting Matrix), which in a compact format (a square
25 Although the theoretical foundation of MPSGE is the MCP representation of general equilibrium, the evolution of MPSGE requires another innovation: the SLCP (Sequence of Linear Complementarity
(Box 8 continues)
$COMMODITIES:
Q ! Price index for commodity r ! Profit rate
w ! Wage rate
$CONSUMERS:
WORK ! Worker expenditures RENT ! Renter expenditures
$PROD:V s:1
O:Q Q:GDP I:r Q:K I:w Q:L
$DEMAND:WORK
D:Q Q:WORKZ
E:Q Q:(-(alphaz*(INVZ))) E:w Q:L
$DEMAND:RENT
D:Q Q:RENTZ
E:Q Q:(-(1-alphaz)*(INVZ)) E:r Q:K
$REPORT:
V:RWORK D:Q DEMAND:WORK V:RRENT D:Q DEMAND:RENT V:RGDP O:Q PROD:V V:EL I:w PROD:V
$offtext
$sysinclude mpsgeset CGE1
$include CGE1.gen Solve CGE1 using MCP;
matrix) represents the situation in a specified country at a specified time26. When we employ MPSGE, the benchmark becomes something similar to a SAM but it is a rectangular matrix called MCM (Micro- Consistency Matrix). It is composed of rows and columns. Rows represent commodities (final goods, factors of production, taxes, savings) while columns are either production sectors or agents (consumers, Government, rest of the World). Entries may be positive or negative; positive entries define a receipt (or sale) for a market, while negative entries signify an expenditure (or purchase) by a market.
There are some accounting rules to follow just like in a SAM. Using Markusen’s (2004) words: “a rectangular matrix MCM is balanced or micro- consistent when row and column sums are zeroes”. Moreover, “a row sum is zero if the total amount of commodities flowing into the economy equals the total amount of commodities flowing out of the economy […] a production sector column sum is zero if the value of outputs equals the cost of inputs” and “a consumer column is balanced if the sum of primary factor sales equals the value of final demands”. As these definitions suggest, these three rules interpret the principle of Walras’s law, the zero profit theorem, and the product exhaustion theorem respectively. In fact, the first condition declares the market clearance for each commodity in the model. Therefore, there is a positive entry which represents the total sales and with negative signs, the different components of its final demand. The production column has a positive entry, the total production, and negative entries, the inputs used in the productive process. Finally, for each consumer, his final demand for the different commodities (negative entry) is equal to his total income (positive entry).
Like in the SAMs, each entry represents a value, which is price times quantity. This means the modeller may decide how to model prices. Usually, prices are set equal to one in order to interpret the value of the entries as quantities.
If it is possible, the use of MCMs is opportune. “This format emphasizes how the MPSGE program structure is connected to the benchmark data” (Rutherford, 2005). The benchmark equilibrium is expressed in the row and column sums. Columns corresponding to productive sectors have the sum of zero, reflecting the zero profit condition, as specified in the theoretical framework. Columns corresponding to consumers have the sum of zero in order to represent the income balance conditions where total income is devoted to final demand, savings, and
26 A very concise description of a SAM is provided by Rutherford (2005): “The input data is presented in the form of a balanced matrix, the entries in which represent the value of economic transactions in a given period. SAMs can be quite detailed in their representation of an economy, and they are also quite flexible. Traditionally, a SAM is square with an exact correspondence between rows and columns. […]
The numbers which appear in a conventional SAM are typically positive, apart from very special circumstances […]”.
eventually tax payments. Row sums are each zero, indicating the last equilibrium condition:
the market clearing condition.
In box 8 there are two MCMs. The first one is the benchmark for the codes presented above (which ultimately are the codes for the simple closed economy model without Government presented in box 1 and 5). The second one is a likely benchmark for the closed economy with Government as an example.
After having assigned values in the benchmark, the code should be written in the proper way for the program to be able to read the instructions. As we have already cited, the MPSGE program is inserted in the GAMS program. There is a specific command which tells the program to pass to the MPSGE subsystem and a similar command which returns to GAMS.
They are $ONTEXT and $OFFTEXT. Moreover the modeller must assign a name to the model because at the end of the code, it is necessary to refer to that name. The declaration of variables follows. There are four blocks of required information:
1) $SECTOR: in this block the modeller defines the productive sectors where the zero profit condition must hold for equilibrium. Here, the corresponding complementarity variables are shown. In this case they are the activity levels.
2) $COMMODITIES: in this block the markets that should clear are listed. Each of them is characterized by a complementarity variable, which is the price of the commodity itself.
3) $CONSUMERS: in this block there is the definition of the agents whose income balance holds. The related complementarity variable is the nominal expenditure level.
These three declaration blocks are fundamental for a CGE representation while the fourth
Box 9: Two illustrative MCMs
Productive sector
Consumers Row sum
Markets GDP WORK RENT INV
PX 100 -35 -45 -20 0
PK -60 60 0
PL -40 40 0
SAV -5 -15 20 0
Column sum 0 0 0 0
Productive sector Consumers Row sum
Markets GDP WORK RENT GOVT INV
PX 100 -30 -40 -10 -20 0
PK -60 60 0
PL -40 40 0
SAV -5 -10 -5 20 0
TAX -5 -10 15 0
Column sum 0 0 0 0 0
4) $AUXILIARY: in this case we must employ the definition of auxiliary variables when want to model constraints or non - Walrasian systems.
After the declaration of sectors and variables, the program requires us to assign values to each block. The key element is $PROD: when we want to assign values for a productive sector, and $DEMAND: when we want to assign values for each consumer. Let us now describe firstly the $PROD: block. The first line includes the command, the name of the productive sector and the elasticity of substitution between inputs, and elasticity of transformation when a combined production in a single sector occurs. Then the second line includes three fields; the O: field refers to which one is the produced commodity, Q: is the field for the produced quantity and P: is the price. We may read this line as follows: “the sector whose output is a commodity such that its price is what we have fill in the O: field and whose quantity is inserted in the Q: field. Then, its final price is the one in P:”. The following lines are quite similar but the first field is now I: which stands for inputs.
As an example, in box 7, the productive sector is called V and produces a commodity whose price is Q. The final production is 100. There is not any P: field since we assume the default value to be 1. To produce that good, the sector employs two inputs whose prices are r and w in quantities 60 and 40 respectively. There is no elasticity of substitution between inputs because we assume a Cobb - Douglas function whose elasticity is unitary (one is the default value).
The $DEMAND: block should be referred to an agent in the first line. Then, in the D: field there is the price of the demanded commodity and in Q:, the related quantity. In the following lines the first field is the E: field, which means endowments, and then as usual the Q: field is where the quantity is inserted.
In our example there are two $DEMAND: blocks one for workers and one for renters but both of them present the same scheme: the definition of the agent ($DEMAND:WORK,
$DEMAND:RENT), the definition of the demands (D:Q Q:WORKZ and D:Q Q:RENTZ), and the definition of the endowments (E:Q Q:(-(alphaz*(INVZ))), E:w Q:L, E:Q Q:(-(1-alphaz)*(INVZ)), and E:r Q:K).
This block may be read in this way: “there is an agent who demands for a good whose price is in the D: field in quantity Q: field. He is endowed with commodities whose prices are in E:
fields and in quantity Q: fields”.
If an $AUXILIARY: block has been defined, there should be a $CONSTRAINT:, an equation that is set to give a value to the auxiliary variable. It must be written in GAMS language.
Finally, a useful tool is the $REPORT: block. It is not necessary to solve the model but it could be useful in the output file. In fact, in this block we build a variable V: which refers to one of the variables we have used before. For example, in the box above, in the report file we
have created a variable whose name is RGDP, which means real GDP. But we must tell the program where to find this value. In this case we say: “go to the output field of a commodity whose price is Q in the producer block PROD:V”. Therefore, in the output file these useful values are directly shown.