Cover Image
close this bookMicrocomputers In Policy Research 4b - Key to Exercises in CGE Modeling Using GAMS (includes software) (IFPRI, 2000, 69 p.)
View the document(introduction...)
View the documentExercise 1: GAMS Code
View the documentExercise A1: GAMS Code
View the documentExercise 2: Mathematical Statement
View the documentExercise 2: GAMS Code
View the documentExercise 3: Mathematical Statement
View the documentExercise 3: GAMS Code
View the documentExercise 4: Mathematical Statement
View the documentExercise 4: GAMS Code
View the documentExercise 5: GAMS Code

Exercise 5: GAMS Code

GAMS 2.50.094 DOS Extended/C

12/10/99 14:41:33 PAGE 1

CGE5


4

*INTRODUCTION ====================================================




In this file, the starting point is CGE4.


The new feature is that the rest of the world has been added. A


CET-Armington specification is used for foreign trade.




The line before any new feature or modification starts with


"*++". However, in the section where values are assigned


to variables and parameters, changes are not signalled.




In the experiment, the impact of a doubling of (initially positive)


foreign savings is explored.



19


20

*SETS ============================================================

21


22

SETS

23


24

AC global set (SAM accounts and other items)

25

/

AGR-A

agricultural activity

26


NAGR-A

non-agricultural activity

27


AGR-C

agricultural commodity

28


NAGR-C

non-agricultural commodity

29


LAB

labor

30


CAP

capital

31


U-HHD

urban household

32


R-HHD

rural household

33


GOV

government

34


S-I

savings-investment

35


YTAX

income tax

36


STAX

sales tax

37

*++


38


TAR

import tariff

39

*++


40


ROW

rest of world

41


TOTAL

total account in SAM

/

42


43

ACNT(AC) all elements in AC except total

44


45

A(AC)

activities

46


/AGR-A, NAGR-A/

47



48

C(AC)

commodities

49


/AGR-C, NAGR-C/

50

*++


51

CE(C)

exported commodities

52


/AGR-C/

53

*++


54

CNE(C)

non-exported commodities

55


/NAGR-C/

56

*++


57

CM(C)

imported commodities

58


/NAGR-C/

59

*++


60

CNM(C)

non-imported commodities

61


/AGR-C/

62



63

F(AC)

factors

64


/LAB, CAP/

65



66

I(AC)

institutions

67


/U-HHD, R-HHD, GOV, ROW/

68



69

H(I)

households

70


/U-HHD, R-HHD/

71

;


72



73

ALIAS(AC,ACP); ALIAS(C,CP); ALIAS(F,FP); ALIAS(I,IP);

74

ACNT(AC) = YES; ACNT('TOTAL') = NO; ALIAS(ACNT,ACNTP);

75


76


77

*PARAMETERS======================================================

78


79

PARAMETERS

80


81

ad(A)

efficiency parameter in the production fn for a

82

alpha(F,A)

share of value-added to factor f in activity a

83

*++


84

aq(C)

Armington function shift parameter for commodity c

85

*++


86

at(C)

CET function shift parameter for commodity c

87

beta(C,H)

share of household consumption spending on commodity c

88

cpi

consumer price index

89

cwts(C)

weight of commodity c in the CPI

90

*++


91

deltaq(C)

Armington function share parameter for commodity c

92

*++


93

deltat(C)

CET function share parameter for commodity c

94

ica(C,A)

qnty of c as intermediate input per unit of activity a

95

*++


96

pwe(C)

export price for c (foreign currency)

97

*++


98

pwm(C)

import price for c (foreign currency)

99

qg(C)

government demand for commodity c

100

qinvbar(C)

base-year qnty of investment demand for commodity c

101

*++


102

rhoq(C)

Armington function exponent for commodity c

103

*++


104

rhot(C)

CET function exponent for commodity c

105

shry(H,F)

share for household h in the income of factor f

106

*++


107

te(C)

export subsidy rate for commodity c

108

theta(A,C)

yield of output c per unit of activity a

109

*++


110

tm(C)

import tariff rate for commodity c

111

tq(C)

rate of sales tax for commodity c

112

tr(I,IP)

transfer from institution ip to institution i

113

ty(H)

rate of income tax for household h

114

;


115



116

*VARIABLES=======================================================

117


118

VARIABLES

119


120

EG

government expenditures

121

*++


122

EXR

exchange rate (dom. currency per unit of for. currency)

123

*++


124

FSAV

foreign savings (foreign currency)

125

IADJ

investment adjustment factor

126

MPS(H)

marginal (and average) propensity to save for household h

127

PA(A)

price of activity a

128

*++


129

PD(C)

domestic price of domestic output c

