advanced microeconomics -...

29

Upload: tranque

Post on 01-Jul-2018

239 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Advanced MicroeconomicsIntroduction to CGE

Jan Hagemejer

January 2, 2011

Jan Hagemejer Advanced Microeconomics

Page 2: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Plan of action

What is CGE?

Modelling rules:

modelsdatacalibration

Introduction to GAMS and its syntax.

Simple closed economy model and modelling convention.

Jan Hagemejer Advanced Microeconomics

Page 3: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Computable general equilibrium

We want to be able to analyze the e�ects of changes ineconomic policy or economic environment:

we want to see how, for example, a tax on good A a�ects thethe economy:it will, for sure, a�ect the price of good A that consumers payand also his consumer surplus (partial equilibrium).BUT: something else will happen

the consumer will switch to consuming some other goods(substitution).changes in demand for goods will a�ect the demand forfactors of production and their pricesthese will in turn a�ect the consumer's income.which in turn will a�ect the consumption of goods again.

These are called general equilibrium e�ects. We do not wantto ignore them.

Jan Hagemejer Advanced Microeconomics

Page 4: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Types of models (general)

computable static general equilibrium models (CGE or AGEmodels) - deterministic snapshots of the state of the economy

computable dynamic general equlibrium models - deterministicintertemporal equilibrium (perfect foresight)

real business cycles models (RBC) - dynamic macroeconomicneoclassical models with productivity shocks

dynamic stochastic general equlibrium models (DSGE) -dynamic macroeconomic models with frictions and productivityshocks

Jan Hagemejer Advanced Microeconomics

Page 5: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

General equilibrium modelling (static/CGE)

We model the economy (it can be a single country economy,but also a single village or city economy or even worldeconomy) using the same rules that we applied in class andyou used for your homework problems.

We assume how many agents, goods and markets there are.We assume the form of consumer preferences and productiontechnology.In the simplest case we assume price taking and constantreturns to scale (more advanced models assume monopolypower and IRS).As in class we assume that in our economies there are no�leaks�. The economy behaves like in a circular diagram from a�rst year textbook - all consumer income is generated in themodel and spent. The total spendings of consumers is equal tothe value of total consumption.

We write down the model similarly to what we did in class:our model describes conditions needed for the Walrasianequilibrium to hold: market clearing, feasibility etc.This leads us to the data problem: the Social AccountingMatrix.

Jan Hagemejer Advanced Microeconomics

Page 6: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The Social Accounting Matrix

The SAM is a snapshot of the economy at a given point intime.

It shows all the �ows of incomes and value between all theagents in the economy: households, �rms, government, theabroad.

It has to be compatible with our model - we need to have thesame set of agents in the model and in the SAM.

The SAM is based on a double accounting principle: the sumof elements of every row (incomes) has to equal the sum of allelements in a column (expenditures).

Jan Hagemejer Advanced Microeconomics

Page 7: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The Social Accounting Matrix

Next slide: an example SAM from the NBP model.

For example: the household (INSTH) is a sum of factorincome and transfers from other institutions.And it has to equal to the household consumptionexpenditures, outgoing transfers, income taxes and savings.(ROW=COLUMN).

Jan Hagemejer Advanced Microeconomics

Page 8: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The Social Accounting Matrix

Jan Hagemejer Advanced Microeconomics

Page 9: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The data (1)

Construction of the Social Accounting Matrix is probably themost tedious excercise.

First of all, we need an input-output table to know how muchfactors and intermediate use is required for production of eachgood.

Then, we need data on consumption by various institutions(households, government, exports).

For example: the NBP SAM combines data from the inputoutput table, National Accounts, Household Budgets Survey,international trade data etc.

Jan Hagemejer Advanced Microeconomics

Page 10: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The data (2)

Usually each of that piece of data comes in a di�erentclassi�cation and it has to be made compatible (eg.international trade uses a commodity-based classi�cation andproduction data uses the activity-based classi�cation).

Once you have all the data in compatible form, you have tobalance it, so that it �ts the ROW=COLUMN requirement.There are formal procedures to do that but still there are manyassumptions you have to make on the way.

There are some ready-made solutions eg. the GTAP database.

Jan Hagemejer Advanced Microeconomics

Page 11: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Calibration (1)

Let's assume we have the data ready and the model writtendown. How do we combine the two?

Here is where the calibration process starts. Calibration is theprocess of ��tting� the model to the data.

How do you do that:

