DYNARE homepage
Dynare is a pre--processor and a collection of GAUSS, MATLAB or Scilab routines which solve non--linear
models with forward looking variables. It is the result of research carried at
CEPREMAP by several people (see Laffargue, 1990, Boucekkine, 1995, and
Juillard, 1996, Collard and Juillard 2001, 2001b). Although it can be put to other use, Dynare has been
built in order to study the transitory dynamics of non--linear models
with consistent expectations.
For deterministic simulations, Dynare uses a Newton--type algorithm, first
proposed by Laffargue (1990), instead of a first order technique like
the one proposed by Fair and Taylor (1983), and used in earlier generation simulation programs. We believe
this approach to be in general both faster and more robust. The
details of the algorithm used in Dynare can be found in Juillard (1996).
In a stochastic context, Dynare computes one or several simulations corresponding to a random draw of the shocks. Starting with version 2.3 (available currently only for Matlab), Dynare uses a second order Taylor approximation of the expectation functions (see Judd, 1992, Collard and Juillard, 2001a, 2001b and Schmitt--Grohe and Uribe, 2002).
There is a new testing version for Dynare including a module for estimation
(Bayesian and maximum likelihood) of DSGE models. Follow this link to the testing version web page.
NEW: Fellowship at IPSC, Joint Research Center of the European Commission at Ispra, Italy
DOCUMENTATION
MAILING LIST
You can subscribe to a mailing list dealing with DYNARE questions at
http://pythie.cepremap.cnrs.fr/mailman/listinfo/dynare
DOWNLOAD
These are preliminary versions, please forgive, but report, any error.
- Toolboxes
- Sources
| Program |
Version |
Date |
Download |
Comments |
| Parser |
2.6.1 |
05/30/2003 |
parser_0530.zip |
Source code for parser |
| mjdgges.dll |
1.0 |
09/23/2001 |
mjdgges_0923.zip
| Matlab dll for LAPACK dgges |
Previous versions
For any question or bug report michel.juillard@cepremap.cnrs.fr
INSTALLATION
In case of update from a previous version, it is a good idea to copy
the old version in a backup directory so as to be able to revert to it
in case of problems. None of the previous files are usefull anymore, so you are strongly encouraged to remove them from directory c:\dynare.
Unpack the zip file in the directory c:\ (If you want to use another
directory, see below). The Gauss version in automatically installed in c:\dynare\gauss, the Matlab version in c:\dynare\matlab and the Scilab version in c:\dynare\scilab.
Installing the GAUSS version
If you had any previous version of Dynare, use the Gauss editor or any text editor to remove all references to it from the library file @file{user.lcg}.
After unpacking the archive, start the Gauss program and type the following:
library pgraph
lib user c:\dynare\gauss\dynare.src
lib user c:\dynare\gauss\dynare1.src
lib user c:\dynare\gauss\dynare2.src
lib user c:\dynare\gauss\dynare3.src
If you installed Dynare for Gauss in a directory different from c:\dynare\gauss, change the above instructions accordingly and edit the following line in dynare.src
declare string PARSER = "c:\\dynare\\gauss\dynare_g ";
Installing the Matlab version
After unpacking the archive, start the Matlab program and use the menu File/Set path to add c:\dynare\matlab to the list of your paths. If you don't have a good reason to do otherwise, you should add it to the TOP of your pathin order to avoid other functions with the same name to interfer with DYNARE operation.
If you installed Dynare for Matlab in a directory different from c:\dynare\matlab, change the above instructions accordingly and edit the following line in dynare.m
command = ['c:\dynare\matlab\dynare_m ' x];
Installing the Scilab version
In the top directory of your Scilab distribution (identified by the presence of the scilab.star file), create a file scilab.ini containing
load('c:/dynare/scilab/lib');
or add this lines to your scilab.ini file if it already exists. Alternatively, the line can be added to the file scilab.star, after similar statements. This second solution has the advantage of keeping access to Dynare even after the command clear.
If you installed Dynare for Scilab in a directory different from c:\dynare\scilab, change the above instructions accordingly and edit the following line in dynare.sci
command = 'c:\dynare\scilab\dynare_s '+fname;
Then, restart Scilab and run the command uplib(), provided by Dynare.
Examples
Some example models are put in directory \dynare\examples
In order to run the examples or all other model, you have first to change directory to the correct one, then to run dynare:
For Matlab
cd c:\dynare\examples
dynare example1
For Scilab
chdir c:\dynare\examples
dynare example1
For Gauss
chdir c:\dynare\examples
dynare ramst
Documentation
- Fabrice Collard's guide Stochastic simulations with DYNARE. A practical guide is in \dynare\doc\guide.pdf.
- The manual is in \dynare\doc\manual.pdf and in \dynare\doc\dynare\index.html
CHANGES
- 02/03/04
- corrected bug in disp_th_moments reported by Andrea Ferrero (thanks!)
- 01/24/04 (Gauss and Scilab versions will be relesed later)
- dyn_mat_0124.zip corrects an error in the computation of the theoretical mean for second order approximation
- the vector of mean of the requested endogenous variables, the matrix of variance-covariance and a vector of matrices of autocorrelation are now available in the global structure oo_. You need to declare "global oo_" to have access to it after running Dynare.
- the IRFs are now available after running Dynare in vector with names <var name>_<shock_name>. For example, the vector y_e contains the response of y to a shock to e.
- 09/04/03 (Gauss and Scilab versions will be released later)
- dyn_mat_0904.zip corrects a problem in the packaging of the archive dyn_mat_0830.zip
- 08/30/03 (Gauss and Scilab versions will be released later)
- 08/28/03 (Gauss and Scilab versions will be released later)
- corrected IMPORTANT BUG in the 2nd order approximation. Affects most models with some purely forward variables and some variables appearing both with a lead and a lag. PLEASE RERUN 2nd ORDER APPROXIMATION OF ALL EXISTING MODELS WITH THE NEW VERSION.
- By default, for the 2nd order approximation, DYNARE reports now approximated theoretical moments, instead of simulated ones. The MEAN is corrected. The second order moments (standard deviation, variance, correlation and autocorrelation are identical to 1st order approximation).
- corrected a bug in STEADY with MATLAB without the optimization toolbox of version 6.5 (release 13).
- corrected all GAUSS/MATLAB/SCILAB versions for models without any exogenous variable.
- fixed bug in rplot (Matlab/Scilab versions) when dsample is used.
- 06/27/03
- changed name of internal Dynare function solve to dynare_solve to avoid name conflict with Symbolic Toolbox
- fixed various compatibility bugs for Matlab versions 6.x < 6.5
- fixed bug for SHOCKS on several periods.
- Dynare uses Matlab fsolve only if Matlab version >= 6.5
- 06/05/03
- Dynare version 2.6.1.2 for Matlab
- check: corrected bugs for model with leads on several periods and for models with lagged exogenous variables
- set_default_option: corrected bug for Matlab versions before 6.5
- 05/30/03
- Dynare version 2.6.1.1 for Maltab: bugs fixing release
- 05/27/03 (in Dynare version 2.3.6, available only under Matlab for now)
- options are now sticky: when you add an option to a command, this option is also valid for all following commands unles you change its value explicitly.
- the initial PERIODS declaration is now deprecated (but will still work with older model files). It is not necessary when no simulation is computed and it is replaced by an option PERIODS in SIMUL and STOCH_SIMUL.
- MODEL has a new option LINEAR to declare a linear model. When using this option, it isn't necessary anymore to declare initial values for computing the steady state and option ORDER=1 is automatically added to STOCH_SIMUL.
- It isn't necessary anymore to declare 0 as initial values for stochastic shocks as it is the only possible value (deterministic changes of exogenous variables in stochastic models will be added a in future version of Dynare).
- new command HISTVAL permits to specify historical initial values different from the steady states when there are lags on several periods.
- CHECK also computes the rank condition for unicity of stable trajectory: the square submatrix of the right Schur vectors corresponding to the forward looking variables (jumpers) and to the explosive eigenvalues must have full rank.
- CHECK returns eigenvalues in global eigenvalues_. This corrects a potential name conflict with a model parameter called 'lambda'.
- Exogenous shocks with zero variance appear in the decision functions as before, but won't be used for moments computations and Impulse Response Functions. It provides an easy way to turn off shocks without changing VAREXO and INITVAL statements.
- STOCH_SIMUL reports: endogenous variables with zero variance don't appear in variance decomposition, correlation and autocorrelation tables.
- IRFs: variables with impulse response < 1e-10 aren't displayed anymore
- 03/02/03
- added hp_filter option and hp_ngrid for stoch_simul when order=1. This option computes theoretical moments for filtered series (see manual) (only in Matlab for now). Thanks to Jean Chateau for the code.
- added simul and simul_seed options for stoch_simul. This option computes a stochastic simulation. The simulated variables are made available as vectors with the same name (only in Matlab for now).
- fixed stoch_simul for 2nd order approximation of models with lags on several period (still only one period lead) (only in Matlab for now).
- Scilab version fixed so as to run examples without error.
- 02/10/03
- Corrected problem in my_sylvester.m for some models for which approximation at order 2 would return complex numbers.
- Added a count of various types of variables in stoch_simul report.
- 01/26/03
- Corrected error in computation of approximation at order 2, introduced since version 5.2.1.0 12/18/02.
- 01/20/03
- Added variance decomposition for stochastic simulations at order 1
- Corrected truncation of variable names in stoch_simul(order=2) report
- Now saves the trajectory of all endogenous variables as MATLAB vectors after deterministic simul
- 01/14/03
- removed an erroneous initial /c directory in the zip files.
- added a warning in the parser when a variable isn't initialized in INITVAL or ENDVAL
- MATLAB version: correction of an infinite loop in STOCH_SIMUL and/or
STEADY in some circumstances
- SCILAB version: corrected option bugs in STOCH_SIMUL
- corrected absence of display of autocorrelations when order = 1.
- 01/08/03
- Parser.src/Makefile: added compile option -mno-cygwin to suppress the dependence on cygwin1.dll
- Recompiled parser for MATLAB, SCILAB and GAUSS to correct the above problem.
- 01/03/03
- stoch_simul option dr_algo = 1 provides the algorithm in Collard and Juillard (2001a)
- Command Sigma_e allow to enter the upper or lower triangular part of the covariance matrix of the shocks
- Compatibility with previous versions restored for the Gauss version
- 12/18/02 Most important changes since the previous version posted on this page (2.3.2b):
- Dynare uses now a "pure" perturbation approach as described in Schmitt-Grohe and Uribe (2002).
- For linear models or linar approximations, Dynare reports now theoretical moments.
- In many cases, Dynare plots automatically IRFs for stochastic models.
- 05/23/01 dymat232b.zip added mjdgges.dll forgotten in dymat232a.zip
- 05/11/01 SOLVE.M: removed instruction 'continue' which appears only in MATLAB version 6.
- 04/13/01 SOLVE.M corrected bug which limited non-linear solver to ONE iteration !!!
THANKS
DYNARE has benefited of the help of many people. Fabrice Collard helped me develop the stochastic simulation version. Guillaume Vandenbroucke contributed the first Matlab version of Dynare. Raouf Boucekkine, Jean-Pierre Laffargue et Pierre Malgrange have been at the origin of the project and supportive since then. CEPREMAP is the institutional home sheltering the development of DYNARE and providing for its material needs.
updated 05/27/2003 M.J.