130

*++


131

PE(C)

export price for c (domestic currency)

132

*++


133

PM(C)

import price for c (domestic currency)

134

*++


135

PQ(C)

composite commodity price for c

136

PVA(A)

value-added price for activity a

137

PX(C)

producer price for commodity c

138

QA(A)

level of activity a

139

*++


140

QD(C)

quantity sold domestically of domestic output c

141

*++


142

QE(C)

quantity of exports for commodity c

143

QF(F,A)

quantity demanded of factor f from activity a

144

QFS(F)

supply of factor f

145

QH(C,H)

quantity consumed of commodity c by household h

146

QINT(C,A)

qnty of commodity c as intermediate input to activity a

147

QINV(C)

quantity of investment demand for commodity c

148

*++


149

QM(C)

quantity of imports of commodity c

150

*++


151

QQ(C)

quantity of goods supplied domestically (composite supply)

152

*++


153

QX(C)

quantity of domestic output of commodity c

154

WALRAS

dummy variable (zero at equilibrium)

155

WF(F)

average price of factor f

156

WFDIST(F,A)

wage distortion factor for factor f in activity a

157

YF(H,F)

transfer of income to household h from factor f

158

YG

government revenue

159

YH(H)

income of household h

160

;


161



162

*EQUATIONS=======================================================

163


164

EQUATIONS

165


166

*PRICE BLOCK+++++++++++++++++++++++++++

167

*++


168

PMDEF(C)

import price for commodity c (domestic currency)

169

*++


170

PEDEF(C)

export price for commodity c (domestic currency)

171

*++


172

ABSORB(C)

absorption for commodity c

173

*++


174

OUTVAL(C)

output value for commodity c

175

PADEF(A)

price for activity a

176

PVADEF(A)

value-added price for activity a

177



178

*PRODUCTION AND COMMODITY BLOCK++++++++

179

PRODFN(A)

Cobb-Douglas production function for activity a

180

FACDEM(F,A)

demand for factor f from activity a

181

INTDEM(C,A)

intermediate demand for commodity c from activity a

182

OUTPUTFN(C)

output of commodity c

183

*++


184

ARMING(C)

composite supply (Armington) function for commodity c

185

*++


186

IMPDOMRAT(C)

import-domestic demand ratio for commodity c

187

*++


188

ARMNM(C)

composite supply for non-imported commodity c

189

*++


190

CET(C)

output transformation (CET) function for commodity c

191

*++


192

EXPDOMRAT(C)

export-domestic supply ratio for commodity c

193

*++


194

CETNE(C)

output transformation for non-exported commodity c

195



196



197

*INSTITUTION BLOCK+++++++++++++++++++++

198

FACTTRNS(H,F)

transfer of income from factor f to h-hold h

199

HHDINC(H)

income of household h

200

HHDEM(C,H)

consumption demand for household h & commodity c

201

INVDEM(C)

investment demand for commodity c

202

GOVREV

government revenue

203

GOVEXP

government expenditures

204



205

*SYSTEM CONSTRAINT BLOCK+++++++++++++++

206

FACTEQ(F)

market equilibrium condition for factor f

207

COMEQ(C)

market equilibrium condition for composite commodity c

208

*++


209

CURACC

current account balance for RoW

210

SAVINV

savings-investment balance

211

PNORM

price normalization

212

;


213



214

*PRICE BLOCK+++++++++++++++++++++++++++

215

*++


216

PMDEF(C)$CM(C)..

PM(C) =E= (1 + tm(C))*EXR*pwm(C);

217

*++


218

PEDEF(C)$CE(C)..

PE(C) =E= (1 - te(C))*EXR*pwe(C);

219

*++


220

ABSORB(C)..

PQ(C)*QQ(C)

221


=E= (PD(C)*QD(C) + (PM(C)*QM(C))$CM(C))*(1 + tq(C));

222

*++


223

OUTVAL(C)..

PX(C)*QX(C) =E= PD(C)*QD(C) + (PE(C)*QE(C))$CE(C);

224



225

PADEF(A)..

PA(A) =E= SUM(C, PX(C)*theta(A,C));

226

*++


227

PVADEF(A)..

PVA(A) =E= PA(A) - SUM(C, PQ(C)*ica(C,A));

228



229



230

*PRODUCTION AND COMMODITY BLOCK++++++++

231



232

PRODFN(A)..

QA(A) =E= ad(A)*PROD(F, QF(F,A)**alpha(F,A));

233



234

FACDEM(F,A)..

WF(F)*WFDIST(F,A) =E= alpha(F,A)*PVA(A)*QA(A)

235


/QF(F,A);

236



237

INTDEM(C,A)..

