Professional Documents
Culture Documents
8 Things To Know
8 Things To Know
8 Things To Know
net/publication/5144373
CITATIONS READS
17 286
3 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Hans M Amman on 29 May 2014.
P. Ruben Mercado
David Kendrick
and
Hans Amman*
Department of Economics
The University of Texas at Austin
Austin, TX, May 1997
2
Suppose that we want to solve the simple macroeconomic model shown below:
y= c+i
c = ay + b
i = 100
PARAMETERS
i investment ;
i = 100;
VARIABLES
y income
c consumption
j performance index
EQUATIONS
eq1 first equation
eq2 second equation
eqj performance index eq ;
eqj.. j =E= 0;
eq1.. y =E= c + i;
eq2.. c =E= a * y + b;
3
4
4
7
i-v ix-x
vi-viii
xi xii
v viii ix x
Equations
i) GDP identity
Y = C+ I+ G+X
ii) Disposable Income
Yd = (1- t) Y
iii) Consumption
C = a + b Yd
iv) Investment
I = e-dR
v) Money Demand
M/P = k Y - h R
vi) Expected Inflation
e
= -1 + -2
vii) Inflation Rate
e
= + f {(Y-1 - YN) / YN}
viii) Price Level
P = P-1 (1 + )
ix) Real Exchange Rate
E P / Pw = q + v R
x) Net Exports
X = g - m Y - n E P / Pw
xi) Government Deficit
Gd = G - t Y
(.up) and its marginal or dual value (.m). Since our values of interest in this example are the levels of x
and y, we display them as x.l and y.l respectively.
5
There are two programs containing the GAMS representation of this model. One program is for
simulation (TM1SIM.GMS) and the other for policy analysis (TM1POL.GMS). Both programs will be
available from http://www.fee.uva.nl/vak_groep/macro/amman/htm. Program TM1SIM.GMS is also in
Appendix 1 of this article.
6
See Hall and Taylor, 1993. Though its building blocks are developed throughout the book, the whole
7
5
a= b= d= e= f = g= h= k=
m= n= q= t= v= ; = = =
Different strategies can be followed when one is confronted with the problem of
solving and performing policy experiments with a model like this.8 In the following, we
will review some of them.
8
Models with backward looking expectations, as the one we are dealing with in this section, are also
6
VARIABLES
Y(t) gdp
Yd(t) disposable income
10
9
To avoid notational conflicts in the GAMS statement, parameters e, g, m and t have been renamed as
ee, gg, mm and tax, respectively.
10
To learn more about temporal specifications in GAMS, read Brooke et al. (1992), Chapter 12. Also see
7
t = {0,1,2,3}
11
Notice that eq6(t+2) goes from periods 2 to 6, while pi(t) goes from 0 to 4, pi(t+1)
from 1 to 5, and piex(t+2) from 2 to 6. This means that the effective solution horizon for
12
12
In the same way, we can also define terminal conditions subsets. These conditions become necessary
in models containing rational expectations, as we will see later. For instance, terminal conditions for the
last and the previous to the last period could be written by defining two new subsets - for example, tf(t)
9
To perform simulations with this model we just have to change the values of the
policy and/or exogenous variables or the parameter values, and compare the different
dynamic solution paths obtained for the endogenous variables.
Where GAMS reveals itself as a very powerful tool is in optimal policy analysis.
This analysis is, in a way, the reverse of simulation. Instead of determining the paths of the
endogenous variables given values for the policy variables, we now want to determine the
optimal path for the policy variables given target paths and relative weights for target
variables. This can be easily done by adding a loss function as an extra equation to the
model and by redefining the policy variables of interest as endogenous variables. For
example, in the GAMS statement above, we can add the following quadratic loss function:
where Ytar and Ptar are pre-specified target values for output and the price level, and
where Wy and Wp are weights on the deviations from target values of output and the
price level respectively.13
15
16
13
Since the variables entering the loss function (GDP and the price level) are measured in different units,
it is convenient to impose some normalization on the weights. For instance, if Ytar = 6000 and Ptar = 1,
to equally penalize deviations from target we could set Wy = 1, and then obtain the corresponding
normalized Wp as:
Wp = 60002 / 12 = 3600000
Then, if we decide to care about deviations from Ytar twice as much as for deviations from Ptar, we will
choose Wy = 2 and Wp = 3600000, or Wy = 1 and Wp = 1800000, etc. For a full discussion of weighting
procedures see Park (1997).
14
There are two programs containing the GAMS representation of this model. One program is for
simulation (TM2SIM.GMS) and the other for policy analysis (TM2POL.GMS). Both programs will be
available from http://www.fee.uva.nl/vak_groep/macro/amman/htm. Program TM2POL.GMS is also in
Appendix 2 of this article.
15
See Taylor (1993), Chapter 1. Earlier versions of this model can be found in Carlozzi and Taylor
(1985), which contains extended explanations of its inner workings, and in Taylor (1985), which also
contains policy coordination experiments in a difference games framework.
16
These models are also presented in Taylor (1993).
10
17
Equations
2 2 2
1 A) xt = 3
wt +i + 1
3
pt +i + 3
yt +i
i =0 i =0 i =0
2
2 A) wt = 1
3
xt i
i=0
3A) pt = wt
4A) yt = d rt
5A) mt pt = b it + a yt
6 A) rt = i t pt +1 + p t
Variables
xt = contract wage
wt = average wage
pt = price level (the expected inflation rate is defined as t = pt +1 pt )
yt = output
it = nominal interest rate
rt = real interest rate
mt = money stock
a b d
This is a linear model in which all the variables - except the inflation and interest
rates - are logarithms and are deviations from means or secular trends. This way of
expressing variables is a common practice in empirical macroeconomics. It facilitates the
work of econometric estimation and the analysis of results, since all variables are
expressed in percentage points.18
17
For a detailed presentation of each of the equations you are referred to Taylor (1993).
18
For a practical introduction to linearization techniques, see Mercado and Kendrick (1997). For an
extended treatment of this topic, see Amman and Kendrick (1996); Dixon et al. (1992), Chapter 3; and
Kendrick (1990), Chapter 4.
11
19
20
21
19
For an extended coverage of this kind of methods, see Azariadis (1993), Blanchard and Khan (1980),
Wallis (1980) and Pesaran (1987).
20
See Hughes-Hallet and Rees (1983).
21
12
22
23
24
25
26
VARIABLES
x(t) contract wage
w(t) average wage
22
23
24
25
26
13
EQUATIONS
eq1x(t) staggered wage-setting
eq2w(t) average wage
27
27
As in the previous section, it is recommended to set the GAMS OPTION LMROW equal to the
14
instead of using t, t+1 and t+2 indices, it will be troublesome to properly assign the
corresponding initial values for x(t-1) and x(t-2) and to interpret the solution values of the
model for the first two periods. Also, if we write:
instead of using the index t+4 for eq1x(.), it will be troublesome to properly assign the
corresponding terminal values for w(t+3), w(t+4), p(t+3), p(t+4), y(t+3) and y(t+4) and to
interpret the solution values of the model for the last two periods.
28
28
See Azariadis (1993), Chapter 4.
15
29
where
30
rt = ar pt
31
29
See note 9.
30
See Kydland and Prescott (1977), and Taylor (1993).
31
If we are interested in comparing the performance of different rules, we will have to make sure that
16
SCALARS
vary variance of GDP /0/
varp variance of the price level /0/
acvary accumulated variance of GDP /0/
acvarp accumulated variance price level /0/
avstdy average std. deviation of GDP /0/
avstdp average std. deviation of the price level /0/
SETS
k index for Monte Carlo runs / 1*10 /;
LOOP(k,
vary = 0; varp = 0;
shock(t) = normal(0, 0.1);
Notice that the shocks are transitory and with zero mean. Then, the steady-state of
the model will not be affected by them, and neither will be the terminal conditions.
Concluding Comments
32
Notice that there is no semicolon between the final statement in the LOOP and the parenthesis that
closes it.
17
Appendix 1
***********************************************************
* CHANGE IN POTENTIAL GNP (notice that the natural rate of
* unemployment remains the same)
***********************************************************
SETS
TS3(T) periods for shock 3 / 4*15 / ;
Ynper(TS3) = 0.0;
****************************
* CHANGE IN FOREIGN PRICES
****************************
SETS
TS4(T) periods for shock 4 / 4*15 / ;
Pwper(TS4) = 0.0;
* Transformation of shocks in % changes into shocks in levels
M(TS1) = 900 * (1 + Mper(TS1)) ;
G(TS2) = 1200 * (1 + Gper(TS2)) ;
Yn(TS3) = 6000 * (1 + Ynper(TS3)) ;
Pw(TS4) = 1 * (1 + Pwper(TS4)) ;
* reporting policy and exogenous variables values used for the simulation
PARAMETER REPORTEX POLICY AND EXOGENOUS VARIABLES VALUES;
REPORTEX(T,"Money") = M(T);
REPORTEX(T,"Gov. Exp.") = G(T);
REPORTEX(T,"Pot. GDP") = Yn(T);
REPORTEX(T,"Fgn Price") = Pw(T);
***********************************************************************
* SECTION 4: COMPUTATION OF SOLUTION
***********************************************************************
PARAMETERS
Un(T) natural rate of unemployment ;
Un(T) = 0.05 ;
VARIABLES
Y(T) gdp
Yd(T) disposable income
C(T) consumption
I(T) investment
R(T) interest rate
P(T) price level
pi(T) inflation rate
piex(T) expected inflation rate
E(T) nominal exchange rate
X(T) net exports
Gd(T) government deficit
U(T) unemployment rate
J2 performance index
EQUATIONS
eq1(T) gdp identity
eq2(T) disposable income
eq3(T) consumption
eq4(T) investment
eq5(T) money demaeq
eq6(T) expected inflation
eq7(T) inflation rate
eq8(T) price level
eq9(T) real exchange rate
eq10(T) net exports
eq11(T) government deficit
20
JD2(t).. J2 =E= 0 ;
eq1(t+2).. Y(t+2) =E= C(t+2) + I(t+2) + G(t+2) + X(t+2) ;
eq2(t+2).. Yd(t+2) =E= (1 - tax) * Y(t+2) ;
eq3(t+2).. C(t+2) =E= a + b * Yd(t+2) ;
eq4(t+2).. I(t+2) =E= ee - d * R(t+2) ;
eq5(t+2).. M(t+2) / P(t+2) =E= k * Y(t+2) - h * R(t+2) ;
eq6(t+2).. piex(t+2)=E= alpha * pi(t+1) + beta * pi(t) ;
eq7(t+2).. pi(t+2) =E= piex(t+2) + f * (Y(t+1) - Yn(t+2)) / Yn(t+2) ;
eq8(t+2).. P(t+2) =E= P(t+1) * (1 + pi(t+2)) ;
eq9(t+2).. E(t+2) * P(t+2) / Pw(t+2) =E= q + v * R(t+2) ;
eq10(t+2).. X(t+2) =E= gg - mm * Y(t+2) - n * ( E(t+2) * P(t+2) / Pw(t+2)) ;
eq11(t+2).. Gd(t+2) =E= G(t+2) - tax * Y(t+2) ;
eq12(t+2).. U(t+2) =E= Un(t+2) - mu * (Y(t+2) - Yn(t+2)) / Yn(t+2) ;
***********************************************************************
* In what follows, we will assign initial variables’ values and lower bounds
* WARNING: The order of declaration of assignments is very important
* Successive assignments to a same variable undo the previous ones
***********************************************************************
* Guess of initial values for the solution algorithm
* Without them, the problem will be declared "infeasible"
* That is, the algorithm will converge to a solution from some initial
* positions but not from others
* This is common in nonlinear problems
R.L(T+2) = 0.09 ; Y.L(T+2) = 6500 ; E.L(T+2) = 1.2 ; C.L(T+2) = 4500 ;
I.L(T+2) = 900 ; X.L(T+2) = -100 ; Gd.L(T+2) = 75 ; U.L(T+2) = 0.07 ;
Yd.L(T+2) = 4875 ; pi.L(T+2) = 0.1 ; piex.L(T+2) = 0.2 ; P.L(T+2) = 1.1 ;
* lower bound for p, to avoid division by zero
P.LO(T) = 0.0001 ;
* fixing initial steady-state values for lagged endogenous variables
P.FX(T1) = 1 ; pi.FX(T0) = 0 ; pi.FX(T1) = 0 ; Y.FX(T1) = 6000 ;
Appendix 2
SCALARS
ar rule parameter / 0.6 / ;
SCALARS
del / 0.5 /
gam / 1 /
d / 1.2 /
b / 4 /
a / 1 /;
22
* Defining supply shock which is used later in the Monte Carlo runs
* with the LOOP statement
PARAMETERS
shock(t) ;
VARIABLES
x(t) contract wage
w(t) average wage
p(t) price level
y(t) GDP
i(t) nominal interest rate
m(t) money supply
j1 performance index
EQUATIONS
eq1ax(t) staggered wage-setting home
eq2aw(t) average wage home
eq3ap(t) mark-up pricing home
eq4ay(t) IS curve home
eq5am(t) LM curve home
eq6ai(t) interest rate home
jd performance index definition ;
jd.. j1 =E= 0 ;
* Terminal conditions
p.fx(tf) = 0 ; p.fx(tf1) = 0 ; w.fx(tf) = 0; w.fx(tf1)= 0;
y.fx(tf)= 0; y.fx(tf1)=0 ;
* Initial conditions
x.fx(t0) = 0; x.fx(t1) = 0;
23
SCALARS
vary variance of GDP /0/
varp variance of the price level /0/
acvary accumulated variance of GDP /0/
acvarp accumulated variance price level /0/
avstdy average std. deviation of GDP /0/
avstdp average std. deviation of the price level / 0 / ;
SETS
k index for Monte Carlo runs / 1*10 /;
LOOP(k,
vary = 0; varp = 0;
shock(t) = normal(0, 0.1);
* The closed parenthesis just above is the closing parenthesis for the
* "LOOP" statement above
* Displaying results
Bibliographical References
Amman, H. and D. Kendrick (1995), The DUALI/DUALPC Software for Optimal Control
, Center for Applied Research in Economics, The
University of Texas, TP 92-03.
Intertemporal Macroeconomics
Econometrica
, The Scientific
Press.
Macroeconomics
,
Department of Economics, The University of Texas at Austin.
25
Econometrica
Econometrica