lecture 3.2 1 2 sim? easy cge modelingnature.berkeley.edu/.../fao_cea_lecture_3.2_cge123_ppt.pdf ·...

36
Lecture 3.2 1 2 Sim? Easy CGE Modeling David Roland-Holst, Sam Heft-Neal, and Anaspree Chaiwan UC Berkeley and Chiang Mai University Training Workshop Economywide Assessment of High Impact Animal Disease 14-18 January 2013 InterContinental Hotel, Phnom Penh, Cambodia

Upload: others

Post on 14-Feb-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

  • Lecture 3.2

    1 2 Sim? Easy CGE Modeling

    David Roland-Holst, Sam Heft-Neal, and Anaspree Chaiwan UC Berkeley and Chiang Mai University

    Training Workshop Economywide Assessment of High Impact Animal Disease

    14-18 January 2013 InterContinental Hotel, Phnom Penh, Cambodia

  • Roland-Holst 2 16 January 2013

    1-2-3 CGE Model

    •  1 country, 2 activities, 3 commodities •  2 activities, producing D and E.

    §  E not consumed domestically. •  Additional commodity, M, consumed domestically but

    not produced.

  • Roland-Holst 3 16 January 2013

    Sturctural Assumptions

    •  Aggregate GDP (X) is fixed. §  Full employment model.

    •  Trade balance set exogenously. •  World prices of M and E are fixed. •  Total absorption (Q) is endogenous.

  • Roland-Holst 4 16 January 2013

    Analytical 1-2-3 Model

    ( )( )

    ( )

    ( )

    2

    2

    Flows

    1. , ;

    2. , ;

    3.

    4. ,

    5. ,

    6.

    S

    S D

    Dq

    e dS

    m dD

    x

    X G E D

    Q F M D

    YQP

    E g P PDM f P PDY P X R B

    σ

    = Ω

    =

    =

    =

    =

    = ⋅ + ⋅

    ( )( )

    1

    1

    Prices7. 8.

    9. ,

    10. ,

    11. 1Equilibrium Conditions12. 013. 014.

    m m

    e e

    x e d

    q m d

    D S

    D S

    m e

    P R pwP R pw

    P g P P

    P f P P

    R

    D DQ Qpw M pw E B

    = ⋅

    = ⋅

    =

    =

    − =

    − =

    ⋅ − ⋅ =

  • Roland-Holst 5 16 January 2013

    1-2-3 CGE Model

    Identities15. 16. 17.

    x e d S

    q S m d D

    q D

    P X P E P DP Q P M P DY P Q

    ⋅ ≡ ⋅ + ⋅

    ⋅ ≡ ⋅ + ⋅

    ≡ ⋅

  • Roland-Holst 6 16 January 2013

    Definitions for the 1-2-3 CGE Model

    Endogenous Variables E: Export good M: Import good DS: Supply of domestic good DD: Demand for domestic good QS: Supply of composite good QD: Demand for composite good Y: Total income Pe: Domestic price of export good Pm: Domestic price of import good Pd: Domestic price of domestic good Px: Price of aggregate output Pq: Price of composite good R: Exchange rate

    Exogenous Variables pwe: world price of export good pwm: world price of import good B: Balance of trade σ: Import substitution elasticity Ω: Export transformation elasticity

  • Roland-Holst 7 16 January 2013

    SAM 1-2-3

    Activities Commody Hshld World Activities d DP D⋅ eP E⋅ Commodities q DP Q⋅ Households xP X⋅ R B⋅ World mP M⋅ Total d S eP D P E⋅ + ⋅ q SP Q⋅ Y

  • Roland-Holst 8 16 January 2013

    Trade Schematically

    Domestic Goods/Services

    Impor t s

    Indifference Curve

    slope=-PD/PM

    Domestic Goods/Services

    Exports

    PPF

    slope=-PD/PE

    CES CET

    slope = E/D = k (PE / PD ) σ slope = M/D = k (PD / PM ) σ

  • Roland-Holst 9 16 January 2013

    1-2-3 as a Programming Model

    9

    ( )

    ( ) x

    Maximize , ;

    with respect to: , , ,subject to: Shadow Prices

    1. , ; technology /

    2.

    D S

    S x q

    Q F M D

    M E D D

    G E D X P P

    σ

    λ

    =

    Ω ≤ =

    balance of trade /3. domestic market /

    m e b q

    D S d d q

    pw M pw E B R PD D P P

    λ

    λ

    ⋅ ≤ ⋅ + =

    ≤ =

  • Roland-Holst 10 16 January 2013

    Assumptions

    •  A CET transformation technology between a domestic good D and an export Good E

    •  CES preferences in final demand over D and imports M

    •  A fixed balance of trade •  Fixed government demand and investment (example

    of “macroeconomic closure”) •  Fixed terms-of-trade (small country assumption) •  Macro identities hold (income constraints, balance of

    trade, etc.

  • Roland-Holst 11 16 January 2013

    PD/PE

    PMM=PEE + B

    PD/PM

    E

    DS

    M

    DD

    1-2-3 Model Descriptively

    DD = DS

  • Roland-Holst 12 16 January 2013

    Foreign Capital Inflow

    B↑

  • Roland-Holst 13 16 January 2013

    Terms of Trade Deterioration

    PE/PM↓

  • Roland-Holst 14 16 January 2013

    123456789

    10111213141516171819202122232425262728

    A B C D E F G H I J K L M1-2-3 (CGE) Model for Sri Lanka, 1991

    from Devarajan-Go-Lewis-Robnson-Sinko (1997)note: use "solver", under the "Tools" menu. Solver settings have been set.Parameters Exogenous Variables Base Year Current Endogenous Variables Base Year Current Cur/Base Eq.# Equations

    Real FlowsElasticity for CET (st) 0.60 World Price of Imports (wm) 0.89 0.89 Export Good (E) 0.33 0.33 1.00 1 CET Transformation (CETEQ) 1.00Elasticity for CES/Q (sq) 0.60 World Price of Exports (we) 1.01 1.01 Import Good (M) 0.50 0.50 1.00 2 Supply of Goods (ARMG) 1.18

    Supply of Domestic Good (Ds) 0.67 0.67 1.00 3 Domestic Demand (DEM) 1.18Scale for CET (at) 2.22 Import Tariffs (tm) 0.13 0.13 Demand of Domestic Good (Dd) 0.67 0.67 1.00 4 E/D Ratio (EDRAT) 0.49Share for CET (bt) 0.77 Export Duties (te) 0.01 0.01 Supply of Composite Good (Qs) 1.18 1.18 1.00 5 M/D Ratio (MDRAT) 0.75Rho for CET (rt) 2.67 Indirect Taxes (ts) 0.08 0.08 Demand of Composite Good (Qd) 1.18 1.18 1.00 Nominal Flows

    Direct Taxes (ty) 0.03 0.03 6 Revenue Equation (TAXEQ) 0.20Scale for CES/Q (aq) 1.97 Tax Revenue (TAX) 0.20 0.20 1.00 7 Total Income Equation (INC) 1.13Share for CES/Q (bq) 0.38 Savings rate (sy) 0.17 0.17 Total Income (Y) 1.13 1.13 1.00 8 Savings Equation (SAV) 0.27Rho for CES/Q (rq) 0.67 Govt. Consumption (G) 0.10 0.10 Aggregate Savings (S) 0.27 0.27 1.00 9 Consumption Function (CONS) 0.83

    Govt. Transfers (tr) 0.12 0.12 Consumption (Cn) 0.83 0.83 1.00 PricesForeign Grants (ft) 0.02 0.02 10 Import Price Equation (PMEQ) 1.00Net Priv Remittances (re) 0.01 0.01 Import Price (Pm) 1.00 1.00 1.00 11 Export Price Equation (PEEQ) 1.00Foreign Saving (B) 0.08 0.08 Export Price (Pe) 1.00 1.00 1.00 12 Sales Price Equation (PTEQ) 1.08Output (X) 1.00 1.00 Sales Price (Pt) 1.08 1.08 1.00 13 Output Price Equation (PXEQ) 1.00

    Price of Supply (Pq) 1.00 1.00 1.00 14 Supply Price Equation (PQEQ) 1.00Price of Output (Px) 1.00 1.00 1.00 15 Numeraire (REQ) 1.00

    Price of Dom. Good (Pd) 1.00 1.00 1.00 Equilibrium ConditionsExchange Rate (Er) 1.00 1.00 1.00 16 Domestic Good Market (DEQ) 0.00

    17 Composite Good Market (QEQ) 0.00Investment (Z) 0.25 0.25 1.00 18 Current Account Balance (CABAL) 0.08Government Savings (Sg) -0.01 -0.01 1.00 19 Government Budget (GBUD) -0.01Walras Law (Z-S) 0.00 0.00

    The 123 model in Excel

    • 19 endogenous variables and equations • variables are “scaled” as a share of GDP • Basic inputs are macroeconomic accounts data

  • Roland-Holst 15 16 January 2013

    The 123 model in Excel

    • 19 endogenous variables and equations • variables are “scaled” as a share of GDP • Basic inputs are macroeconomic accounts data

    123456789

    10111213141516171819202122232425262728

    K L M N O P Q R S T U

    Eq.# Equations Data - Sri Lanka, 1991Real Flows Rs Billion Output=1 Rs Billion Output=1

    1 CET Transformation (CETEQ) 1.00 National Accounts 3 Fiscal Account2 Supply of Goods (ARMG) 1.18 1 Output (Value Added) 324.69 1.00 Revenue 76.18 0.233 Domestic Demand (DEM) 1.18 Wages 163.32 0.50 NonTax 8.02 0.024 E/D Ratio (EDRAT) 0.49 Current Expenditure 83.76 0.265 M/D Ratio (MDRAT) 0.75 GDP at market prices 375.34 1.16 Goods & Services 35.58 0.11

    Nominal Flows Private Consumption 291.69 0.90 Interest Payments 22.07 0.076 Revenue Equation (TAXEQ) 0.20 Public Consumption 35.58 0.11 Transfers & Subsidies 26.10 0.087 Total Income Equation (INC) 1.13 Investment 86.38 0.27 Capital Expenditure 35.77 0.118 Savings Equation (SAV) 0.27 Exports 106.39 0.33 Fiscal Balance -43.35 -0.139 Consumption Function (CONS) 0.83 Imports 144.70 0.45

    Prices10 Import Price Equation (PMEQ) 1.00 Tax Revenue 4 Balance of Payments 11 Export Price Equation (PEEQ) 1.00 2 Sales & Excise Tax 32.03 0.10 Exports - Imports -38.32 -0.1212 Sales Price Equation (PTEQ) 1.08 Import Tariffs 18.62 0.06 Net Profits & Dividends -0.78 0.0013 Output Price Equation (PXEQ) 1.00 Export Duties 1.14 0.00 Interest Payments -8.82 -0.0314 Supply Price Equation (PQEQ) 1.00 Payroll Tax 0.00 0.00 Net Private Transfers 11.60 0.0415 Numeraire (REQ) 1.00 Personal Income Tax 3.54 0.01 Net Official Transfers 7.90 0.02

    Equilibrium Conditions Capital Income Tax 12.84 0.04 Current Account Balance -28.42 -0.0916 Domestic Good Market (DEQ) 0.00 Total 68.16 0.2117 Composite Good Market (QEQ) 0.00 External Debt 260.50 0.8018 Current Account Balance (CABAL) 0.08 Debt Service Payments 20.21 0.0619 Government Budget (GBUD) -0.01

  • Roland-Holst 16 16 January 2013

    Variables are identified to the solver by name

  • Roland-Holst 17 16 January 2013

    Calibration

    •  Must run the solver any time parameters or baseline data are changed.

    EAE 5918

  • Roland-Holst 18 16 January 2013

    Simulation

    •  To run a counterfactual experiment §  Change the Current values of Exogenous Variables

    (column F of the 1-2-3 Model Sheet) §  Run the Solver §  Examine Results Summary and Endogenous Variables §  NB: Be sure to re-calibrate after each experiment

  • Roland-Holst 19 16 January 2013

    Real Flows Prices (1) X = G(E,DS;omega) (10) Pm = (1 + tm)⋅R ⋅ pwm (2) QS = F(M,DD;sigma) (11) Pe = (1 + te) ⋅ R ⋅ pwe (3) QD = C + Z +G (12) Pt = (1 + ts) ⋅ Pq (4) E/DS = g2(Pe,Pd) (13) Px = g1(Pe,Pd) (5) M/DD = f2(Pm,Pt) (14) Pq = f1(Pm,Pt) (15) R = 1 Nominal Flows Equilibrium Conditions (6) T = tm ⋅ R ⋅ pwm ⋅ M + ts ⋅ Pq ⋅ QD (16) DD ‑ DS = 0

    + ty ⋅ Y ‑ te ⋅ R ⋅ pwe ⋅ E (17) QD ‑ QS = 0 (7) Y = Px ⋅ X + tr ⋅ Pq + re ⋅ R (18) pwm ⋅ M ‑ pwe ⋅ E ‑ ft ‑ re = B (8) S = s ⋅ Y + R ⋅ B+ Sg (19) Pt ⋅ Z ‑ S = 0 (9) C ⋅ Pt = (1 ‑s ‑ ty) ⋅ Y (20) T ‑ Pq ⋅ G ‑ tr ⋅ Pq ‑ ft ⋅ R ‑ Sg = 0 Accounting Identities

    (i) Px ⋅ X = Pe ⋅ E + Pd ⋅ DS (ii) Pq ⋅ QS= Pm ⋅ M + Pt ⋅ DD

    A Model with Consumption, Government, and Investment

  • Roland-Holst 20 16 January 2013

    Definitions

    Endogenous Variables Exogenous Variables E: Export good pwm: World price of import good M: Import good pwe: World price of export good DS: Supply of domestic good tm: Tariff rate DD: Demand for domestic good te: Export subsidy rate QS: Supply of composite good ts: sales/excise/value‑added tax rate QD: Demand for composite good ty: direct tax rate Pe: Domestic price of export good tr: government transfers Pm: Domestic price of import good ft: foreign transfers to government Pd: Producer price of domestic good re: foreign remittances to private sector Pt: Sales price of composite good s : Average savings rate Px: Price of aggregate output X: Aggregate output Pq: Price of composite good G: Real government demand R: Exchange rate B : Balance of trade T: Tax revenue rhot: Export transformation elasticity Sg: Government savings rhoc: Import substitution elasticity Y: Total income C: Aggregate consumption S: Aggregate savings Z: Aggregate real investment

    EAE 5918

  • Roland-Holst 21 16 January 2013

    123 SAM

    EAE 5918

    M Wrld SF SG SH Cap

    TH TX Govt Y Hshld

    Z G C Com E D Act

    Wrld Cap Gov Hshld Com Act

  • Roland-Holst 22 16 January 2013

    Slope =PD/PE

    PMM=PEE + B

    Slope=PD/PM

    E

    DS

    M

    DD

    Diagrammatic 1-2-3 model

    DD = DS

    Balance of Trade

    Domestic Market X = G(E,D)

    Q = F(M,D)

    Slope =PE/PM

  • Roland-Holst 23 16 January 2013

    Foreign Capital Inflow

    EAE 5918

    B

    Domestic Market

    C

    P D

    D

    E

    M

    Slope =pd/pe

    Slope = pd/pm

    Q=F(M,D)

    X=G(E,D)

    B

    Real Appreciation

    C*

  • Roland-Holst 24 16 January 2013

    Adverse Terms of Trade Movement

    EAE 5918

    PE/PM ↓

    Domestic Market

    Slope =pd/pe

    Slope = pd/pm

    Q=F(M,D)

    X=G(E,D)

    Real Depreciation

    C*

    C

    D

    D

    E

    M

  • Roland-Holst 25 16 January 2013

    MINI: Excel Implementation for Cambodia

    Download the Excel spreadsheet Cambodia_Mini_CGE.xls This is a heuristic, 2 sector CGE model in six spreadsheets: 1. AggMat – A matrix of zeros and ones to aggregate a

    standard GTAP SAM to fit the two sector framework 2. BaseSAM – The initial input SAM, taken from GTAP 5. 3. SAM – The aggregated initial SAM and a counterfactual

    SAM for comparative static assessment 4. Model – The primary data and equation spreadsheet 5. Parameters – A registry of structural parameter values 6. Dictionary – complete definitions of variables and

    parameters

  • Roland-Holst 26 16 January 2013

    Model Spreadsheet

    This is the primary functional component of the Mini_CGE, containing all

    1.  Endogenous variables, 87 (suffixes _a and _o for agriculture and other)

    2.  Equations 86 (one is redundant because of Walras Law)

    3.  Exogenous variables, 27 and 4.  A few examples of counterfactual experiments.

  • Roland-Holst 27 16 January 2013

    Parameters: Supply and Demand

    Production σp sigmap - Substitution elasticity between total

    intermediate demand, ND, and value added, VA. σ v sigmav - Substitution elasticity between labor, and the

    capital-sector specific factor bundle, KF. σ k sigmak - Substitution elasticity between capital and

    the sector specific factor. Final demand η

    eta - Income elasticity σ g sigmag - Government expenditure substitution

    elasticity σ i sigmai - Investment expenditure substitution elasticity

  • Roland-Holst 28 16 January 2013

    Parameters – Trade and Factors

    Trade elasticities σm sigmam - Armington import elasticity σ  x sigmax - CET transformation elasticity (between

    domestic and export supply). ε epse - Export demand elasticity. Supply elasticities ω l omegal - Aggregate labor supply elasticity ω k omegak - Capital mobility elasticity. 0 emulates sector-

    specific capital. Use a high value to approximate perfectly mobile capital.

    ω f sigmak - Sector-specific supply elasticities.

  • Roland-Holst 29 16 January 2013

    Install or Initialize the Solver Look under Tools/Solver or the Office Button/Excel Options The Solver solution algorithm is invoked by clicking on the Solve button. The status bar at the bottom of the Excel screen displays (minimal) information on

    each iteration, including iteration count and value of the objective function.

  • Roland-Holst 30 16 January 2013

    Simulation Results

    If successful, the solver will display the following dialog box: To have the Solver overwrite the values of the endogenous variables, simply

    click on the OK button. Users can experiment with the other options.

  • Roland-Holst 31 16 January 2013

    Convergence and Consistency

    If solution convergence was achieved, the model should have re-produced the base data set (within the limits of the convergence tolerance). All equations should evaluate to 0. The expression of Walras’ Law should evaluate to 0. All deviations from initial values should evaluate to 0. A final test is to check the consistency of the resulting SAM.

    The SAM spreadsheet, contains the solution SAM. The solution SAM is

    expressed in terms of the model solution. For example, the labor remuneration cell (in agriculture) contains the formula:

    =wage*ld_a/scale If the SAM is not consistent, either the solution is inconsistent, the

    model has been mis-specified, or the formulas in the SAM have been mis-specified. The formula is adjusted by the scale variable to make the solution SAM comparable with the initial SAM.

  • Roland-Holst 32 16 January 2013

    Homogeneity Test

    If this is a new model, it is recommended to check model homogeneity. This involves a perturbation of the model numéraire. If the model is homogeneous in prices, perturbation of the model numéraire should leave all volumes constant, and adjust all prices and value variables by the same percentage amount as the percentage change in the numéraire (i.e. all relative prices remain constant). To check homogeneity, multiply the initial value of the numéraire by some constant, e.g. in cell L23, for the exchange rate substitute

    =er0*1.1 Initially, the only equations which will be affected by this change are the

    domestic investment equation, the domestic trade prices, and the tariff revenue equation because these are the only equations where the numéraire (the exchange rate) appears. Invoke Solver to find a new solution to the model. If the homogeneity test fails (other than due to the lack of convergence), at least one of the equations has been mis-specified, or there could be a built-in nominal rigidity, such as a fixed nominal wage. If both tests succeed, the model should be re-initialized, and the next step is to run one or more shocks to the model.

  • Roland-Holst 33 16 January 2013

    Installed Scenarios

    1.  Tariff Abolition 2.  Full Trade Reform 3.  Agricultural Export Tax 4.  Agricultural Export Price Changes 5.  Other Export Price Changes

  • Roland-Holst 34 16 January 2013

    Moving to GAMS

    •  The Excel version of 1-2-3 is easily accessible, but must be highly simplified to be tractable.

    •  Using a higher level programming language enables us to include more economic structure and behavior.

    •  The Generalized Algebraic Modeling System (GAMS) is the language of choice for this kind of work.

  • Roland-Holst 35 16 January 2013

    Accessing GAMS

    •  The homepage of the GAMS corporation (www.gams.com) contains a lot of useful information.

    •  From the homepage, a full user guide can be downloaded at www.gams.com/docs/document.htm; the user guide contains the syntax for all GAMS commands and very helpful as a reference when writing GAMS models. Note that the user guide is also available via the Help function in GAMS-IDE.

    •  All readers are advised to study the introductory chapter of this manual when starting to learn the GAMS software.

  • Roland-Holst 36 16 January 2013

    Questions?