EconPapers    
Economics at your fingertips  
 

Matlab Code for Solving Linear Rational Expectations Models

Christopher Sims ()

QM&RBC Codes from Quantitative Macroeconomics & Real Business Cycles

Abstract: A computationally robust solution method for linear rational expectations models is displayed, based on the QZ matrix decomposition. Any rational expectations model, in continuous or discrete time, can be solved by this approach. It requires that the model be cast into first-order form, but it does not require that it be reduced so that the number of states matches the number of equations. It also avoids the artificial requirement that variables be designated as "jump" variables or not. (Instead, how expectational error terms enter the system must be specified - a more general specification.) The code automatically determines whether the model satisfies conditions for existence and uniqueness. Two matlab files, gensys.m and gensysct.m, analyze linear rational expectations systems and return solutions for their dependence on exogenous disturbances. The systems need not have non-singular lead matrices (coefficients on current variables in discrete time, on derivatives in continuous time) and they need not be well-specified. The program analyzes them to determine whether solutions exist and whether they are unique. It returns a solution even when it is not unique, and it returns a solution that constrains exogenous variable behavior when no solution that does not do so exists. The continuous time program, unlike the discrete time program, handles only the case of serially uncorrelated exogenous processes. The files qzdiv.m, qzdivct.m, and qzswitch.m are required by the gensys.m programs. If you try to implement the algorithm in non-Matlab languages, you will need to find or write a routine that does the complex QZ (or generalized Schur) decomposition. Fortran routines that do this are available in the ACM algorithm files.

Language: Matlab
Date: 2001-07-22
References: Add references at CitEc
Citations:

Downloads: (external link)
https://dge.repec.org/codes/sims/linre3a/ program code (application/x-matlab)
none

Related works:
Journal Article: Solving Linear Rational Expectations Models (2002) Downloads
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:dge:qmrbcd:11

Access Statistics for this software item

More software in QM&RBC Codes from Quantitative Macroeconomics & Real Business Cycles
Bibliographic data for series maintained by Christian Zimmermann ().

 
Page updated 2025-03-31
Handle: RePEc:dge:qmrbcd:11