QINT(C,A) =E= ica(C,A)*QA(A);

238



239

OUTPUTFN(C)..

QX(C) =E= SUM(A, theta(A,C)*QA(A));

240

*++


241

ARMING(C)$CM(C)..

QQ(C) =E= aq(C)*(deltaq(C)*QM(C)**(-rhoq(C))

242


+ (1-deltaq(C))*QD(C)**(-rhoq(C)))**(-1/rhoq(C));

243

*++


244

IMPDOMRAT(C)$CM(C)..

QM(C)/QD(C) =E=

245


( (PD(C)/PM(C))

246


*(deltaq(C)/(1-deltaq(C))) )**(1/(1 + rhoq(C)));

247

*++


248

ARMNM(C)$CNM(C)..

QQ(C) =E= QD(C);

249

*++


250

CET(C)$CE(C)..

QX(C) =E= at(C)*(deltat(C)*QE(C)**rhot(C)

251


+ (1-deltat(C))*QD(C)**rhot(C) )**(1/rhot(C));

252

*++


253

EXPDOMRAT(C)$CE(C)..

QE(C)/QD(C) =E= ( PE(C)/PD(C)

254


*(1-deltat(C))/deltat(C) )**(1/(rhot(C)-1) );

255

*++


256

CETNE(C)$CNE(C)..

QX(C) =E= QD(C);

257



258



259

*INSTITUTION BLOCK+++++++++++++++++++++

260



261

FACTTRNS(H,F)..

YF(H,F)

262


=E= shry(H,F)*SUM(A, WF(F)*WFDIST(F,A)*QF(F,A));

263



264

*++


265

HHDINC(H)..

YH(H) =E= SUM(F, YF(H,F)) + tr(H,'GOV')

266


+ EXR*tr(H,'ROW');

267



268

HHDEM(C,H)..

QH(C,H) =E=

269


beta(C,H)*(1 - MPS(H))*(1 - ty(H))*YH(H)/PQ(C);

270



271

INVDEM(C)..

QINV(C) =E= qinvbar(C)*IADJ;

272

*++


273

GOVREV..

YG =E= SUM(H, ty(H)*YH(H))

274


+ EXR*tr('GOV','ROW')

275


+ SUM(C, tq(C)*(PD(C)*QD(C) + (PM(C)*QM(C))$CM(C)))

276


+ SUM(C$CM(C), tm(C)*EXR*pwm(C)*QM(C))

277


+ SUM(C$CE(C), te(C)*EXR*pwe(C)*QE(C))

278


;

279



280

GOVEXP..

EG =E= SUM(C, PQ(C)*qg(C)) + SUM(H, tr(H,'GOV'));

281


;

282



283



284

*SYSTEM CONSTRAINT BLOCK+++++++++++++++

285



286

FACTEQ(F)..

SUM(A, QF(F,A)) =E= QFS(F);

287

*++


288

COMEQ(C)..

QQ(C) =E= SUM(A, QINT(C,A)) + SUM(H, QH(C,H))

289


+ qg(C) + QINV(C);

290

*++


291

CURACC..

SUM(C$CE(C), pwe(C)*QE(C)) + SUM(I, tr(I,'ROW'))

292


+ FSAV =E= SUM(C$CM(C), pwm(C)*QM(C));

293

*++


294

SAVINV..

SUM(H, MPS(H)*(1 - ty(H))*YH(H)) + (YG - EG)

295


+ EXR*FSAV =E= SUM(C, PQ(C)*QINV(C)) + WALRAS;

296



297

PNORM..

SUM(C, PQ(C)*cwts(C)) =E= cpi;

298



299



300

*MODEL===========================================================

301


302

MODELS

303


304

CGE5 Open-economy model

305

/ALL/

306

;

307


308

*SOCIAL ACCOUNTING MATRIX========================================

309


310

TABLE SAM(AC,ACP) social accounting matrix

311


312


AGR-A

NAGR-A

AGR-C

NAGR-C

LAB

CAP


313

AGR-A



279





314

NAGR-A




394




315

AGR-C

84

55






316

NAGR-C

50

99






317

LAB

72

105






318

CAP

73

135






319

U-HHD





95

125


320

R-HHD





82

83


321

GOV








322

S-I








323

YTAX








324

STAX



10

20




325

TAR




39




326

ROW




105




327









328

+

U-HHD

R-HHD

GOV

S-I

YTAX

STAX

TAR

ROW


329

AGR-A










330

NAGR-A










331

AGR-C

30

49

13

28

30





332

NAGR-C

165

92

67

85






333

LAB










334

CAP










335

U-HHD

25

40








336

R-HHD

5

16








337

GOV

25