First, we make a very important assumption: we assume thatthe database describes an economy in equilibrium. We call itbenchmark equilibrium.Then we choose all the parameters of the model to replicatethat equilibrium. We assume that all prices are 1 so thenominal values in equilibrium re�ect the real �ows.

Jan Hagemejer Advanced Microeconomics

Page 12: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Calibration (2)

This is opposite to solving a homework-like question, when Iask: what is the equilibrium given the parameters.

Here we ask: what are the parameters if the SAM is theequilibrium.

Usually there is more that one set of parameters that supportsthe equilibrium. Some parameters we directly take fromeconometric estimates or estimate yourself outside the model.Sometimes we guess a parameter and then do a sensitivity testto see how the choice of that parameter a�ects the results ofyour simulations (sensitivity testing).

Jan Hagemejer Advanced Microeconomics

Page 13: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Example of calibration

Let us assume that the utility function of a consumer isCobb-Douglas U = aαb1−α. a and b are consumption levels ofthe two goods present in the economy.

We know from our SAM, that the total spending onconsumption goods is 100.

We also know that in the benchmark (SAM), the spending ongoods is 30 and 70 respectively. So with prices equall to 1, thebenchmark consumption levels are a0 = 30 and b0 = 70 (notethe notation).

What is our calibrated parameter α to have our modelreplicate the benchmark consumption provided that prices are1 and total spending on consumption is 100? Answer: ......

Jan Hagemejer Advanced Microeconomics

Page 14: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Example of calibration

This can be easily generalized to many goods. Same applies toproduction functions (shares in the cost of production de�nethe C-D parameters).

Remember that by doing the above we already assume thatthe elasticity of substitution is 1. If we had a CES function, wewould have another parameter to calibrate (and this we cannotdo using the data, we have to have external sources, such aseconometric estimates).

Jan Hagemejer Advanced Microeconomics

Page 15: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Model calibrated, what's next?

Once your model replicates the equilibrium, you can startdoing simulations or counterfactuals.

For example, you can impose a change in the tax rate or achange in the level of endowments.

The model is pushed out of equilibrium. If you wroteeverything correctly, the optimization software is going to �ndanother equilibrium (unless it is infeasible).

You can compare the equilibrium activity levels (quantities)and prices from the benchmark with you counterfactual.

You will see how your policy shock a�ected the economicactivity. From the utility function you can look at welfarechanges.

Jan Hagemejer Advanced Microeconomics

Page 16: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The software

We will use GAMS - General Algebraic Modeling System, ahigh-level modeling system for mathematical programmingproblems.

It is commercial software, however it can run small models inthe free version.

It can solve linear and non-linear mathematical programmingproblems.

It is very useful as it allows the user to use the indexednotation, for example X (INSTH, SEC ) is a variable x that isindexed over households INSTH and sectors SEC .

Jan Hagemejer Advanced Microeconomics

Page 17: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The GAMS IDE

Normally you will use the GAMS IDE or the develompentinterface for GAMS. It is fairly simple.

Once you �re it up for the �rst time, you have to start a newproject (File/Project/New Project) in a directory of yourchoice. Give it some name.

Then you start a new program �le where you can put yourcode.

However, I prepared for you two �les with some starting code.

Jan Hagemejer Advanced Microeconomics

Page 18: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Sets, parameters, variables

SETS Declares the indexes of the model

PARAMETERS Declares the constants, parameters and thedummy variables to be used in the program. The elementsunder this component are described by a brief descriptivesentence following the declaration statement,

CALIBRATION Data is used to generate the structuralparameters. The purpose here is to impose the algebraicsystem of equations onto the data, so that the �rst "solution"of the model will re�ect exactly the "base-year" SAM data.

VARIABLES All variables, endogenous, or exogenous aredeclared here with brief descriptive identi�ers.

VARIABLE INITIALIZATION The Variables are initialized withthe base-year data values. This enables the algorithm to startits search for equilibrium from a "su�ciently close" data point.EQUATIONS The algebraic equations of the model aredeclared with descriptive statements.

Jan Hagemejer Advanced Microeconomics

Page 19: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Equations, initialization and solution

EQUATION SPECIFICATIONS The declared EQUATIONS arespeci�ed in the GAMS language.

CLOSURE AND RESTRICTIONS Exogenous variables are"�xed" using the .FX appends. Bounds are introduced using.LO and .UP. The overall macro closure recognized in themodel is implemented here.

