© The MIT Press October 1997

 

GAMS models available for use with:

THE STRUCTURE OF APPLIED GENERAL EQUILIBRIUM MODELS

by Victor Ginsburgh and Michiel Keyzer

 


Building Applied General Equilibrium Models in GAMS

A user's guide and a library of applications

By Michiel Keyzer

 


A brief description of the models in the library.

AGE3: Basic CGE-model

CGE-model for a competitive equilibrium in a closed economy without government sector (see equations (3.18a-d) of Ginsburgh & Keyzer (1997), GK for short).

AGE4A: International trade

International trade is introduced by treating exports as the demand by an additional consumer who earns the imports as revenue (see equation 4.8 of GK. Though this model structure is often used in CGE-modelling, it has the severe limitation that equilibrium may not exist because of unboundedness in prices. The problem is due to the specification of the budget equation of the exporter whose income is equal to the countries imports (plus remittances). In this case, it may happen that the export price reaches infinity enabling the country to purchase very large quantities of imports, especially if substitution elasticities on imports are high. The problem is easily recognized in the welfare format, where the program's constraint set can become unbounded.

AGE4B: International trade

The specification follows the small country assumption (as in equations 5.21 or 5.22 of GK) by taking the prices of the tradable factors as given, but we associate it with Chapter 4 of the same book, because there are no taxes. Since for factors the export price is taken equal to the import price, there is no change in the price of commodities when the market shifts between imports, autarky, and exports. Hence, the formulation still fits within the (equality constrained) CGE-framework. Note: the formulation does use translated instead of ordinary CES cost functions. For ordinary CES the slack on input coefficients should be expressed in total quantity terms or in value terms. The model is highly instable: the solution may be solver- or even machine dependent.

AGE4C: International trade in factors and switches between imports, autarky and exports,

The model is the same as AGE4B, except that we allow for a wedge between import and export prices of factors. As there is now the possibility of a switch between imports, autarky and exports, the model has to be looked at as a nonlinear complementarity problem and can no longer be regarded as an equality constrained system. This is reflected in the product terms in the objective. The model is the same as AGE4B, except that we allow for a wedge between import and export prices of factors.

AGE5: Tariffs, taxes, international trade in factors, switch between imports, autarky and exports

This is a national model under the small country assumption which combines various features that often play a role in AGE-models: taxes and tariffs, switches between imports, autarky and exports, and export quotas (see Chapter 5 of G&K). The main complication with respect to AGE4C is that due to the price wedges, the accounting becomes more complex and error prone. Therefore, we check the consistency of the accounts by computing the total accounting discrepancy (the variable GAP in TABLE7).

AGE6A: Central buffer stocks, taxes, tariffs, international trade in factors

This adds centrally held buffer stocks to the national model under the small country assumption (See Chapter 5, GK). Various price wedges are introduced caused not only by taxes but also by processing costs, including trade and transportation margins. Note: the formulation uses translated instead of ordinary CES cost functions. For ordinary CES the slack on input coefficients should be expressed in total quantity terms or in value terms.

AGE6B: Drèze rationing

Here we build uniform or Drèze rationing (Section 6.2.3, GK) into the open economy model under the small country assumption as in AGE6A with switches between imports, autarky and exports, taxes and tariffs, but without consumer tax. It is advisable in this model to avoid imposing rations when they are known to be not binding.

AGE7: Recursively dynamic simulation

The model is similar to AGE6A, but with recursive dynamics (see Sections 7.2.3, 7.4.1 in GK). In a T-period formulation, all time-specific variables and equations would have to carry a time-subscript. The price normalization and the income would remain as they are, since they apply to the full period. Initial conditions would be introduced by treating the associated variables as fixed, terminal conditions through equations that only apply for the last period.

AGE9: Nonrival consumption

The model describes an equilibrium with Lindahl pricing of a single non-rival good (TV) (see Definition 9.1 in GK). Consumers share the cost of the non-rival commodity in accordance with their marginal utility with respect to that commodity.

AGE10A: Marginal cost pricing

Increasing returns are introduced in the model AGE3, with marginal cost pricing for a good produced via a single output cost function that is concave with respect to output (see Section 10.5, GK.

AGE10B: Efficiency wage relation and occupational migration

The model allocates consumers of class i to state s, in order to achieve Pareto-efficiency. The manpower supply of every consumer depends on his consumption. This is the efficiency wage relation. The model can be interpreted as endogenizing an efficient social security scheme (see equations 10.13-14 in GK for a further elaboration of this model). Note that the model is a generalization of the one presented in Chapter 10 of GK:

  • There are four commodities and five consumer groups.
  • People are allocated to states (types of firm) that differ in technology: self-employed, informally employed, formally employed.
  • The firms select the workers they use. This creates uncertainty to on the level of the individual.
  • Inside the household, food and textile are used as input in the production of labour for the different states. This labour is used for production in firms and for leisure.
  • Capital and labour are used to produce food.
  • Labour and food (i.e. cotton) are used to produce textiles.
  • Capital is not produced.
  • Due to the setup cost of labour supply in the informal and the formal sector, many are left in self-employment.

AGE11A: Markup pricing of goods

This introduces markup pricing of goods that are produced under constant returns to scale. The markup is a fixed fraction of producer cost and accrues to the owners of the firm (a markup can be interpreted as a tax: for treatment of taxes see AGE6A).

AGE11B: Monopolistic competition among producers, single output firms

The markup for good g is obtained as Lagrange multiplier of a maximization of producer g's profits subject to a price normalization condition and Walrasian excess demand at given levels of goods output (strategic supply). This strategic supply has the value generated in a markup ridden equilibrium, for a given markup rate. This rate is then adjusted iteratively until convergence is achieved (see Section 11.2 of GK). The markup-equilibrium is represented as a basic CGE-model like AGE3, but with markup pricing for all goods, Leontief technology and CES utility functions.

AGE11C: Imperfect competition among consumers, strategic reserves

A subset of consumers restricts its supply of factors. There is perfect competition in goods. Equipment is treated as numeraire. Producers are competitive. The markups are obtained via minimization of every consumer's net expenditure value keeping all strategic reserves fixed.

AGE11D: Imperfect competition among consumers, strategic consumption

A subset of consumers adjusts its net demand for factors. Producers are competitive. The markups are obtained via separate maximization for every consumer of his net expenditure value keeping all strategic consumption fixed.

AGE11E: Collusion among consumers, strategic reserves

Same model as AGE11C, but the strategic consumers collude (without side payments). The markups are obtained via minimization of the net expenditure value of the coalition at fixed levels of strategic reserves.

AGE12A: Transaction money (cash in advance)

Transactions demand for money is a fixed fraction of consumer expenditure. All purchases are made at the beginning of the Hicksian week and financed through cash provided in limited quantity by a bank. If the constraint on this quantity is binding, the lenders who own the cash will receive an interest payment (see Section 12.1 in GK).

AGE12B: Nonhomogeneity

This model follows the specification of AGE7 (small country assumption under recursive dynamics) but has the additional property that it allows for non-homogeneity in some revenue categories and for nominally fixed prices (see Section 12.3.1 in GK).

AGE12C1: Incomplete asset markets (first approximation)

There are two periods; period 1 (the present) is certain, but S alternative states can occur in period 2. Every consumer draws up a two-period plan, but is restricted with respect to the type of financial assets that he can buy (the quantity of this net purchase of assets is not restricted, however). A return function specifies the return on every particular asset in every state in period 2. The equilibrium determines the price of commodities in period 1 and all states of period 2, as well as the price of the financial asset in period 1 (see Section 12.2 in GK).
This is an application of:

  • the use of the Full format (a welfare program that includes the consumer budget constraints; the shadow prices of these constraints are adjusted iteratively),
  • repeated SOLVEs within a LOOP,
  • display on the screen, and
  • adjustment of the GAMS/MINOS options.

We present a version of the model with incomplete asset markets as was discussed in Definition (12.2) of the book. Though in the example given, iterative adjustment of the relevant parameters leads to reasonable convergence after about 25 calls of the Full-format program in AGE12C1, it is useful, before preparing the accounts, to verify that the result does solve the true model with incomplete asset markets. This is checked in Phase II (AGE12C2).

It may be added that after rather extensive experimentation (with settings on the OPTION-file, with iterations between subsystems, with bounds, normalizations etc.) the Full-format was the only stable implementation that could be obtained for this model within GAMS/MINOS, while for the other models convergence could be obtained through various schemes of computation.

Running the second phase (AGE12C2) for finetuning of the optimal solution requires executing AGE12C1 with the SAVE option (GAMS AGE12C1 SAVE=AGE12C1). The application does this by default.

AGE12C2: Incomplete asset markets (fine tuning)

This is the second phase of AGE12C. It follows after AGE12C1, the solution by iteration over the Full format program. This second phase algorithm, which minimizes slacks in the Arrow-Debrue format is quite unstable and should only be used for final finetuning. The application calls GAMS using the RESTART option: GAMS AGE12C2 RESTART=AGE12C1.


User's guide to models and additional utilities

Abstract

This is a user's guide to a library of models covered in Ginsburgh & Keyzer (1997) written in General Algebraic Modelling System (GAMS). To make it relatively selfcontained this guide also reproduces some introductory material on the construction of an AGE-model in GAMS. The library contains 18 models, starting with the simplest CGE-model and gradually building up to models with a complete reporting and interactive parameter adjustment and more innovative applications on nonconvexity, efficiency wages and occupational migration, imperfect competition, monetary constraints and incomplete asset markets. The programs in the library are illustrative only. Though all will find an equilibrium solution for the parameter values given, we do not claim that the algorithmic implementation chosen is the most robust one or that it will find a solution after changes in parameters. By browsing through the applications the user will recognize various ways of controlling convergence.

The guide is available on the Internet in Portable Document Format (PDF). A free Reader from Adobe® Acrobat®can be downloaded from Adobe.


Models and additional utilities: Installation notes

Two versions of the user interface are available: Windows95 & NT and MS-DOS (Users working in a Windows 3.1 or Windows 3.11 environment should use the MS-DOS version.) The models and GAMS macros are identical for both versions . The models have been tested with GAMS versions 2.25.087 and 2.25.089 using the MINOS solver.


|

Windows95 & NT installation

The utility is packed in the downloadable file, Win95-NT.EXE (1.57 Mb).

Installation notes

  1. Save the file to disk (to any directory you prefer).
  2. Move in the explorer to the directory where the file is saved.
  3. Double click the Win95&NT Agelib.
  4. Click "Unzip"; the program files will now be unzipped to C:\Windows\Temp.
  5. Click "CLOSE".
  6. Move to C:\Windows\Temp.
  7. Double click "SETUP". Possibly, you will now see the following screen (1):
    (If your system files do not need to be updated, you will see screen 3: please continue at point 8).

    screen 1
    Since the Since the Windows AGE application is written in MS Visual Basic, it uses general Windows libraries (.dll files). If you click "OK", some general system files will be updated. These system files are upwards compatible with your other applications.
    Click "OK": you will then see the following screen (2):


    screen 2
    Click "YES".

    Move to the C:\windows\temp directory and double click "SETUP" again. You will now see the following screen (3):


    screen 3
  8. Press "OK"; you will see the following setup screen (4):


    screen 4
  9. Press the icon: the library of AGE models will now be installed (all necessary directories will be made by the installation program). Upon completion of the installation, the following screen (5) will appear:


    screen 5
  10. Press "OK". The installation is now completed and the application is added to your start menu. It is associated with the icon:


|

MS-DOS installation

The AGE model programs can be run on any computer where GAMS is operational. For PC's, to avoid excessive processing time it is advised to use at least a 486-machines with at least 8Mb of RAM and ample hard disk. The utilities contains GAMS-macros called via a $BATINCLUDE and MS-DOS batch files and executables called by the AGE7.BAT file described in Appendix I of the user's guide. The installation will create the necessary subdirectories. It is possible to change this file-organization provided one makes sure that all files referenced via $BATINCLUDE statements are in the appropriate directory (or on the `path' to it) and that the length of the directory name plus file name does not exceed the installation maximum in GAMS. The current path reference is 'C:\AGE' for GAMS programs and 'C:\GAMS386' for GAMS macros and MS-DOS batch files and executables.

The utility is packed in the downloadable file, DOS_AGE.EXE (700 KB).

  • Download with Internet Explorer or standalone FTP client: DOS_AGE.EXE
  • Download with Firefox or Opera: DOS_AGE.EXE

This is a self-extracting executable which contains the files: PKUNZIP.EXE, README.TXT, AGELIB.ZIP, and UTILITY.ZIP.

You are encouraged to print the installation notes for later reference.

The installation proceeds as follows:

  1. create a directory for the AGE models (mkdir C:\AGE ).
  2. execute the file DOS_AGE.EXE.
  3. extract the zipped file AGELIB.ZIP including 4 subdirectories (PKUNZIP -D AGELIB).

    The directories C:\AGE\WKRUN, C:\AGE\WKINP and C:\AGE\WKOUT are empty upon installation. They are used by the AGE7 model (executed by the AGE7.BAT job).

    The utilities are extracted in a similar way. The directory for the utilities must be included in your PATH. It is suggested to extract the utilities to the GAMS directory since it is already in your path.
  4. move to the GAMS directory (cd C:\GAMS386).
  5. extract the zipped file UTILITY.ZIP (C:\AGE\PKUNZIP C:\AGE\PKUNZIP\UTILITY).

All programs can be run from the AGE directory in the usual way (for example GAMS AGE3). The model AGE7 is run by invoking the AGE7 batch file in the AGE directory. Note: if you did not use the directory C:\AGE to install the program files, you have to correct the path reference in the AGE7.BAT file accordingly.

Note with respect to the environment space in DOS.

The batch job AGE7.BAT makes frequent use of the SET statement. If during execution the error 'Insufficient environment space' is given, it is necessary to increase this space. Include in the CONFIG.SYS file the line
SHELL={path}\COMMAND.COM /E:1024 /P

{path} denotes the drive and directory of the COMMAND.COM. The switch /E:nnnn denotes the size of the environment space (max nnnn=32768).


Technical support inquiries: Agelibrary@sow.econ.vu.nl

Page design by Peter Albersen and Lia van Wesenbeeck, SOW-VU