30

39

15






338

S-I

70

40

-1

4






339

YTAX

20

5








340

;

341


342

PARAMETER

343

tdiff(AC) column minus row total for account ac;

344


SAM('TOTAL',ACNTP)

= SUM(ACNT, SAM(ACNT,ACNTP));

345


SAM(ACNT,'TOTAL')

= SUM(ACNTP, SAM(ACNT,ACNTP));

346


tdiff(ACNT)

= SAM('TOTAL',ACNT) - SAM(ACNT,'TOTAL');

347


348

DISPLAY SAM, tdiff;

349


350


351

*ASSIGNMENTS FOR PARAMETERS AND VARIABLES========================

352


353

PARAMETERS

354

*The following parameters are used to define initial values of

355

*model variables.

356

EG0, EXR0, FSAV0, IADJ0, MPS0(H), PA0(A), PD0(C), PE0(C), PM0(C),

357

PQ0(C), PVA0(A), PX0(C), QA0(A), QD0(C), QE0(C), QF0(F,A), QFS0(F),

358

QH0(C,H), QINT0(C,A), QINV0(C), QM0(C), QQ0(C), QX0(C), WF0(F),

359

WFDIST0(F,A), YF0(H,F), YG0, YH0(H)

360

;

361


362


363

*FACTOR EMPLOYMENT AND PRICES++++++++++

364


365


366

PARAMETERS

367

labor(A)

quantity of labor employed by activity (no. of workers)

368


/AGR-A 100, NAGR-A 50/

369


370

wfa(F,A)

wage for factor f in activity a (only for calibration)

371

costgap(F,A)

gap calibrated factor cost - SAM value (should be zero)

372

;

373


374

*Defining factor employment and supply

375

QF0('LAB',A)

= labor(A);

376

QF0('CAP',A)

= SAM('CAP',A);

377

QFS0(F)

= SUM(A, QF0(F,A));

378


379

*Computing activity-specific wage

380

wfa(F,A)

= SAM(F,A)/QF0(F,A);

381


382

*Computing average wage

383

WF0(F)

= SUM(A, SAM(F,A))/SUM(A, QF0(F,A));

384


385

*Computing wage distortion factors

386

WFDIST0(F,A)

= wfa(F,A) / WF0(F);

387


388

*Checking calibration

389

costgap(F,A)

= WF0(F)*wfdist(F,A)*QF0(F,A) - SAM(F,A);

390


391

DISPLAY wfa, costgap;

392


393


394


395

*PRICE BLOCK+++++++++++++++++++++++++++

396


397

PARAMETERS

398

sigmaq(C) elasticity of substitution bt. dom goods and imports for c

399

sigmat(C) elasticity of transformation bt. dom sales and exports for c

400

;

401



402

EXR0

= 1;

403

PA0(A)

= 1;

404

PD0(C)

= 1;

405

PE0(C)

= 1;

406

PM0(C)

= 1;

407

PX0(C)

= 1;

408



409

PVA0(A)

= SUM(F, SAM(F,A)) / (SAM(A,'TOTAL')/PA0(A));

410



411

tq(C)

= SAM('STAX',C)

412



/ (SAM('TAR',C) + SAM('ROW',C) + SUM(A, SAM(A,C))

413




- SAM(C,'ROW') );

414

PQ0(C)

= 1 + tq(C);

415



416

QA0(A)

= SAM('TOTAL',A)/PA0(A);

417

QD0(C)

= (SUM(A, SAM(A,C)) - SAM(C,'ROW'))/PD0(C);

418

QE0(C)

= SAM(C,'ROW')/PE0(C);

419

QM0(C)

= (SAM('ROW',C) + SAM('TAR',C))/PM0(C);

420

QQ0(C)

= (SAM('TOTAL',C) - SAM(C,'ROW'))/PQ0(C);

421

QX0(C)

= SUM(A, SAM(A,C))/PX0(C);

422



423

ica(C,A)

= (SAM(C,A)/PQ0(C)) / QA0(A);

424

theta(A,C)

= (SAM(A,C)/PX0(C)) / QA0(A);

425



426

te(C)

= 0;

427

pwe(C)

= PE0(C)/((1 + te(C))*EXR0);

428



429

tm(C)$CM(C)

= SAM('TAR',C)/SAM('ROW',C);

430

pwm(C)$CM(C)

= PM0(C) / ( EXR0*(1 + tm(C)) );

431



432



433

*PRODUCTION AND COMMODITY BLOCK++++++++

434


435

QINT0(C,A)

= SAM(C,A)/PQ0(C);

436



437

alpha(F,A)

= SAM(F,A) / SUM(FP, SAM(FP,A));

438