SOLVE AND DISPLAY The MODEL statement declares themodel by specifying which EQUATIONS form the MODEL.SOLVE statement commands GAMS to interface with thealgorithm to search for a numerical solution. The solutionvalues are inputted to the display tables and are documentedusing the DISPLAY command.

Jan Hagemejer Advanced Microeconomics

Page 20: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

SUM and PROD

If you want to sum some variables or parameters, you can do itmanually or use the SUM syntax:

SUM(SEC , X (SEC )) - this command sums up all the X'sfrom a set SEC.

Same applies to PROD where you can have a product insteadof the sum.

Jan Hagemejer Advanced Microeconomics

Page 21: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

What we will do.

Our �rst classrom model is:

Closed economyTwo factors - capital and labour.Two goods - X and Y. Production function of both is CobbDouglas.

Jan Hagemejer Advanced Microeconomics

Page 22: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Model format

The convention that we choose is called MixedComplementarity Problem.

MCP: To each variable we attach the shadow price - forexample we attach price of the good to market clearing. It iszero if the good is free (excess supply) and non-zero if themarket clearing condition is satis�ed.

We write our model as a set of MARKET CLEARING, ZEROPROFIT and INCOME BALANCE conditions.

Jan Hagemejer Advanced Microeconomics

Page 23: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Our SAM

The SAM looks like this:

Jan Hagemejer Advanced Microeconomics

Page 24: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Model format (2).

Consumer: consumer buys an aggregate consumption good.Its consumption W is equal to consumer welfare/utility.

So INC = PW ∗W . So the consumer spends all his income onthe aggregate consumption (and pays price PW ).

We do so that utility to has its meaning - a 1 percent increasein utility is equivalent to an increase in real income by 1percent.

The aggregate consumption good is �produced� usingconsumption of goods X and Y . There is zero pro�t at this�production process�.

The consumer income is equal to the value of sales ofendowments. The endowments of K an L are both 100.

Jan Hagemejer Advanced Microeconomics

Page 25: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The zero pro�t conditions

Given our convention, we will have two zero pro�t conditionsfor production and for consumption

The one for consumption is easy: unit cost of production =unit price of �nal good.

This is not di�cult. If you have a Cobb-Douglas of the form:X = AXL

αK 1−α, the unit cost function is:

CX =1

AX(PL

α)α(

PK

1− α)1−α

So the zero pro�t condition for X is: pX = 1

AX(PLα )α( PK

1−α)1−α.

We have the analogue zero pro�t condition for good Y .

In our model the A's will be called PRODSCALE_X andPRODSCALE_Y .

Jan Hagemejer Advanced Microeconomics

Page 26: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The zero pro�t conditions

For the consumer it is almost the same. Utility:W = BXλY 1−λ, so the zero pro�t condition for consumer is:

PW =1

B(PX

λ)λ(

PY

1− λ)1−λ

You can think of the zero pro�t condition for consumer as away to determine the consumer price index.

So we will have 3 zero pro�t conditions (2 for goods and onefor aggregate consumption).

In our model the B will be called CONSCALE.

Jan Hagemejer Advanced Microeconomics

Page 27: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Market clearing

Demand for goods:

X = λPW ∗WpX

Y = (1− λ)PW ∗WpY

Demand for aggregate consumption.

W = INC/PW .

Supply of factors (endowment) has to equal demand of factors:

L̄ = αXPXXPL

+ αYPYYPL

K̄ = (1− αX )PXXPK

+ (1− αY )PYYPK

Jan Hagemejer Advanced Microeconomics

Page 28: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

Income balance

The consumer derives its income from the endowments of thefactors of production:

INC = PK K̄ + PLL̄

Jan Hagemejer Advanced Microeconomics

Page 29: Advanced Microeconomics - coin.wne.uw.edu.plcoin.wne.uw.edu.pl/jhagemejer/wp-content/uploads/2010_micro... · Advanced Microeconomics Introduction to CGE Jan Hagemejer January 2,

The model

Our model therefore comprises of nine equations: 3 zero pro�t,5 market clearing and one income balance equation.

We need to �x some numeraire to have a reference of price eg.PK.FX=1.

We choose the parameters of the model so that it replicatesthe equilibrium (we have to rescale the production functions -example in the code).

We provide the solver with starting values of all endogeneousvariables (prices=1, quantities equal to the benchmark).

We run the model and see if it is calibrated correctly.

Once we have that, we can run counterfactuals - simulatee�ects of some changes in exogeneous variables.

Jan Hagemejer Advanced Microeconomics