Autumn 2022

Course Web Page
Computable General Equilibrium Modeling

Instructor: Olga Kiuila

First rule of programming: If it works, don't touch it


The course is based on examples written in GAMS and MPSGE (alternative softwares for CGE modeling - GEMPACK, AIMMS, EXCEL, MATLAB - will not be discussed here). There is available a free student version from GAMS web site. It is a limited version but it is perfectly adequate for learning CGE modeling basics. For instalation under MAC operating system, in case of troubles, use WineBottler package (page 580). For those interested in DOS version for GAMS, I recommend to use free software Emacs, but I use the paid one Epsilon (such softwares allow to use one and only one editor for different tasks - Gams, Latex, Python, R, etc. - instead of having to learn several editors).

Examples presented here were prepared by Thomas F. Rutherford, Bruce A. McCarl, Rob Dellink, Andres Ramos, Hodjat Ghadimi, and myself.
Solutions were prepared by my students and myself.

Techniques for estimating SAM will not be analysed during these lectrues. Examples of such techniques are available in the GAMS model library (CESAM.gms and CESAM2.gms) and PEP (SAMBAL, GPCEMA). Details of entropy theory and matrix balancing techniques are described by M.Thissen and H.Loefgren, R.A.McDougall, A.Golan. Baselines for dynamic CGE models are explained in the Journal of Global Economic Analysis.


  •   Lecture 1a: History of CGE modeling (Polish version)
  •  Lecture1b: Basic rules to formulate model in GAMS 
  • EXAMPLE 0: Estonian Model and I/O Table

  •  Lecture 2a: Using GAMS  
  •  Lecture 2b: Steps to prepare MPSGE models 
  • EXAMPLE 1: numeraire (part I), MRS (part I), endowment, calibration point (part I), scaling (part I), reference prices (part I), multipliers, results interpretation, results reporting (part I), price index, $ondotl, jump to another line, ignoring equation, functional forms (part I), joint production (part I) - solution - 1* (algebraic version & exercises); supplement solutions in Polish: 1, 2, 3; answers 1a, b, c, 1**, 1**a-c

  •  Lectures 3&4: Calibration point  
  • EXAMPLE 2: uniform scaling (part II), MRS(part II), reference prices (part II), normalization of variables - solution, supplement solution in Polish: 1; answers 2a, b, 2**, 2**a-b
    EXAMPLE 3: leisure (part I), productivity, elasticity of substitution (part I), functional forms (part II), loops - answers 3a, b; solution

  •  Lecture 5: Getting started to use GAMS-IDE (the alternative interface is GAMS-Studio)  
  • EXERCISES: benchmark versus counterfactual equilibrium - solution

  •  Lecture 6: Simple Exachange Model  
  • EXAMPLE 4: autarchy versus open economy, second welfare theorem, elasticity of substitution (part II), loop, money illusion (part I) - answers 4a, b, c; solution

  •   Lecture 7: Steps to prepare GAMS models & EXERCISES - answers  
  • EXAMPLE 5a: market clearing, errors, log file
    EXAMPLE 5b: sets, tables, alias


  •  Lecture 8: Social Accounting Matrix 
  • EXAMPLE 6a: numeraire (part II), money illusion (part II), typo, taxes (part I) - solution - 6* (algebraic version in a calibrated share form), 6** (general algebraic version); answers 6a(a), (b)
    EXAMPLE 6b: MCP versus LP

  •   Lecture 9a: General remarks for using GAMS 
  • EXAMPLE 7a: basic notation, Walras' Law, complementarity
    EXAMPLE 7b: model of 2 consumers & 2 producers & 2 inputs


  •   Lecture 9b: Why is it worth using models?  
  • EXAMPLE 8a: good modeling practices with GAMS
    EXAMPLE 8b: Cournot model with GAMS


  •  Lecture 10: Producers (part I)  
  • EXAMPLE 9a: nested function, intermediate demand (part I), consumer as a "producer", welfare, numeraire (part III), algebraic version (part III), results reporting (part II), taxes (part II) - solution; answers 9a(a), (b)
    EXAMPLE 9b: intermediate demand (part II), social accounting matrix (part II), calibration point (part II) - solution
    EXAMPLE 9c - 9c* (description): joint production (part II), elasticity of transformation, default numeraire (part IV), taxes (part III) - answer 9c(a), solution

  •  Lecture 11: Government interventions  (reading)
  • EXAMPLE 10a : taxes (part IV - benchmark taxation, tax on input, tax on output), results reporting (part III) - solution...
    EXAMPLE 10b : tax reform, equal yield constraint (part I) - solution...

    EXAMPLE 10c (description): public goods, public consumption, transfers, equal yield constraint (part II) - solution...

  •  Lecture 12: International trade  
  • EXAMPLE 11: import tariffs - solution...; answers 11a, b

  •  Lecture 13: Households  
  • EXAMPLE 12 - 12*: leisure (part II) - answer; solution...
    EXAMPLE 13 : two households - answer; solution...


  •   Lecture 14: Financial module  
  • EXAMPLE 14:

  •  Lecture 15: Producers (part II)  
  • EXAMPLE 15a : economy with unprofitable activity - answers 15a(a), (b); solution...
    EXAMPLE 15b ( description): decreasing returns to scale - answers 15b(a), (b); solution...

  • to add examples of income tax (M32), unemployment (M36), capital accumulation (M37), invenotires, negative savings (ers82mcp.gms in GAMS model library, stage1.gms at cgemod.org.uk)


    Examples of student  tasks for the first semester.
    Proposition of  topics for diploma thesis.
     Rules and requirements for diploma thesis.
    Data skills: Data Analyst (easiest) vs Data Engineer vs Data Scientist (the most promising).

    Presentations by students:
  •  Bitcoin by Alessandra Pernice
  •  Ramsey_Solow by Yoon Ahreumsol
  •  Energy policy in Poland by Emilia Lewczuk  
  •