ad(A)

= QA0(A) / PROD(F, QF0(F,A)**alpha(F,A));

439



440

sigmat(C)

= 2.0;

441

sigmaq(C)

= 0.7;

442

rhot(C)

= 1/sigmat(C) + 1;

443

rhoq(C)

= 1/sigmaq(C) - 1;

444



445

deltat(C)$CE(C)

= 1/(1 + (PD0(C)/PE0(C))*(QE0(C)/QD0(C))**(rhot(C)-1));

446



447

at(C)$CE(C)

= QX0(C) / ( deltat(C)*QE0(C)**rhot(C)

448


+ (1-deltat(C))*QD0(C)**rhot(C) )**(1/rhot(C));

449



450

deltaq(C)$CM(C)

= 1/(1 + (PD0(C)/PM0(C))*(QD0(C)/QM0(C))**(1+rhoq(C)));

451



452

aq(C)$CM(C)

= QQ0(C) / (deltaq(C)*QM0(C)**(-rhoq(C))

453


+ (1-deltaq(C))*QD0(C)**(-rhoq(C)))**(-1/rhoq(C));

454



455



456

*INSTITUTION BLOCK+++++++++++++++++++++

457



458

EG0

= SAM('TOTAL','GOV') - SAM('S-I','GOV');

459

FSAV0

= SAM('S-I','ROW')/EXR0;

460

IADJ0

= 1;

461

MPS0(H)

= SAM('S-I',H) / (SAM('TOTAL',H) - SAM('YTAX',H));

462

QH0(C,H)

= SAM(C,H)/PQ0(C);

463

QINV0(C)

= SAM(C,'S-I')/PQ0(C);

464

YF0(H,F)

= SAM(H,F);

465

YG0

= SAM('GOV','TOTAL');

466

YH0(H)

= SAM('TOTAL',H);

467



468

beta(C,H)

= SAM(C,H)/SUM(CP, SAM(CP,H));

469

qg(C)

= SAM(C,'GOV')/PQ0(C);

470

qinvbar(C)

= SAM(C,'S-I')/PQ0(C);

471

shry(H,F)

= SAM(H,F) / SAM('TOTAL',F);

472

tr(H,'GOV')

= SAM(H,'GOV');

473

tr(I,'ROW')

= SAM(I,'ROW')/EXR0;

474

ty(H)

= SAM('YTAX',H) / SAM('TOTAL',H);

475



476



477

*SYSTEM CONSTRAINT BLOCK+++++++++++++++

478



479

cwts(C)

= SUM(H, SAM(C,H)) / SUM((CP,H), SAM(CP,H));

480

cpi

= SUM(C, cwts(C)*PQ0(C));

481



482



483

*INITIALISATION==================================================

484



485

EG.L

= EG0;

486

EXR.L

= EXR0;

487

FSAV.L

= FSAV0;

488

IADJ.L

= IADJ0;

489

MPS.L(H)

= MPS0(H);

490

PA.L(A)

= PA0(A);

491

PD.L(C)

= PD0(C);

492

PE.L(C)

= PE0(C);

493

PM.L(C)

= PM0(C);

494

PQ.L(C)

= PQ0(C);

495

PVA.L(A)

= PVA0(A);

496

PX.L(C)

= PX0(C);

497

QA.L(A)

= QA0(A);

498

QD.L(C)

= QD0(C);

499

QE.L(C)

= QE0(C);

500

QF.L(F,A)

= QF0(F,A);

501

QFS.L(F)

= QFS0(F);

502

QH.L(C,H)

= QH0(C,H);

503

QINT.L(C,A)

= QINT0(C,A);

504

QINV.L(C)

= QINV0(C);

505

QM.L(C)

= QM0(C);

506

QQ.L(C)

= QQ0(C);

507

QX.L(C)

= QX0(C);

508

WF.L(F)

= WF0(F);

509

WFDIST.L(F,A)

= WFDIST0(F,A);

510

YF.L(H,F)

= YF0(H,F);

511

YG.L

= YG0;

512

YH.L(H)

= YH0(H);

513


514

*DISPLAY+++++++++++++++++++++++++++++++

515


516


517

DISPLAY

518

ad, alpha, aq, at, beta, deltaq, deltat, cpi, cwts, ica,

519

pwe, pwm, shry, theta, qg, qinvbar, rhoq,

520

rhot, te, sigmaq, sigmat, tm, tq, tr, ty,

521


522

EG.L, EXR.L, FSAV.L, IADJ.L, MPS.L, PA.L, PD.L, PE.L, PM.L,

523

PQ.L, PVA.L, PX.L, QA.L, QD.L, QE.L, QF.L, QFS.L, QH.L, QINT.L,

