Computational Economics (2005) 26: 91–106 DOI: 10.1007/s10614-005-7751-x
C
Springer 2005
Solving Rational-Expectations Models through the Anderson-Moore Algorithm: An Introduction to the Matlab Implementation PAOLO ZAGAGLIA Department of Economics, Stockholm University, Universitetsv¨agen 10A, 20136 Stockholm, Sweden; Universit`a Bocconi, via Sarfatti 25, Milano, Italy; E-mail:
[email protected] Accepted 24 May 2005 Abstract. The Anderson-Moore algorithm provides a well-established solution method for systems of linear rational expectations equations. The purpose of this paper is to support a wider use of the algorithm by describing two sets of Matlab routines that allow its practical implementation. The emphasis is on the structures that should be modified to tailor the programs to one’s needs. I present the application of the algorithm for the solution of a version of [Coenen, G. and V. Wieland, ECB Working Paper, No. 30 (2000)]’s macroeconometric model of the Euro area. Key words: computational methods, rational expectations, software JEL Classification: C88; E17; C63
1. Introduction In modern economic research, situations often arise when one needs to compute solutions of alternative models. To this end, the speed, computational efficiency, and flexibility of solution methods represent key features in establishing their usefulness. The algorithm developed in Anderson and Moore (1985) – the AMA, also called shooting method – has emerged as a powerful tool for the analysis of linear rational expectations models. Most of the work with the AMA is carried out within the Federal Reserve System. This implies both that research involving the use of the shooting method has tended to focus on monetary policy issues, and that limited knowledge of the functioning of the algorithm seems to be shared by outside economists. Also, various authors, working in isolation, have produced a wide array of programs that apply the AMA. This tendency has motivated the use of the moniker AIM to indicate author-suited packages written with assumptions and conventions somewhat different from one another. The purpose of this paper is to support a widespread use of the AMA by presenting some of the software available for its implementation. Two sets of Matlab
92
P. ZAGAGLIA
routines are currently downloadable free of charge from the web: www.bos.frb.org/economic/econbios/fuhrer/matlab.htm www.federalreserve.gov/pubs/oss/oss4/aimindex.html
In what follows, I refer to the former as the BOS package, and to the latter as the FRB version. The plan for the paper is as follows. Section 2 states the mathematical problem involved in the solution of rational-expectations equations, and outlines the solution strategy entailed in the AMA. Then, I discuss the structure of the Matlab packages – Section 3. In Section 4, I describe the input files that the user should create and run to solve models. Section 5 outlines the interpretation of the output from the model solution. Section 6 deals with the statistical analysis of linear rational-expectations models though the BOS routines. Finally, I present the application of the AMA for the solution of a forward-looking macroeconometric model proposed in Coenen and Wieland (2000) – Section 7. The behavioral equations of the model are reviewed in Appendix A. 2. How the AMA Works 2.1.
THE PROBLEM
The AMA is suited for solving structural models with rational expectations expressed as: 0
G i xt+i +
i=−τ
θ
Fi Et [xt+i ] = εt
τ >0
θ >0
(1)
i=1
The vector xt contains all the variables, irrespective of whether they have an endogenous, an exogenous or a predetermined nature. Both Fi and G i denote square matrices. The structural shock term εt is assumed to have mean zero. Equation (1) is the so-called structural representation of the model. Past observations from lag τ to lag 1 are used in the solution process in the form of initial explicit constraints. The specification of Equation (1) can also be modified to include constant terms. Two strategies can be followed to handle this extension. The variables can be cast as deviations from either steady-states or equilibrium values which are, in turn, given by the constants. The other option consists in adding one new variable x¯ along with one equation in the form of a dynamic equality for each constant c: x¯ t = x¯ t−1 x¯ t−1 = c I should point out that the AMA can handle expectations formed rationally conditional on time t, t − 1, . . . t − k, k > 0 information by solving the same
SOLVING RATIONAL-EXPECTATIONS MODELS THROUGH THE ANDERSON-MOORE
93
type of saddle-point problem. Without loss of generality, I shall consider only expectations based on time-t information sets. After leading the structural representation, and taking expectations, one obtains a homogenous system of forward-looking equations: θ
Hi Et [xt+k+i ] = 0
k≥0
(2)
i=−τ
I will refer to the Hi ’s as structural coefficient matrices. The AMA can then be applied to obtain the solution of Equation (2) as a function of the expectations of the past and the present. 2.2.
A SKETCH OF THE SOLUTION PROCEDURE
The AMA finds out about the existence of either unique or multiple solutions to Equation (2). The steps undertaken in the method involve: 1. A full-rank linear transformation of a stacked system of lags and leads of the structural coefficient matrix into a state-space transition matrix . This generates an autoregressive representation for the law of motion of the state variables, the so-called unconstrained autoregression x−τ +1 x−τ ... = ... xθ xθ −1 Implicit conditions are computed on the transition matrix determination phase. 2. Calculation of the left invariant subspace and the eigenvalues associated with the transition matrix as additional explicit conditions. Blanchard and Kahn (1980) show that, for a system of rational expectations equations to have a unique solution, there must be an adequate number of explosive and stable eigenvalues. Thus, this step focuses on the invariant subspace of large eigenvalues – i.e. those bigger than one. The aim is to recover convergence constraints for the trajectories of the system. 3. Computation of a stacked matrix of explicit and implicit conditions. These two components are linearly independent by construction. Anderson and Moore (1985) show that uniqueness of solution requires the right-hand block of this stacked matrix to have proper dimensions and to be non-singular. In order to speed up the computations, sparse matrix methods are used. Depending on the relation between auxiliary conditions and the invariant subspace, the algorithm may detect: • no convergent solutions, • a unique convergent solution, • an infinity of convergent solutions.
94
P. ZAGAGLIA
When the Hi ’s of the lead terms turn out to be singular, the shooting method looks for linear combinations of the rows of the structural coefficient matrices that are rank-preserving, and annihilate the unnecessary rows. In particular, the AMA exploits a QR decomposition to compute the representation Hi = Q i × Ri with an orthogonal matrix Q i and an upper-triangular Ri . After premultiplying Hi by the transpose of Q i , the algorithm shifts all the non-zero rows to the right. The rows with null elements are instead grouped in the left-upper part of the matrix. Multiplication and ‘shift-to-the-right’ are iterated until the resulting matrix becomes non-singular. Should a unique convergent solution arise, the user obtains an autoregressive representation of the solution path: Et [xt+k ] =
−1
Bi Et [xt+k+i ]
(3)
i=−τ
The Bi ’s are called reduced-form coefficients. The explicit solution for expectations of the future can be plugged into equation (1) so as to compute the observable structure: 0
Si xt+i = εt
(4)
i=−τ
Its denomination is due to the fact that, unlike in the original form (1), no unobserved terms enter Equation (4). Furthermore, it is a structural representation of the model, as it is a function of the structural shocks. Equation (4) can be pre-multiplied by −S0−1 to obtain the reduced form of the structural model: xt =
−1
Bi xt+i + B0 εt
(5)
i=−τ
3. The Structure of the Packages Happily for the user, most of the Matlab files in the BOS package find a close counterpart in the FRB routines. The names of the key scripts are pretty similar, and so are the functions performed by each file. Notwithstanding, some important differences occur. THE BOS PACKAGE. Table I lists the files required for the solution of rationalexpectations models. The full set of routines available on the web has been created for the joint solution and estimation of rational expectations model. Thus, the portion
SOLVING RATIONAL-EXPECTATIONS MODELS THROUGH THE ANDERSON-MOORE
95
Table I. List of relevant files in the BOS package. parse lin remblanks remtabs find paren canonical replacements rem2blanks tschk aimerr mat2char shiftright build a param top obstruct
strip equals convert top expand terms sort terms find params find max lgld get data ts tabit aim eig exact shift copy w vibes obstruct t1
remblnks write cof m delete bad neighbors string repl nullify string vec space nmspace numeric shift eigensystem reduced form checkaim
of routines devoted to both the statistical analysis of time series data, and to the maximization of the likelihood function are excluded from Table I. Model solution starts by executing the script solve, which sets the AMA key files to solve the model, and defines the output at each stage of the computations. The subsequent step consists in calling the model parser parse lin. It reads the equations in the setting files, and prepares a list of endogenous variables, constants, and parameters through the find params function. The structure of leads and lags is also summarized. The aim is to express the original model in the form of Equation (2). This task is accomplished by finding the matrices Hi . The core function aim eig solves the model. It calls upon exact shift and numeric shift to compute, respectively, the exact and numerical approximation of the implicit initial conditions. Finally, eigensystem computes the eigenvectors and the roots of the left invariant subspace. It also finds the ‘big’ roots, i.e. those larger than a pre-specified upper bound. The function vibes analyzes the oscillatory properties of the solution and aimerr returns a message on the existence of solutions. The observable structure is generated by obstruct. The reduced form solution is computed by reduced form. This system of routines is capable of analyzing models where expectations are conditioned on both time t and t − 1 information, where obstruct t1 deals with time t − 1 information. THE FRB PACKAGE. File location is especially important, and the directory with the routines should be placed under /$matlab$/. The sequence of actions performed by the functions is basically the same as in the BOS package. The main difference consists in the way model parsing is taken care of. The user is required to create a routine that generates the matrices Hi , and that declares the number of leads and lags. The file mdlez-aim.exe then reads off all the equations, and re-organizes them depending on whether they include stochastic elements or the like. In order for
96
P. ZAGAGLIA
this executable to work, the user should include the off-package library cygwin1.dll in a /$matlab$/bin/win32/ directory. The calculations of the invariant subspace is carried out by spamalg. Only time t expectations are handled. 4. The Input The input for model solution arises from a combination of elements. The main one is the model file, an ASCII-text file written in the so-called MDLEZ syntax. It is needed for both packages, since it defines the equations of the model. Another common feature is that both coefficients and program settings enter a setpar Matlab function. I now provide an in-depth overview of the MDLEZ syntax. The remaining input requirements are described in a subsequent paragraph. 4.1.
THE
MDLEZ
SYNTAX
The structure of the model file includes: • A header – MODEL – indicating the name of the model; • A list of all the variables – ENDOG – in the equations; • A list of equations containing the equation name – EQUATION -, and its functional form – EQ. • A command – END – that ends the model representation. The syntax used in the model file follows the so-called MDLEZ language. All the commands but END must be followed by the sign >. The variable one deserves special mention. It is the outcome of a trick which allows the user to include stochastic shocks in the equations. For instance, assume I intend to add a disturbance yDE to the equation yDE. A shock with a stochastic nature is written in MDLEZ as yDE = 0 ∗ one The equation of one would instead have the form one = LAG(one, 1) The variable one enters the model as an identity, in the sense that its current value equals its first lag. Writing equations is rather intuitive in MDLEZ. The key task is to cope with backward- and forward-looking terms as, respectively, LAG(π, ρ) and LEAD(π, ), with π the endogenous name of the variable, ρ the number of periods backward, and the number of periods forward for the expectations. A numeric constant c can instead be included in an equation by entering the coefficient times one.
SOLVING RATIONAL-EXPECTATIONS MODELS THROUGH THE ANDERSON-MOORE
4.2.
97
THE OTHER MODEL FILES
THE BOS PACKAGE. The user should modify solve.m by defining a prefix directory, i.e. the path where the package is located. Further input at the prompt is reported in Section 7.2. The main task brought about by setpar function set consists in storing the parameters/constants included in the model. Options of interest include condn and uprbnd, which are both used by aim eig. The parameter condn is a tolerance number used to compute the numerical part of the left invariant subspace. The uprbnd is an upper bound for the modulus of the roots of the reduced form solution. It is important to notice that the additional tolerance number epsi is used by the function vibes to distinguish between large – i.e. relevant – and irrelevant roots. THE FRB PACKAGE. The solution of a model is initialized through a script indicating some background information. This includes the location of the Matlab package – solve path -, the directory with the package files – dirnam -, the name of the setpar file – parnam -, and the name of the aim matrices script. The additional option parseflag takes value 1 for the package to force parsing, and 0 otherwise. This consists in verifying whether the number of data variables equals the number of stochastic equations. 5. Diagnostic Output In order to set up the model in the form of Equation (1), a parser re-arranges the input written in MDLEZ syntax. It automatically produces Matlab output with extended names aim data.m and aim matrices.m in the FRB version, and cof.m and parse.mat in the BOS version. Both aim matrices.m and parse.mat contain the G and F matrix. These two matrices are then stacked together into H as required for Equation (2). The most relevant matrices of data created by the code are listed in Table II. The reader should keep in mind that each of these arrays stacks square matrices starting from the longest lag of the summations, up to the last lead. For instance, cof stacks the structural coefficient matrices in the following fashion: H = [ H−τ
H−τ +1
...
Hθ ]
Table II. Key matrices generated by the code. Matrix name
Definition
BOS
FRB
cof cofb scof
H B S
parse lin
SPSolve
reduced form
SPReduced form
obstruct
SPobstruct
98
P. ZAGAGLIA
The number of explicit constraints nex is calculated by inspecting the rows with zero values. These are complemented by a numerical approximation through QR decomposition. The results from this approximation are stored in nnum. Finally, lgroots indicates the number of roots larger than the pre-specified uprbnd. In order to determine the type of solution, the code compares the number of stability conditions discovered with the number of constraints required. The former is the sum between nex, nnum and lgroots, whereas the latter is obtained as the product of neq and nlead – the number of equations and the number of leads, respectively. Both packages indicate the type of solution obtained, and warn the user when no unique solution is attained. If the number of stability conditions identified is larger than the number of stability conditions required by the model, then the model has unstable solutions. The code still calculates the coefficients in case the QR decomposition is able to find a non-singular orthogonal matrix. The least explosive solution is then provided. When there are multiple solutions – i.e. there are too few constraints -, the FRB package terminates with an error. 6. Further Computations Based on the BOS Package As said earlier, a large part of the AIM programs of the BOS version perform various tasks of statistical nature. Above all, they implement full information maximumlikelihood estimation of equation systems with rational expectations along the lines of Fuhrer and Moore (1995). The code has been originally conceived for the estimation of nonlinear systems that generalize 1: F(xt− , E[xt+ | ]) = t where xt− contains all the lags up to the present period, xt+ contains future values, is a conditioning information set, and t is a vector of structural shocks. The estimation problem embodies two assumptions. The number of structural shocks cannot be larger than the number of observed variables. Furthermore, t enters the model economy in a linear way only. In order to avoid invertibility problems, the first assumption should be retained also for the estimation of the fully linear model 1. Denote by T the sample size, by J the Jacobian transformation of the residuals from the observable structure, and by C the variance-covariance matrix of t . The log-likelihood function L to be maximized over a set of parameters is calculated as: ˆ = T (log(|Jˆ |) − 0.5 log(C)) ˆ L Cˆ : = (1/T )ˆ t ˆ t
ˆ emphasizes that solving for the where hats denote estimates. The formula for L paths of expectations at each data point is a prerequisite for the maximum-likelihood
SOLVING RATIONAL-EXPECTATIONS MODELS THROUGH THE ANDERSON-MOORE
99
estimation of a model. This is attained through Newton steps from t to T in the following manner. A first-order Taylor expansion of F is computed around xk , where k denotes the step. The resulting nonlinear system is solved for xk+1 until T (see Fuhrer and Bleakley, 1996). The Newton steps require both initial and terminal conditions for the solution of the forward-looking variables. These stability conditions are obtained by applying the AMA to the linearized system in the way outlined earlier. The matrix including terminal conditions is then appended to the bottom of the Taylor expansion of F. This way, the Newton iterations are finally ready to be performed. In the operalization of the estimation, a variety of issues should be considered, including the role of the information set of the rational expectations, and the computation strategy for the Jacobian. Different information sets affect the way structural residuals are computed. In the BOS package, the Jacobian transformation is calculated by numerical dfferentiation. For a thorough discussion of these topics, the reader can refer to Fuhrer and Bleakley (1996). The estimation starts by calling the script fiml5. The computation of the log-likelihood function for given parameter levels is carried out by compll5. A nonlinear-quadratic maximization algorithm uses the function loglike for the step ˆ of numerical optimization. The routine covariance computes the matrix C. The estimation step interacts with the model definition on several grounds. It requires distinguishing the variables that are data from those that are not, as well as the equations with random shocks from those that bear no shocks. On the one hand, there is the need to accomodate dynamic identities of the kind outlined in Section 2.1. On the other, model solution should allow for unobservable variables. These aspects are accounted for both in the model file, and in the output of the parsing step. The MDLEZ syntax requires the field ENDOG to indicate the type of variable along with its name. Three kinds of endogenous variables are allowed, denoted as DATA, NOTD, and DTRM. The NOTD facilitates processing models with unobservable variables. This variable type has no effect on model solution though. A special case is represented by the pseudo-variable one, which is the only one of type DTRM. In the output files, the model parser sorts out types of equations and variables through the arrays eqtype and vtype . The matching is reported in Table III. In addition, the model file should include the field EQTYPE. Its arguments consist of the strings IMPOSED – for deterministic equations – and STOCH – for stochastic equations. Here a constraint on the form of the model is imposed, as the number Table III. Basic syntax. MDLEZ syntax DATA NOTD DTRM
vtype
MDLEZ syntax
eqtype
0 1 2
IMPOSED STOCH
1 0
100
P. ZAGAGLIA
Table IV. Coenen and Wieland’s macro model. Supply side ι ptι = f 0ι wtι + f 1ι wt−1 + 3 1 1 p1 f wt = Et i=0 i t+i
ι ι f 2ι wt−2 + f 3ι wt−3 ι = 1, 2, 3 3 1 + u 1w + 0.0195 i=0 f i1 yt+i t
f i1 = 0.25 + (1.5 − i)0.0501 3 3 2 2 2 2 2w wt2 = Et i=0 f i pt+i + 0.0041 i=0 f i yt+i + u t f i2 = 0.25 + (1.5 − i)0.1189 3
3 3 3 ] 3 f i3 wt−i − Et [ p¯ t−i p¯ t3 = i=0 f i3 pt+i vt3 = i=0 3 3 3 3 3 3 3w wt3 − Et [ p¯ t3 ] = Et i=0 f i vt+i + 0.0046 i=0 f i yt+i + u t f i3 = 0.25 + (1.5 − i)0.1244 Real demand 1 + 0.1395y 1 − 0.0365r 1l + u 1d yt1 = 0.0012 + 0.7865yt−1 t t t−2 2 − 0.2708y 2 − 0.0638r 2l + u 2d yt2 = 0.0024 + 1.2247yt−1 t t t−2 3 − 0.3852y 3 − 0.0544r 3l + u 3d yt3 = 0.0023 + 1.3524yt−1 t t t−2 Interest rates s i ts = αr i t−1 + απ (π˜ t − π ∗ ) + α y y˜ t 1 7 l s i t = Et 8 j=0 i t+ j ι − ptι ) rtιl = i tl − Et 12 ( pt+8
of DATA variables should equal the number of STOCH. The equation for one is of type IMPOSED. Interestingly, an equation that includes a stochastic shock should be classified as IMPOSED. Only the representation of the disturbances themselves is STOCH. Fuhrer and Moore (1995) notice that the matrices Bi in the reduced-form model (5) are identical to the those in equation (3). The reduced-form model can be rewritten in the companion form: yt = Ayt−1 + ςt xt yt = . . . xt−τ +1
B−1 A= I ...
B−2 ... I
B−τ 0 0
B0 εt ςt = . . . 0
(6)
This lays the ground for further computations. After leading equation (6) k periods, and substituting backwards, one obtains the conditional forecast of yt : yt+k = Ak yt +
k i=1
Ak−1 ςt+i
SOLVING RATIONAL-EXPECTATIONS MODELS THROUGH THE ANDERSON-MOORE
101
Since ςt is uncorrelated, the conditional covariance of yt based on time t information is:
t+k|t =
k−1
Ai (Ai )
(7)
i=0
where is the unconditional covariance of ςt . The unconditional covariance matrix
0 of yt is obtained by letting the summation in (7) go to infinity. If all the variables in yt are stationary, the summation converges to 0 . In case the stationarity assumption does not hold for all the variables, computing the summation until convergence is still feasible, and the result can be treated as 0 . This strategy is suggested by Fuhrer and Moore (1995), who note that integrated variables increase at a linear rate when the summation approaches infinity. Finding a recursive formula for the autocovariance function j of yt for j > 0 is straightforward:
j = A j−1 Finally, the model’s autocorrelations are obtained by dividing each row and column of j by the square root of the corresponding element along the diagonal of 0 . All the elaborations based on the companion form (6) are carried out by the Matlab function autocov of the BOS package.
7. An Application to a Real-Life Macroeconometric Model This section applies the set of Matlab tools to the solution of an estimated rationalexpectations model developed by Coenen and Wieland (2000). The equations are described in detail in Appendix A. The choice of the model derives from the intention of showing the applicability to a ‘real world’ problem, rather than dealing with the theoretical aspects of the AMA. The degree of sophistication of the example emerges from the fact that it includes 17 equations – of which 6 are stochastic – with 8 leads and 4 lags at most. In order to concentrate on the essential, I will discuss only selected parts of both the sample code and the output. The entire code can be freely downloaded from the author’s homepage. However, the remaining lines of the programs can be easily replicated by the reader. 7.1.
THE SAMPLE CODE
This section presents the model files that can be run under both the FRB and the BOS. Package-specific requirements are discussed in detail. An additional note for the reader. The model and setpar files for both packages are placed under /windows/desktop/project.
102
P. ZAGAGLIA
The model file Cw0r5 starts with a declaration of the names of variables. The items needed to represent the real demand equation yt1 are: MODEL > cw0 ENDOG > yDE yDE_ one EQUATION > yDE EQ > yDE = .7865 + .1395 - .0365 + .0012 + yDE_
* * * *
LAG(yDE,1) LAG(yDE,2) rlDE one
with a stochastic shock yDE : EQUATION > yDE_ EQ > yDE_ = 0 * one and an intercept term. It is a good practice to report the expression for the pseudovariable one right before closing the program: EQUATION > one EQ > one = LAG(one,1) END For what concerns setcw0r5.m, I consider as parameters the determinants of the short-term interest rate, namely the weights αr , απ and α y , and the inflation objective π ∗ . Constants are recorded as numerical values in the model file only. The condn and uprbnd are set as ‘default’ values of the file downloaded from the Internet. The code for the setpar file is: alphar = 0.25; alphapi = 0.25; alphay = 0.5; pistar = 2; % Set numerical tolerances condn = 1.e-8; uprbnd = 1 + 1.0e-6;
SOLVING RATIONAL-EXPECTATIONS MODELS THROUGH THE ANDERSON-MOORE
103
THE BOS PACKAGE. In solve.m, the prefix directory is /matlabr11/aim/. Since this is the only change required to the original file, I omit the lengthy printout of the code. THE FRB PACKAGE. The script runcw0r5 refers to /matlabr11/sp solve/ as a prefix directory. The modnam string is used to define the name of the aim data and aim matrices files. The code of runcw0r5 is as follows: solve_path = ’/windows/desktop/project/’; addpath(solve_path); dirnam = ’/matlabr11/sp_solve/’; parnam = ’setcw0r5’; modnam = ’cw0r5’; parseflag = 0; SPSolve; vibes(rts,0); The last two lines call the script that initializes the solution and compute the long-run properties of the system. 7.2.
SELECTED COMMENTS ON THE EXECUTION OF THE CODE
In this subsection, I shall comment briefly on the output on screen from the sample code. I concentrate on the BOS package, for it provides for an accurate description of the procedure. On the contrary, the FRB package saves the results in the Matlab workspace and, except for the function vibes, shows nothing on screen. The user is first required to define the properties of the model: Directory name: /windows/desktop/project Model file name:cw0r5 Setpar file name: setcw0 t (0) or t-1 (1) period expectations? 0 Re-parse model? (1=yes) 1 Re-parse (1) or load existing model data (0)? 1 Set parameters? (1=yes) 1 Parsing model cw0r5 ... The model parser summarizes the structure of the equations, together with a list of parameters: Parsing Equation 1: yDE ... MODEL:
cw0
104
P. ZAGAGLIA
Number of equations: 24 Number of lags : 4 Number of leads : 8 Endog. Variable Equation Equation Var. Type Name Type _____________________________________ yDE 0 yDE 1 ... Parameters ______________________ 1 alphar ... Equations: ----------(1) yDE=.7865*LAG(yDE,1)+.1395*LAG(yDE,2)-.0365*rlDE+ ... Finally, some information on the dynamic stability of the model is shown. The expression ‘shiftrights’ indicates the number of rows shifted to the right of nonzero columns thus leaving zeros in the columns to the right. The outcome is the computation of left invariant subspace. The algorithm also computes the transition matrix with the unstable left eigenvectors. Number Number Number Number
of exact shiftrights (nex): 156 of numeric shiftrights (nnum): 1 of large roots (lgrts): 35 of stability conditions (nex + nnum + lgrts) number required (neq*nlead) = 0 Dimension of state transition matrix (ia): 90 Aim return code: unique solution. Roots Amplitude Period _________________________________ 1 29.759 29.759 0 ... _________________________________ Maximum absolute error: 7.9658e-010 The diagnostic output shows no particular problems. The model fulfills the conditions to obtain a unique solution (see Section 5). The maximum absolute error of the approximate solution is rather small.
SOLVING RATIONAL-EXPECTATIONS MODELS THROUGH THE ANDERSON-MOORE
105
The script cw0r5 aim matrices created by the model parser includes both the G and F matrices. Since there are 24 endogenous variables in the model, and the largest lag is 4 – i.e. −τ = −4 -, the G matrix has 24 rows and 120 columns. Thus, given θ = 8, the F has 312 columns. The programs ran on a PC with an Intel Pentium 75 processor and 64 MB of RAM. I used Matlab v. 5.3. The execution of the entire procedure took approximately 1 minute and 40 seconds. Considering both the size of the model, and the limited computing power of the machine, the performance of the algorithm is outstanding in terms of speed. Acknowledgements I wrote the first version of this paper when I was employed by the University of Ancona. I thank Riccardo Lucchetti, Luca Papi and Ulf S¨oderstr¨om for their support, and an anonymous referee for very insightful comments on an earlier draft. Financial support from both Banca Popolare di Ancona and Stockholm University is gratefully acknowledged. Appendix A: Coenen and Wieland’s Macro Model of the Euro Area The macroeconometric model of Coenen and Wieland (2000) merges a supply with a demand side for Germany, France and Italy, indexed by ι as 1, 2 and 3 respectively. Although the empirical investigation of Coenen and Wieland (2000) involves much broader sets of results, I include the equations that appear to exhibit the best statistical fit. The variables are defined on a quarterly frequency. The supply-side includes equations for both nominal prices pt and wages wt . The weights f iι in the wage equations are assumed to be downward-sloping functions of the contract length i. In Coenen and Wieland (2000), the nominal-wage contracting – i.e. Taylor (1980) – model appears to fit both the German and French data rather well, as these are characterized by stickiness in the price level only. The Italian inflation process exhibits a larger degree of sluggishness, which is accounted for by a version of Fuhrer and Moore (1995)’s model where historically-available information plays a key role. On the demand side, the deviation of output from trend ytι is a function of the output gap in the two previous quarters, and the ex-ante real interest rate rtιl . It is noteworthy that the impact of the real rate of interest on demand is country-specific, as inflation expectations over the following two quarters are likely to diverge. The nominal long-term interest rate arises from a term-structure relation. Monetary policy takes the form of a Taylor-type rule driven by area-wide conditions: π˜ t :=
3
ι sι ptι − pt−4 ι=1
y˜ t :=
3 ι=1
sι ytι
106
P. ZAGAGLIA
The country weights sι are computed according to the ECB Area-Wide Database of Fagan et al. (2001). I set s1 = 0.4248, s2 = 0.2922, s3 = 0.2829. I also calibrate the parameters in the following way: αr = 0.25, απ = 0.25, π ∗ = 2, α y = 0.5.
References Anderson, G.S. and Moore, G. (1985). A linear algebraic procedure for solving linear perfect foresight models. Economics Letters 17(1). Blanchard, O.J. and Kahn, C.M. (1980). The solution to linear difference models under rational expectations. Econometrica 48(5). Coenen, G. and Wieland, V. (2000). A small estimated euro area model with rational expectations and nominal rigidities. ECB Working Paper, No. 30. Fagan, G. J., Henry, J. and Mestre, R. (2001). An area-wide model (AWM) for the euro area. ECB Working Paper No. 42. Fuhrer, J. C. and Bleakley, H. (1996). Computationally efficient solution and maximum likelihood estimation of nonlinear rational expectations model. Working Paper, Federal Reserve Bank of Boston, No. 2. Fuhrer, J. C. and Moore, G.R. (1995). Inflation persistence. Quarterly Journal of Economics, 110. Taylor, J.B. (1980). Aggregate dynamics and staggered contracts. Journal of Political Economy, 88(1).