524

QINV.L, QM.L, QQ.L, QX.L, WF.L, WFDIST.L, YF.L, YG.L, YH.L

525

;

526


527


528

*SELECTING CLOSURES++++++++++++++++++++

529


530

*SAVINGS-INVESTMENT BALANCE

531


532

SCALAR

533

SICLOS savings-investment closure /1/

534

*Select 1 or 2

535

*if SICLOS = 1, savings is investment-driven

536

*if SICLOS = 2, investment is savings-driven

537


538

IF(SICLOS EQ 1,

539

*Investment-driven savings -- MPS('U-HHD') is flexible, permitting

540

*the savings value to adjust.

541

IADJ.FX

= IADJ0;

542

MPS.FX('R-HHD')

= MPS0('R-HHD');

543

MPS.LO('U-HHD')

= -INF;

544

MPS.UP('U-HHD')

= +INF;

545

MPS.L('U-HHD')

= MPS0('U-HHD');

546

);

547


548

IF(SICLOS EQ 2,

549

*Savings-driven investment -- IADJ is flexible, permitting

550

*investment quantities and the investment value to adjust.

551

MPS.FX(H)

= MPS0(H);

552

IADJ.LO

= -INF;

553

IADJ.UP

= +INF;

554

IADJ.L

= IADJ0;

555

);

556


557


558

*FACTOR MARKETS

559

*For each factor, fix (A + 1) quantity and-or price variables

560


561

SCALARS


562

CAPCLOS

closure for capital market /2/

563

*Select 1 or 2

564

*if CAPCLOS

= 1, capital is mobile and fully employed

565

*if CAPCLOS

= 2, capital is activity-specific and fully employed

566


567

LABCLOS

closure for labor market /2/

568

*Select 1 or 2

569

*if LABCLOS

= 1, labor is mobile and fully employed

570

*if LABCLOS

= 2, labor is mobile and unemployed (fixed wages)

571


572


573

IF(CAPCLOS EQ 1,

574

*Capital is fully employed and mobile. WF('CAP') is the market-clearing

575

*variable for the unified capital market.

576


577

WFDIST.FX('CAP',A)

= WFDIST0('CAP',A);

578



579

WF.LO('CAP')

= -INF;

580

WF.UP('CAP')

= +INF;

581

WF.L('CAP')

= WF0('CAP');

582



583

QF.LO('CAP',A)

= -INF;

584

QF.UP('CAP',A)

= +INF;

585

QF.L('CAP',A)

= QF0('CAP',A);

586



587

QFS.FX('CAP')

= QFS0('CAP');

588

);


589



590

IF(CAPCLOS EQ 2,

591

*Capital is fully employed and activity-specific.

592

*WFDIST('CAP',A) is the market-clearing variable, one for

593

*each segment of the capital market.

594


595

WFDIST.LO('CAP',A)

= -INF;

596

WFDIST.UP('CAP',A)

= +INF;

597

WFDIST.L('CAP',A)

= WFDIST0('CAP',A);

598



599

WF.FX('CAP')

= WF0('CAP');

600



601

QF.FX('CAP',A)

= QF0('CAP',A);

602



603

QFS.LO('CAP')

= -INF;

604

QFS.UP('CAP')

= +INF;

605

QFS.L('CAP')

= QFS0('CAP');

606

);


607


608

IF(LABCLOS EQ 1,

609

*Labor is fully employed and mobile. WF('LAB') is the market-clearing

610

*variable for the unified capital market.

611


612

WFDIST.FX('LAB',A)

= WFDIST0('LAB',A);

613



614

WF.LO('LAB')

= -INF;

615

WF.UP('LAB')

= +INF;

616

WF.L('LAB')

= WF0('LAB');

617



618

QF.LO('LAB',A)

= -INF;

619

QF.UP('LAB',A)

= +INF;

620

QF.L('LAB',A)

= QF0('LAB',A);

621



622

QFS.FX('LAB')

= QFS0('LAB');

623

);


624


625

IF(LABCLOS EQ 2,

626

*Labor is unemployed and mobile. For each activity, the wage,

627

*WFDIST('LAB',A)*WF('LAB'), is fixed. QFS('LAB') is the market-clearing

628

*variable for the unified labor market.

629


630

WFDIST.FX('LAB',A)

= WFDIST0('LAB',A);

631



632

WF.FX('LAB')

= WF0('LAB');

633



634

QF.LO('LAB',A)

= -INF;

635

QF.UP('LAB',A)

= +INF;

636

QF.L('LAB',A)

= QF0('LAB',A);

637



638

QFS.LO('LAB')

= -INF;

639

QFS.UP('LAB')

= +INF;

640

QFS.L('LAB')

= QFS0('LAB');

641

);


642



643



644

*THE FOREIGN EXCHANGE MARKET

645


646

SCALAR

647

ROWCLOS rest-of-world closure /1/

648

*Select 1 or 2

649

*if ROWCLOS = 1, exchange rate is flexible

650

*if ROWCLOS = 2, foreign savings is flexible

651

;

652


653

IF(ROWCLOS EQ 1,

654

*Foreign savings is fixed. A flexible exchange rate clears

655

*the current account of the balance of payments.

656

FSAV.FX

= FSAV0;

657

EXR.LO

= -INF;

658

EXR.UP

= +INF;

659

EXR.L

= EXR0;

660

);

661


662

IF(ROWCLOS EQ 2,

663

*The exchange rate is fixed. Flexible foreign savings clears

664

*the current account of the balance of payments.

665

EXR.FX

= EXR0;

666

FSAV.LO

= -INF;

667

FSAV.UP

= +INF;

668

FSAV.L

= FSAV0;

669

);


670


671


672

DISPLAY SICLOS, CAPCLOS, LABCLOS, ROWCLOS;

673


674


675

*SOLVE STATEMENT FOR BASE========================================

676


677

CGE5.HOLDFIXED = 1;

678


679

*SOLVE CGE5 USING MCP;

680


681


682

*REPORT SETUP AND BASE REPORT====================================

683


684

*SET AND PARAMETERS FOR REPORTS++++++++

685


686


687

SET

688


SIM

simulations

689


/

BASE

base simulation

690



PWEINCR

increase in agricultural export price/

691


692

ACGDP GDP items

693

/

694

GDPMP1

GDP at market prices (from spending side)

695

PRVCON

private consumption

696

GOVCON

government consumption

697

INVEST

investment

698

EXP

exports of goods and servicers

699

IMP

imports of goods and servicers

700

NITAX

net indirect taxes

701

GDPFC

GDP at factor prices

702

GDPMP2

GDP at market prices (from income side)

703

GDPGAP

gap bt alternative calculations for GDP at market prices

704

/

705


706

ACGDP1(ACGDP) components of GDP at market prices

707

/

708

PRVCON

private consumption

709

GOVCON

government consumption

710

INVEST

investment

711

EXP

exports of goods and servicers

712

IMP

imports of goods and servicers

713

/

714


715


716

PARAMETERS


717



718

PWEAGRSIM(SIM)

agr'al export price (for curr) (experiment par.)

719

PWEREP(C,SIM)

export price for commodity c (value used)

720



721

EGREP(SIM)

government expenditures

722

EXRREP(SIM)

exchange rate (dom. cur. per unit of for. cur.)

723

FSAVREP(SIM)

foreign savings (foreign currency)

724

IADJREP(SIM)

investment adjustment factor

725

MPSREP(H,SIM)

marginal (and avg) propensity to save for household h

726

PAREP(A,SIM)

price of activity a

727

PDREP(C,SIM)

domestic price of domestic output c

728

PEREP(C,SIM)

export price for c (domestic currency)

729

PMREP(C,SIM)

import price for c (domestic currency)

730

PQREP(C,SIM)

composite commodity price for c

731

PVAREP(A,SIM)

value-added price for activity a

732

PXREP(C,SIM)

producer price for commodity c

733

QAREP(A,SIM)

level of activity a

734

QDREP(C,SIM)

quantity sold domestically of domestic output c

735

QEREP(C,SIM)

quantity of exports for commodity c

736

QFREP(F,A,SIM)

demand for factor f from activity a

737

QFSREP(F,SIM)

supply of factor f for sim

738

QHREP(C,H,SIM)

consumption of commodity c by household h

739

QINTREP(C,A,SIM)

qnty of commodity c as intermed. input for activity a

740

QINVREP(C,SIM)

quantity of investment by commodity of origin c

741

QMREP(C,SIM)

quantity of imports for commodity c

742

QQREP(C,SIM)

quantity of goods supplied domestically ("composite supply")

743

QXREP(C,SIM)

quantity of domestic output of commodity c

744

WFREP(F,SIM)

average price of factor f

745

WFAREP(F,A,SIM)

price of factor f for activity a

746

WFDISTREP(F,A,SIM)

wage distortion factof for factor f in activity a

747

YFREP(H,F,SIM)

income of household h from factor f

748

YGREP(SIM)

government revenue

749

YHREP(H,SIM)

income of household h

750

WALRASREP(SIM)

dummy variable (zero at equilibrium)

751



752

GDPREP(*,SIM)

nominal GDP data

753

;


754



755

PWEAGRSIM('BASE')

= pwe('AGR-C');

756

PWEAGRSIM('PWEINCR')

= 1.25*pwe('AGR-C');

757



758

DISPLAY PWEAGRSIM;


759



760



761

LOOP(SIM,

762


763

pwe('AGR-C')

= PWEAGRSIM(SIM);

764


765


766

SOLVE CGE5 USING MCP;

767


768


769

PWEREP(CE,SIM)

= pwe(CE);

770



771

EGREP(SIM)

= EG.L;

772

EXRREP(SIM)

= EXR.L;

773

FSAVREP(SIM)

= FSAV.L;

774

IADJREP(SIM)

= IADJ.L;

775

MPSREP(H,SIM)

= MPS.L(H);

776

PAREP(A,SIM)

= PA.L(A);

777

PDREP(C,SIM)

= PD.L(C);

778

PEREP(CE,SIM)

= PE.L(CE);

779

PMREP(CM,SIM)

= PM.L(CM);

780

PQREP(C,SIM)

= PQ.L(C);

781

PVAREP(A,SIM)

= PVA.L(A);

782

PXREP(C,SIM)

= PX.L(C);

783

QAREP(A,SIM)

= QA.L(A);

784

QDREP(C,SIM)

= QD.L(C);

785

QEREP(CE,SIM)

= QE.L(CE);

786

QFREP(F,A,SIM)

= QF.L(F,A);

787

QFSREP(F,SIM)

= QFS.L(F);

788

QHREP(C,H,SIM)

= QH.L(C,H);

789

QINTREP(C,A,SIM)

= QINT.L(C,A);

790

QINVREP(C,SIM)

= QINV.L(C);

791

QMREP(CM,SIM)

= QM.L(CM);

792

QQREP(C,SIM)

= QQ.L(C);

793

QXREP(C,SIM)

= QX.L(C);

794

WFREP(F,SIM)

= WF.L(F);

795

WFAREP(F,A,SIM)

= WF.L(F)*WFDIST.L(F,A);

796

WFDISTREP(F,A,SIM)

= WFDIST.L(F,A);

797

YFREP(H,F,SIM)

= YF.L(H,F);

798

YGREP(SIM)

= YG.L;

799

YHREP(H,SIM)

= YH.L(H);

800



801

WALRASREP(SIM)

= WALRAS.L;

802



803

*GDP data


804

GDPREP('PRVCON',SIM)

= SUM((C,H), PQ.L(C)*QH.L(C,H)) ;

805

GDPREP('GOVCON',SIM)

= SUM(C, PQ.L(C)*qg(C));

806

GDPREP('INVEST',SIM)

= SUM(C, PQ.L(C)*QINV.L(C));

807

GDPREP('EXP',SIM)

= SUM(C, EXR.L*pwe(C)*QE.L(C));

808

GDPREP('IMP',SIM)

= - SUM(C, EXR.L*pwm(C)*QM.L(C));

809

GDPREP('GDPFC',SIM)

= SUM((F,A), WF.L(F)*WFDIST.L(F,A)*QF.L(F,A));

810

GDPREP('NITAX',SIM)


811

= SUM(C, tq(C)*(PD.L(C)*QD.L(C) + (PM.L(C)*QM.L(C))$CM(C)))

812

+ SUM(C$CM(C), tm(C)*EXR.L*pwm(C)*QM.L(C))

813

+ SUM(C$CE(C), te(C)*EXR.L*pwe(C)*QE.L(C));

814


815

);

816


817

*Processing GDP data


818

GDPREP('GDPMP1',SIM)

= SUM(ACGDP1, GDPREP(ACGDP1,SIM));

819

GDPREP('GDPMP2',SIM)

= GDPREP('GDPFC',SIM) + GDPREP('NITAX',SIM);

820

GDPREP('GDPGAP',SIM)

= GDPREP('GDPMP1',SIM) - GDPREP('GDPMP2',SIM);

821



822



823

OPTION

QFREP:3:1:1, QHREP:3:1:1, QINTREP:3:1:1, WFAREP:3:1:1,

824


WFAREP:3:1:1, WFDISTREP:3:1:1, YFREP:3:1:1

825


;

826


827

DISPLAY

828

PWEREP, EGREP, EXRREP, FSAVREP, IADJREP, MPSREP, PAREP, PDREP, PEREP,

829

PMREP, PQREP, PVAREP, PXREP, QAREP, QDREP, QEREP, QFREP, QFSREP, QHREP,

830

QINTREP, QINVREP, QMREP, QQREP, QXREP, WFREP, WFAREP, WFDISTREP, YFREP,

831

YGREP, YHREP, WALRASREP, GDPREP

832

;