diff --git a/.gitignore b/.gitignore
index 540f206d3f09fa76f666a3eca04198e219c45688..309a7dd61d1ecbb50dfbffd9accfb3e93ae43e0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,9 +41,20 @@ ylwrap
 *.bbl
 *.blg
 *.lof
-/doc/manual-html/
-/doc/manual.texi
-/doc/manual.info
+/doc/dynare.html
+/doc/dynare.info
+/doc/dynare.cp
+/doc/dynare.fn
+/doc/dynare.fns
+/doc/dynare.vrs
+/doc/dynare.ky
+/doc/dynare.pg
+/doc/dynare.tp
+/doc/dynare.vr
+/doc/texinfo.tex
+/doc/version.texi
+/doc/mdate-sh
+/doc/stamp-vti
 !/doc/guide.bbl
 !/doc/macroprocessor/new-design.pdf
 !/doc/macroprocessor/old-design.pdf
diff --git a/configure.ac b/configure.ac
index 9a5d3e56c77e63ba9399693c0e2d75cc0e67dcb7..f3fe3c075a9b1afa075886538b09beca9a74d863 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,6 +84,8 @@ AC_DEFINE([BOOST_NO_HASH], [], [Don't use deprecated STL hash structures])
 AC_CHECK_LIB([dl], [dlopen], [LIBADD_DLOPEN="-ldl"], [])
 AC_SUBST([LIBADD_DLOPEN])
 
+AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
+
 AC_CHECK_PROG([PDFTEX], [pdftex], [pdftex])
 AM_CONDITIONAL([HAVE_PDFTEX], [test "x$PDFTEX" != "x"])
 
@@ -105,6 +107,12 @@ AM_CONDITIONAL([HAVE_PDFLATEX], [test "x$PDFLATEX" != "x"])
 AC_CHECK_PROG([BIBTEX], [bibtex], [bibtex])
 AM_CONDITIONAL([HAVE_BIBTEX], [test "x$BIBTEX" != "x"])
 
+AC_CHECK_PROG([TEXI2HTML], [texi2html], [texi2html])
+AM_CONDITIONAL([HAVE_TEXI2HTML], [test "x$TEXI2HTML" != "x"])
+
+AC_CHECK_PROG([LATEX2HTML], [latex2html], [latex2html])
+AM_CONDITIONAL([HAVE_LATEX2HTML], [test "x$LATEX2HTML" != "x"])
+
 if test "x$PDFLATEX" != "x" -a "x$BIBTEX" != "x"; then
   AC_MSG_CHECKING([for econometrica BST])
   AX_LATEX_BIBTEX_TEST([\documentclass{article}
@@ -128,17 +136,6 @@ fi
 AM_CONDITIONAL([HAVE_ECONOMETRICA], [test "x$ax_latex_have_econometrica" = "xyes"])
 AM_CONDITIONAL([HAVE_BEAMER], [test "x$ax_latex_have_beamer" = "xyes"])
 
-AC_CHECK_PROG([DBLATEX], [dblatex], [dblatex])
-AM_CONDITIONAL([HAVE_DBLATEX], [test "x$DBLATEX" != "x"])
-
-AX_PROG_XSLTPROC
-AX_CHECK_DOCBOOK_XSLT_MIN(1.69.0)
-AM_CONDITIONAL([HAVE_XSLT], [test "x$XSLTPROC" != "x" -a "x$DOCBOOK_XSLT_CURRENT_VERSION" != "xno"])
-
-AC_CHECK_PROG([DOCBOOK2XTEXI], [docbook2x-texi], [docbook2x-texi])
-AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
-AM_CONDITIONAL([HAVE_DOCBOOK2XTEXI_MAKEINFO], [test "x$DOCBOOK2XTEXI" != "x" -a "x$MAKEINFO" != "x"])
-
 AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x"])
 
@@ -238,18 +235,6 @@ else
   BUILD_DYNAREPLUSPLUS_SRCDOC="no (missing one of: cweave, pdftex, eplain)"
 fi
 
-if test "x$XSLTPROC" != "x" -a "x$DOCBOOK_XSLT_CURRENT_VERSION" != "xno"; then
-  BUILD_DYNARE_HTML_MANUAL="yes"
-else
-  BUILD_DYNARE_HTML_MANUAL="no (missing one of: xsltproc, DocBook stylesheets)"
-fi
-
-if test "x$PDFLATEX" != "x" -a "x$DBLATEX" != "x"; then
-  BUILD_DYNARE_PDF_MANUAL="yes"
-else
-  BUILD_DYNARE_PDF_MANUAL="no (missing one of: pdflatex, dblatex)"
-fi
-
 if test "x$PDFLATEX" != "x" -a "x$BIBTEX" != "x" -a "x$ax_latex_have_econometrica" = "xyes"; then
   BUILD_DYNARE_USERGUIDE="yes"
 else
@@ -280,10 +265,18 @@ else
   BUILD_DYNARE_INTERNAL_DOC="no (Org export not enabled)"
 fi
 
-if test "x$DOCBOOK2XTEXI" != "x" -a "x$MAKEINFO" != "x"; then
+if test "x$MAKEINFO" != "x"; then
   BUILD_DYNARE_INFO="yes"
+  if test "x$TEXI2HTML" != "x" -a "x$LATEX2HTML" != "x"; then
+    BUILD_DYNARE_HTML_MANUAL="yes"
+  else
+    BUILD_DYNARE_HTML_MANUAL="yes (but with ugly math formulas, missing texi2html or latex2html)"
+  fi
+  BUILD_DYNARE_PDF_MANUAL="yes"
 else
-  BUILD_DYNARE_INFO="no (missing docbook2x-texi and/or makeinfo)"
+  BUILD_DYNARE_INFO="no (missing makeinfo)"
+  BUILD_DYNARE_HTML_MANUAL="no (missing makeinfo)"
+  BUILD_DYNARE_PDF_MANUAL="no (missing makeinfo)"
 fi
 
 if test "x$OCTAVE" != "x"; then
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 70bec7dc8054610e62760e7bd18bdc1ccd1ab12f..d1cbd1691e9296b5a5fcd1327689f7003685c58a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,32 +1,25 @@
 SUBDIRS = preprocessor macroprocessor userguide parallel internals gsa
 
+info_TEXINFOS = dynare.texi
+
+if HAVE_TEXI2HTML
+if HAVE_LATEX2HTML
+html-local: dynare.texi
+	rm -rf dynare.html
+	mkdir -p dynare.html
+	cd dynare.html && $(TEXI2HTML) --l2h --split section --prefix index ../dynare.texi
+endif
+endif
+
 PDF_TARGETS =
 
 if HAVE_PDFLATEX
 PDF_TARGETS += guide.pdf bvar-a-la-sims.pdf dr.pdf
 endif
 
-if HAVE_DBLATEX
-PDF_TARGETS += manual.pdf
-endif
-
 pdf-local: $(PDF_TARGETS)
 
-# We don't use info_TEXINFOS because otherwise it generates a manual.pdf rule
-# which conflict with ours. Hence we have to manually specify building rules.
-INFO_TARGETS =
-
-if HAVE_DOCBOOK2XTEXI_MAKEINFO
-INFO_TARGETS += manual.info
-endif
-
-info-local: $(INFO_TARGETS)
-
-if HAVE_XSLT
-html-local: manual-html/index.html
-endif
-
-EXTRA_DIST = guide.tex guide.bbl bibmad.sty bvar-a-la-sims.tex dr.tex manual.xml dynare_html.xsl dynare.xsl
+EXTRA_DIST = guide.tex guide.bbl bibmad.sty bvar-a-la-sims.tex dr.tex
 
 guide.pdf: guide.tex guide.bbl bibmad.sty
 	$(PDFLATEX) guide
@@ -40,18 +33,5 @@ dr.pdf: dr.tex
 	$(PDFLATEX) dr
 	$(PDFLATEX) dr
 
-manual-html/index.html: manual.xml dynare_html.xsl dynare.xsl
-	$(XSLTPROC) -stringparam base.dir ./manual-html/ dynare_html.xsl manual.xml
-
-manual.pdf: manual.xml
-	$(DBLATEX) manual.xml
-
-manual.texi: manual.xml
-	$(DOCBOOK2XTEXI) --encoding=utf-8//TRANSLIT --string-param output-file=manual --string-param directory-category=Math --string-param directory-description="A platform for handling a wide class of economic models." $<
-
-manual.info: manual.texi
-	$(MAKEINFO) $<
-
 clean-local:
-	rm -f *~ *.pdf *.log *.aux *.out manual.texi manual.info
-	rm -rf manual-html
+	rm -f *~ *.pdf *.log *.aux *.out
diff --git a/doc/dynare.texi b/doc/dynare.texi
new file mode 100644
index 0000000000000000000000000000000000000000..fbcc76ee8ddad5608104b72480f9f8e3ca2d7181
--- /dev/null
+++ b/doc/dynare.texi
@@ -0,0 +1,5009 @@
+\input texinfo
+@c %**start of header
+@setfilename dynare.info
+@documentencoding UTF-8
+@settitle Dynare Reference Manual
+@afourwide
+@dircategory Math
+@direntry
+* Dynare: (dynare).             A platform for handling a wide class
+                                  of economic models.
+@end direntry
+
+@include version.texi
+
+@c Define some macros
+
+@macro descriptionhead
+@ifnothtml
+@sp 1
+@end ifnothtml
+@emph{Description}
+@end macro
+
+@macro optionshead
+@iftex
+@sp 1
+@end iftex
+@emph{Options}
+@end macro
+
+@macro examplehead
+@iftex
+@sp 1
+@end iftex
+@emph{Example}
+@end macro
+
+@macro outputhead
+@iftex
+@sp 1
+@end iftex
+@emph{Output}
+@end macro
+
+@macro customhead{title}
+@iftex
+@sp 1
+@end iftex
+@emph{\title\}
+@end macro
+
+@c %**end of header
+
+@copying
+Copyright @copyright{} 1996-2011, Dynare Team.
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+
+A copy of the license can be found at @uref{http://www.gnu.org/licenses/fdl.txt}.
+@end quotation
+@end copying
+
+@titlepage
+@title Dynare
+@subtitle Reference Manual, version @value{VERSION}
+@author Stéphane Adjemian
+@author Houtan Bastani
+@author Michel Juillard
+@author Junior Maih
+@author Ferhat Mihoubi
+@author George Perendia
+@author Marco Ratto
+@author Sébastien Villemot
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top
+@top Dynare
+This is Dynare Reference Manual, version @value{VERSION}.
+
+@insertcopying
+@end ifnottex
+
+@menu
+* Introduction::                
+* Installation and configuration::  
+* Dynare invocation::           
+* The Model file::              
+* The Configuration File::      
+* Examples::                    
+* Bibliography::                
+* Command and Function Index::  
+* Variable Index::              
+
+@detailmenu
+ --- The Detailed Node Listing ---
+
+Introduction
+
+* What is Dynare ?::            
+* Documentation sources::       
+
+Installation and configuration
+
+* Software requirements::       
+* Installation of Dynare::      
+* Configuration::               
+
+Installation of Dynare
+
+* On Windows::                  
+* On Debian GNU/Linux and Ubuntu::  
+* On Mac OS X::                 
+* For other systems::           
+
+Configuration
+
+* For MATLAB::                  
+* For GNU Octave::              
+* Some words of warning::       
+
+The Model file
+
+* Conventions::                 
+* Variable declarations::       
+* Expressions::                 
+* Parameter initialization::    
+* Model declaration::           
+* Auxiliary variables::         
+* Initial and terminal conditions::  
+* Shocks on exogenous variables::  
+* Other general declarations::  
+* Steady state::                
+* Getting information about the model::  
+* Deterministic simulation::    
+* Stochastic solution and simulation::  
+* Estimation::                  
+* Forecasting::                 
+* Optimal policy::              
+* Sensitivity and identification analysis::  
+* Displaying and saving results::  
+* Macro-processing language::   
+* Misc commands::               
+
+Expressions
+
+* Parameters and variables::    
+* Operators::                   
+* Functions::                   
+
+Parameters and variables
+
+* Inside the model::            
+* Outside the model::           
+
+Functions
+
+* Built-in Functions::          
+* External Functions::          
+
+Steady state
+
+* Finding the steady state with Dynare nonlinear solver::  
+* Using a steady state file::   
+
+Stochastic solution and simulation
+
+* Computing the stochastic solution::  
+* Typology and ordering of variables::  
+* First order approximation::   
+* Second order approximation::  
+* Third order approximation::   
+
+The Configuration File
+
+* Parallel Configuration::      
+
+@end detailmenu
+@end menu
+
+@node Introduction
+@chapter Introduction
+
+@menu
+* What is Dynare ?::            
+* Documentation sources::       
+@end menu
+
+@node What is Dynare ?
+@section What is Dynare ?
+
+Dynare is a software platform for handling a wide class of economic
+models, in particular dynamic stochastic general equilibrium (DSGE)
+and overlapping generations (OLG) models. The models solved by Dynare
+include those relying on the @i{rational expectations} hypothesis, wherein
+agents form their expectations about the future in a way consistent
+with the model. But Dynare is also able to handle models where
+expectations are formed differently: on one extreme, models where
+agents perfectly anticipate the future; on the other extreme, models
+where agents have limited rationality or imperfect knowledge of the
+state of the economy and, hence, form their expectations through a
+learning process. In terms of types of agents, models solved by Dynare
+can incorporate consumers, productive firms, governments, monetary
+authorities, investors and financial intermediaries. Some degree of
+heterogeneity can be achieved by including several distinct classes of
+agents in each of the aforementioned agent categories.
+
+Dynare offers a user-friendly and intuitive way of describing these
+models. It is able to perform simulations of the model given a
+calibration of the model parameters and is also able to estimate these
+parameters given a dataset. In practice, the user will write a text
+file containing the list of model variables, the dynamic equations
+linking these variables together, the computing tasks to be performed
+and the desired graphical or numerical outputs.
+
+A large panel of applied mathematics and computer science techniques
+are internally employed by Dynare: multivariate nonlinear solving and
+optimization, matrix factorizations, local functional approximation,
+Kalman filters and smoothers, MCMC techniques for Bayesian estimation,
+graph algorithms, optimal control, @dots{}
+
+Various public bodies (central banks, ministries of economy and
+finance, international organisations) and some private financial
+institutions use Dynare for performing policy analysis exercises and
+as a support tool for forecasting exercises. In the academic world,
+Dynare is used for research and teaching purposes in postgraduate
+macroeconomics courses.
+
+Dynare is a free software, which means that it can be downloaded free
+of charge, that its source code is freely available, and that it can
+be used for both non-profit and for-profit purposes. Most of the
+source files are covered by the GNU General Public Licence (GPL)
+version 3 or later (there are some exceptions to this, see the file
+@file{license.txt} in Dynare distribution). It is available for the
+Windows, Mac and Linux platforms and is fully documented through a
+user guide and a reference manual. Part of Dynare is programmed in
+C++, while the rest is written using the
+@uref{http://www.mathworks.com/products/matlab/, MATLAB} programming
+language.  The latter implies that commercially-available MATLAB
+software is required in order to run Dynare. However, as an
+alternative to MATLAB, Dynare is also able to run on top of
+@uref{http://www.octave.org, GNU Octave} (basically a free clone of
+MATLAB): this possibility is particularly interesting for students or
+institutions who cannot afford, or do not want to pay for, MATLAB and
+are willing to bear the concomitant performance loss.
+
+The development of Dynare is mainly done at
+@uref{http://www.cepremap.ens.fr, Cepremap} by a core team of
+researchers who devote part of their time to software
+development. Currently the development team of Dynare is composed of
+Stéphane Adjemian (Université du Maine, Gains and Cepremap), Houtan
+Bastani (Cepremap), Michel Juillard (Banque de France), Frédéric
+Karamé (Université d'Évry, Epee and Cepremap), Junior Maih (Norges
+Bank), Ferhat Mihoubi (Université d'Évry, Epee and Cepremap), George
+Perendia, Marco Ratto (JRC) and Sébastien Villemot (Cepremap and Paris
+School of Economics). Financial support is provided by Cepremap,
+Banque de France and DSGE-net (an international research network for
+DSGE modeling). Increasingly, the developer base is expanding, as
+tools developed by researchers outside of Cepremap are integrated into
+Dynare.
+
+Interaction between developers and users of Dynare is central to the
+project. A @uref{http://www.dynare.org/phpBB3, web forum} is available
+for users who have questions about the usage of Dynare or who want to
+report bugs. Training sessions are given through the Dynare Summer
+School, which is organized every year and is attended by about 40
+people. Finally, priorities in terms of future developments and
+features to be added are decided in cooperation with the institutions
+providing financial support.
+
+@node Documentation sources
+@section Documentation sources
+
+The present document is the reference manual for Dynare. It documents
+all commands and features in a systematic fashion.
+
+New users should rather begin with Dynare User Guide (@cite{Mancini
+(2007)}), distributed with Dynare and also available from the
+@uref{http://www.dynare.org,official Dynare web site}.
+
+Other useful sources of information include the
+@uref{http://www.dynare.org,Dynare wiki} and the
+@uref{http://www.dynare.org/phpBB3, Dynare forums}.
+
+@node Installation and configuration
+@chapter Installation and configuration
+
+@menu
+* Software requirements::       
+* Installation of Dynare::      
+* Configuration::               
+@end menu
+
+@node Software requirements
+@section Software requirements
+
+Packaged versions of Dynare are available for Windows XP/Vista,
+@uref{http://www.debian.org,Debian GNU/Linux},
+@uref{http://www.ubuntu.com/,Ubuntu} and Mac OS X Leopard/Snow
+Leopard.  Dynare should work on other systems, but some compilation
+steps are necessary in that case.
+
+In order to run Dynare, you need at least one of the following:
+
+@itemize 
+
+@item
+MATLAB version 6.5 or above; note that no toolbox is needed by Dynare,
+
+@item
+GNU Octave version 3.0.0 or above.
+@end itemize
+
+Some installation instructions for GNU Octave can be found on the
+@uref{http://www.dynare.org/DynareWiki/DynareOctave,Dynare Wiki}.
+
+If you plan to use the @code{use_dll} option of the @code{model}
+command, you will need to install the necessary requirements for
+compiling MEX files on your machine. If you are using MATLAB under
+Windows, install a C++ compiler on your machine and configure it with
+MATLAB: see
+@uref{http://www.dynare.org/DynareWiki/ConfigureMatlabWindowsForMexCompilation,instructions
+on the Dynare wiki}. Users of Octave under Linux should install the
+package for MEX file compilation (under Debian or Ubuntu, it is called
+@file{octave3.2-headers} or @file{octave3.0-headers}). If you are
+using Octave or MATLAB under Mac OS X, you should install the latest
+version of XCode: see
+@uref{http://www.dynare.org/DynareWiki/InstallOnMacOSX,instructions on
+the Dynare wiki}. Mac OS X Octave users will also need to install
+gnuplot if they want graphing capabilities. Users of MATLAB under
+Linux and Mac OS X, and users of Octave under Windows, normally need
+to do nothing, since a working compilation environment is available by
+default.
+
+@node Installation of Dynare
+@section Installation of Dynare
+
+After installation, Dynare can be used in any directory on your
+computer. It is best practice to keep your model files in directories
+different from the one containing the Dynare toolbox. That way you can
+upgrade Dynare and discard the previous version without having to worry
+about your own files.
+
+@menu
+* On Windows::                  
+* On Debian GNU/Linux and Ubuntu::  
+* On Mac OS X::                 
+* For other systems::           
+@end menu
+
+@node On Windows
+@subsection On Windows
+
+Execute the automated installer called @file{dynare-4.@var{x}.@var{y}-win.exe}
+(where 4.@var{x}.@var{y} is the version number), and follow the instructions. The
+default installation directory is @file{c:\dynare\4.@var{x}.@var{y}}.
+
+After installation, this directory will contain several sub-directories,
+among which are @file{matlab}, @file{mex} and @file{doc}.
+
+The installer will also add an entry in your Start Menu with a shortcut
+to the documentation files and uninstaller.
+
+Note that you can have several versions of Dynare coexisting (for
+example in @file{c:\dynare}), as long as you correctly adjust your path
+settings (@pxref{Some words of warning}).
+
+@node On Debian GNU/Linux and Ubuntu
+@subsection On Debian GNU/Linux and Ubuntu
+
+Please refer to the
+@uref{http://www.dynare.org/DynareWiki/InstallOnDebianOrUbuntu,Dynare
+Wiki} for detailed instructions.
+
+Dynare will be installed under @file{/usr/share/dynare} and
+@file{/usr/lib/dynare}. Documentation will be under
+@file{/usr/share/doc/dynare}.
+
+@node On Mac OS X
+@subsection On Mac OS X
+
+Execute the automated installer called
+@file{dynare-4.@var{x}.@var{y}-macosx-10.5+10.6.pkg} (where
+4.@var{x}.@var{y} is the version number), and follow the
+instructions. The default installation directory is
+@file{/Applications/Dynare/4.@var{x}.@var{y}}.
+
+Please refer to the
+@uref{http://www.dynare.org/DynareWiki/InstallOnMacOSX,Dynare Wiki} for
+detailed instructions.
+
+After installation, this directory will contain several sub-directories,
+among which are @file{matlab}, @file{mex} and @file{doc}.
+
+Note that you can have several versions of Dynare coexisting (for
+example in @file{c:\dynare}), as long as you correctly adjust your path
+settings (@pxref{Some words of warning}).
+
+@node For other systems
+@subsection For other systems
+
+You need to download Dynare source code from the
+@uref{http://www.dynare.org,Dynare website} and unpack it somewhere.
+
+Then you will need to recompile the pre-processor and the dynamic
+loadable libraries. Please refer to
+@uref{http://www.dynare.org/DynareWiki/BuildingDynareFromSource,Dynare
+Wiki}.
+
+@node Configuration
+@section Configuration
+
+@menu
+* For MATLAB::                  
+* For GNU Octave::              
+* Some words of warning::       
+@end menu
+
+@node For MATLAB
+@subsection For MATLAB
+
+You need to add the @file{matlab} subdirectory of your Dynare
+installation to MATLAB path. You have two options for doing that:
+
+@itemize 
+
+@item
+Using the @code{addpath} command in the MATLAB command window:
+
+Under Windows, assuming that you have installed Dynare in the standard
+location, and replacing @code{4.@var{x}.@var{y}} with the correct
+version number, type:
+
+@example
+addpath c:\dynare\4.@var{x}.@var{y}\matlab
+@end example
+
+Under Debian GNU/Linux or Ubuntu, type:
+
+@example
+addpath /usr/share/dynare/matlab
+@end example
+
+Under Mac OS X, assuming that you have installed Dynare in the standard
+location, and replacing @code{4.@var{x}.@var{y}} with the correct version
+number, type:
+
+@example
+addpath /Applications/Dynare/4.@var{x}.@var{y}/matlab/
+@end example
+
+MATLAB will not remember this setting next time you run it, and you
+will have to do it again.
+
+@item
+Via the menu entries:
+
+Select the ``Set Path'' entry in the ``File'' menu, then click on
+``Add Folder@dots{}'', and select the @file{matlab} subdirectory of your
+Dynare installation. Note that you @emph{should not} use ``Add with
+Subfolders@dots{}''. Apply the settings by clicking on ``Save''. Note that
+MATLAB will remember this setting next time you run it.
+@end itemize
+
+@node For GNU Octave
+@subsection For GNU Octave
+
+You need to add the @file{matlab} subdirectory of your Dynare
+installation to Octave path, using the @code{addpath} at the Octave
+command prompt.
+
+Under Windows, assuming that you have installed Dynare in the standard
+location, and replacing ``4.@var{x}.@var{y}'' with the correct version
+number, type:
+
+@example
+addpath c:\dynare\4.@var{x}.@var{y}\matlab
+@end example
+
+Under Debian GNU/Linux or Ubuntu, there is no need to use the
+@code{addpath} command; the packaging does it for you.
+
+Under Mac OS X, assuming that you have installed Dynare in the
+standard location, and replacing ``4.@var{x}.@var{y}'' with the correct
+version number, type:
+
+@example
+addpath /Applications/Dynare/4.@var{x}.@var{y}/matlab
+@end example
+
+If you are using an Octave version strictly older than 3.2.0, you will
+also want to tell to Octave to accept the short syntax (without
+parentheses and quotes) for the @code{dynare} command, by typing:
+
+@example
+mark_as_command dynare
+@end example
+
+If you don't want to type this command every time you run Octave, you
+can put it in a file called @file{.octaverc} in your home directory
+(under Windows this will generally by @file{c:\Documents and
+Settings\USERNAME\}). This file is run by Octave at every startup.
+
+@node Some words of warning
+@subsection Some words of warning
+
+You should be very careful about the content of your MATLAB or Octave
+path. You can display its content by simply typing @code{path} in the
+command window.
+
+The path should normally contain system directories of MATLAB or Octave,
+and some subdirectories of your Dynare installation. You have to
+manually add the @file{matlab} subdirectory, and Dynare will
+automatically add a few other subdirectories at runtime (depending on
+your configuration). You must verify that there is no directory coming
+from another version of Dynare than the one you are planning to use.
+
+You have to be aware that adding other directories to your path can
+potentially create problems, if some of your M-files have the same names
+than Dynare files. Your files would then override Dynare files, and make
+Dynare unusable.
+
+@node Dynare invocation
+@chapter Dynare invocation
+
+In order to give instructions to Dynare, the user has to write a
+@emph{model file} whose filename extension must be @file{.mod}. This
+file contains the description of the model and the computing tasks
+required by the user. Its contents is described in @ref{The Model file}.
+
+Once the model file is written, Dynare is invoked using the
+@code{dynare} command at the MATLAB or Octave prompt (with the filename
+of the @file{.mod} given as argument).
+
+In practice, the handling of the model file is done in two steps: in the
+first one, the model and the processing instructions written by the user
+in a @emph{model file} are interpreted and the proper MATLAB or GNU
+Octave instructions are generated; in the second step, the program
+actually runs the computations. Boths steps are triggered automatically
+by the @code{dynare} command.
+
+@deffn {MATLAB/Octave command} dynare @var{FILENAME}[.mod] [@var{OPTIONS}@dots{}]
+
+@descriptionhead
+
+This command launches Dynare and executes the instructions included in
+@file{@var{FILENAME}.mod}.  This user-supplied file contains the model
+and the processing instructions, as described in @ref{The Model file}.
+
+@code{dynare} begins by launching the preprocessor on the @file{.mod}
+file.  By default (unless @code{use_dll} option has been given to
+@code{model}), the preprocessor creates three intermediary files:
+
+@table @file
+
+@item @var{FILENAME}.m
+Contains variable declarations, and computing tasks
+
+@item @var{FILENAME}_dynamic.m
+Contains the dynamic model equations
+
+@item @var{FILENAME}_static.m
+Contains the long run static model equations
+@end table
+
+@noindent
+These files may be looked at to understand errors reported at the simulation stage.
+
+@code{dynare} will then run the computing tasks by executing @file{@var{FILENAME}.m}.
+
+@optionshead
+
+@table @code
+
+@item noclearall
+By default, @code{dynare} will issue a @code{clear all} command to
+MATLAB or Octave, thereby deleting all workspace variables; this options
+instructs @code{dynare} not to clear the workspace
+
+@item debug
+Instructs the preprocessor to write some debugging information about the
+scanning and parsing of the @file{.mod} file
+
+@item notmpterms
+Instructs the preprocessor to omit temporary terms in the static and
+dynamic files; this generally decreases performance, but is used for
+debugging purposes since it makes the static and dynamic files more
+readable
+
+@item savemacro[=@var{FILENAME}]
+Instructs @code{dynare} to save the intermediary file which is obtained
+after macro-processing (@pxref{Macro-processing language}); the saved
+output will go in the file specified, or if no file is specified in
+@file{@var{FILENAME}-macroexp.mod}
+
+@item onlymacro
+Instructs the preprocessor to only perform the macro-processing step,
+and stop just after. Mainly useful for debugging purposes or for using
+the macro-processor independently of the rest of Dynare toolbox.
+
+@item nolinemacro
+Instructs the macro-preprocessor to omit line numbering information in
+the intermediary @file{.mod} file created after the maco-processing
+step. Useful in conjunction with @code{savemacro} when one wants that to
+reuse the intermediary @file{.mod} file, without having it cluttered by
+line numbering directives.
+
+@item warn_uninit
+Display a warning for each variable or parameter which is not
+initialized. @xref{Parameter initialization}, or
+@ref{load_params_and_steady_state} for initialization of parameters.
+@xref{Initial and terminal conditions}, or
+@ref{load_params_and_steady_state} for initialization of endogenous
+and exogenous variables.
+
+@item console
+Activate console mode: Dynare will not use graphical waitbars for long
+computations. Note that this option is only useful under MATLAB, since
+Octave does not provide graphical waitbar capabilities.
+
+@item cygwin
+Tells Dynare that your MATLAB is configured for compiling MEX files with
+Cygwin (@pxref{Software requirements}). This option is only available
+under Windows, and is used in conjunction with @code{use_dll}.
+
+@item msvc
+Tells Dynare that your MATLAB is configured for compiling MEX files with
+Microsoft Visual C++ (@pxref{Software requirements}). This option is
+only available under Windows, and is used in conjunction with
+@code{use_dll}.
+
+@item parallel[=@var{CLUSTER_NAME}]
+Tells Dynare to perform computations in parallel. If @var{CLUSTER_NAME}
+is passed, Dynare will use the specified cluster to perform parallel
+computations. Otherwise, Dynare will use the first cluster specified in
+the configuration file. @xref{The Configuration File}, for more
+information about the configuration file.
+
+@item conffile=@var{FILENAME}
+Specifies the location of the configuration file if it differs from the
+default. @xref{The Configuration File}, for more information about the
+configuration file and its default location.
+
+@item parallel_slave_open_mode
+Instructs Dynare to leave the connection to the slave node open after
+computation is complete, closing this connection only when Dynare
+finishes processing.
+
+@item parallel_test
+Tests the parallel setup specified in the configuration file without
+executing the @file{.mod} file. @xref{The Configuration File}, for more
+information about the configuration file.
+@end table
+
+@outputhead
+
+Depending on the computing tasks requested in the @file{.mod} file,
+executing command @code{dynare} will leave in the workspace variables
+containing results available for further processing. More details are
+given under the relevant computing tasks.
+
+The @code{M_}, @code{oo_} and @code{options_} structures are also saved
+in a file called @file{@var{FILENAME}_results.mat}.
+
+@examplehead
+
+@example
+dynare ramst
+dynare ramst.mod savemacro   
+@end example
+
+@end deffn
+
+The output of Dynare is left into three main variables in the
+MATLAB/Octave workspace:
+
+@defvr {MATLAB/Octave variable} M_
+Structure containing various informations about the model.
+@end defvr
+
+@defvr {MATLAB/Octave variable} options_
+Structure contains the values of the various options used by Dynare
+during the computation.
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_
+Structure containing the various results of the computations.
+@end defvr
+
+@node The Model file
+@chapter The Model file
+
+@menu
+* Conventions::                 
+* Variable declarations::       
+* Expressions::                 
+* Parameter initialization::    
+* Model declaration::           
+* Auxiliary variables::         
+* Initial and terminal conditions::  
+* Shocks on exogenous variables::  
+* Other general declarations::  
+* Steady state::                
+* Getting information about the model::  
+* Deterministic simulation::    
+* Stochastic solution and simulation::  
+* Estimation::                  
+* Forecasting::                 
+* Optimal policy::              
+* Sensitivity and identification analysis::  
+* Displaying and saving results::  
+* Macro-processing language::   
+* Misc commands::               
+@end menu
+
+@node Conventions
+@section Conventions
+
+A model file contains a list of commands and of blocks.  Each command
+and each element of a block is terminated by a semicolon
+(@code{;}). Blocks are terminated by @code{end;}.
+
+Most Dynare commands have arguments and several accept options,
+indicated in parentheses after the command keyword. Several options
+are separated by commas.
+
+In the description of Dynare commands, the following conventions are
+observed:
+
+@itemize 
+
+@item
+optional arguments or options are indicated between square brackets:
+@samp{[]};
+
+@item
+repreated arguments are indicated by ellipses: ``@dots{}'';
+
+@item
+mutually exclusive arguments are separated by vertical bars: @samp{|};
+
+@item
+@var{INTEGER} indicates an integer number;
+
+@item
+@var{DOUBLE} indicates a double precision number. The following syntaxes
+are valid: @code{1.1e3}, @code{1.1E3}, @code{1.1d3}, @code{1.1D3};
+
+@item
+@var{EXPRESSION} indicates a mathematical expression valid outside the
+model description (@pxref{Expressions});
+
+@item
+@var{MODEL_EXPRESSION} indicates a mathematical expression valid in the
+model description (@pxref{Expressions} and @ref{Model declaration});
+
+@item
+@var{VARIABLE_NAME} indicates a variable name starting with an
+alphabetical character and can't contain: @samp{()+-*/^=!;:@@#.} or
+accentuated characters;
+
+@item
+@var{PARAMETER_NAME} indicates a parameter name starting with an
+alphabetical character and can't contain: @samp{()+-*/^=!;:@@#.} or
+accentuated characters;
+
+@item
+@var{LATEX_NAME} indicates a valid LaTeX expression in math mode (not
+including the dollar signs);
+
+@item
+@var{FUNCTION_NAME} indicates a valid MATLAB function name;
+
+@item
+@var{FILENAME} indicates a filename valid in the underlying operating
+system; it is necessary to put it between double quotes when specifying
+the extension or if the filename contains a non-alphanumeric character;
+
+@end itemize
+
+@node Variable declarations
+@section Variable declarations
+
+Declarations of variables and parameters are made with the following commands:
+
+@deffn Command var @var{VARIABLE_NAME} [$@var{LATEX_NAME}$]@dots{};
+@deffnx Command var (deflator = @var{MODEL_EXPRESSION}) @var{VARIABLE_NAME} [$@var{LATEX_NAME}$]@dots{};
+
+@descriptionhead
+
+This required command declares the endogenous variables in the
+model. @xref{Conventions}, for the syntax of @var{VARIABLE_NAME} and
+@var{MODEL_EXPRESSION}. Optionally it is possible to give a LaTeX name
+to the variable or, if it nonstationary, provide information regarding
+its deflator.
+
+@code{var} commands can appear several times in the file and Dynare will
+concatenate them.
+
+@optionshead
+
+If the model is nonstationary and is to be written as such in the
+@code{model} block, Dynare will need the trend deflator for the
+appropriate endogenous variables in order to stationarize the model. The
+trend deflator must be provided alongside the variables that follow this
+trend.
+
+@table @code
+
+@item deflator = @var{MODEL_EXPRESSION}
+The expression used to detrend an endogenous variable. All trend
+variables, endogenous variables and parameters referenced in
+@var{MODEL_EXPRESSION} must already have been declared by the
+@code{trend_var}, @code{var} and @code{parameters} commands.
+@end table
+
+@examplehead
+
+@example
+var c gnp q1 q2;
+var(deflator=A) i b;
+@end example
+
+@end deffn
+
+@deffn Command varexo @var{VARIABLE_NAME} [$@var{LATEX_NAME}$]@dots{};
+
+@descriptionhead
+
+This optional command declares the exogenous variables in the model.
+@xref{Conventions}, for the syntax of @var{VARIABLE_NAME}. Optionally it
+is possible to give a LaTeX name to the variable.
+
+Exogenous variables are required if the user wants to be able to apply
+shocks to her model.
+
+@code{varexo} commands can appear several times in the file and Dynare
+will concatenate them.
+
+@examplehead
+
+@example
+varexo m gov;
+@end example
+
+@end deffn
+
+@deffn Command varexo_det @var{VARIABLE_NAME} [$@var{LATEX_NAME}$]@dots{};
+
+@descriptionhead
+
+This optional command declares exogenous deterministic variables in a
+stochastic model. See @ref{Conventions}, for the syntax of
+@var{VARIABLE_NAME}. Optionally it is possible to give a LaTeX name to
+the variable.
+
+It is possible to mix deterministic and stochastic shocks to build
+models where agents know from the start of the simulation about future
+exogenous changes. In that case @code{stoch_simul} will compute the
+rational expectation solution adding future information to the state
+space (nothing is shown in the output of @code{stoch_simul}) and
+@code{forecast} will compute a simulation conditional on initial
+conditions and future information.
+
+@code{varexo_det} commands can appear several times in the file and
+Dynare will concatenate them.
+
+@examplehead
+
+@example
+
+varexo m gov;
+varexo_det tau;
+    
+@end example
+
+@end deffn
+
+@deffn Command parameters @var{PARAMETER_NAME} [$@var{LATEX_NAME}$]@dots{};
+
+@descriptionhead
+
+This command declares parameters used in the model, in variable
+initialization or in shocks declarations. See @ref{Conventions}, for the
+syntax of @var{PARAMETER_NAME}. Optionally it is possible to give a
+LaTeX name to the parameter.
+
+The parameters must subsequently be assigned values (@pxref{Parameter
+initialization}).
+
+@code{parameters} commands can appear several times in the file and
+Dynare will concatenate them.
+
+@examplehead
+
+@example
+parameters alpha, bet;
+@end example
+
+@end deffn
+
+@deffn Command change_type (var | varexo | varexo_det | parameters) @var{VARIABLE_NAME} | @var{PARAMETER_NAME}@dots{};
+
+@descriptionhead
+
+Changes the types of the specified variables/parameters to another type:
+endogenous, exogenous, exogenous deterministic or parameter.
+
+It is important to understand that this command has a global effect on
+the @file{.mod} file: the type change is effective after, but also
+before, the @code{change_type} command. This command is typically used
+when flipping some variables for steady state calibration: typically a
+separate model file is used for calibration, which includes the list of
+variable declarations with the macro-processor, and flips some variable.
+
+@examplehead
+
+@example
+var y, w;
+parameters alpha, bet;
+@dots{}
+change_type(var) alpha, bet;
+change_type(parameters) y, w;
+@end example
+
+Here, in the whole model file, @code{alpha} and @code{beta} will be
+endogenous and @code{y} and @code{w} will be parameters.
+
+@end deffn
+
+@anchor{predetermined_variables}
+@deffn Command predetermined_variables @var{VARIABLE_NAME}@dots{};
+
+@descriptionhead
+
+In Dynare, the default convention is that the timing of a variable
+reflects when this variable is decided. The typical example is for
+capital stock: since the capital stock used at current period is
+actually decided at the previous period, then the capital stock entering
+the production function is @code{k(-1)}, and the law of motion of
+capital must be written:
+
+@example
+k = i + (1-delta)*k(-1)
+@end example
+
+Put another way, for stock variables, the default in Dynare is to use a
+``stock at the end of the period'' concept, instead of a ``stock at the
+beginning of the period'' convention.
+
+The @code{predetermined_variables} is used to change that
+convention. The endogenous variables declared as predetermined variables
+are supposed to be decided one period ahead of all other endogenous
+variables. For stock variables, they are supposed to follow a ``stock at
+the beginning of the period'' convention.
+
+@examplehead
+
+The following two program snippets are strictly equivalent.
+
+@emph{Using default Dynare timing convention:} 
+
+@example
+var y, k, i;
+@dots{}
+model;
+y = k(-1)^alpha;
+k = i + (1-delta)*k(-1);
+@dots{}
+end;
+@end example
+
+@emph{Using the alternative timing convention:} 
+
+@example
+var y, k, i;
+predetermined_variables k;
+@dots{}
+model;
+y = k^alpha;
+k(+1) = i + (1-delta)*k;
+@dots{}
+end;
+@end example
+
+@end deffn
+
+@deffn Command trend_var (growth_factor = @var{MODEL_EXPRESSION}) @var{VARIABLE_NAME} [$@var{LATEX_NAME}$]@dots{};
+
+@descriptionhead
+
+This optional command declares the trend variables in the
+model. @xref{Conventions}, for the syntax of @var{MODEL_EXPRESSION} and
+@var{VARIABLE_NAME}. Optionally it is possible to give a LaTeX name to
+the variable.
+
+Trend variables are required if the user wants to be able to write a
+nonstationary model in the @code{model} block. The @code{trend_var}
+command must appear before the @code{var} command that references the
+trend variable.
+
+@code{trend_var} commands can appear several times in the file and
+Dynare will concatenate them.
+
+If the model is nonstationary and is to be written as such in the
+@code{model} block, Dynare will need the growth factor of every trend
+variable in order to stationarize the model. The growth factor must be
+provided within the declaration of the trend variable, using the
+@code{growth_factor} keyword. All endogenous variables and
+parameters referenced in @var{MODEL_EXPRESSION} must already have been
+declared by the @code{var} and @code{parameters} commands.
+
+@examplehead
+
+@example
+trend_var (growth_factor=gA) A;
+@end example
+
+@end deffn
+
+@node Expressions
+@section Expressions
+
+Dynare distinguishes between two types of mathematical expressions:
+those that are used to describe the model, and those that are used
+outside the model block (@i{e.g.} for initializing parameters or
+variables, or as command options). In this manual, those two types of
+expressions are respectively denoted by @var{MODEL_EXPRESSION} and
+@var{EXPRESSION}.
+
+Unlike MATLAB or Octave expressions, Dynare expressions are necessarily
+scalar ones: they cannot contain matrices or evaluate to
+matrices@footnote{Note that arbitrary MATLAB or Octave expressions can
+be put in a @file{.mod} file, but those expressions have to be on
+separate lines, generally at the end of the file for post-processing
+purposes. They are not interpreted by Dynare, and are simply passed on
+unmodified to MATLAB or Octave. Those constructions are not addresses in
+this section.}.
+
+Expressions can be constructed using integers (@var{INTEGER}), floating
+point numbers (@var{DOUBLE}), parameter names (@var{PARAMETER_NAME}),
+variable names (@var{VARIABLE_NAME}), operators and functions.
+
+The following special constants are also accepted in some contexts:
+
+@deffn Constant inf
+Represents infinity.
+@end deffn
+
+@deffn Constant nan
+``Not a number'': represents an undefined or unrepresentable value.
+@end deffn
+
+@menu
+* Parameters and variables::    
+* Operators::                   
+* Functions::                   
+@end menu
+
+@node Parameters and variables
+@subsection Parameters and variables
+
+Parameters and variables can be introduced in expressions by simply
+typing their names. The semantics of parameters and variables is quite
+different whether they are used inside or outside the model block.
+
+@menu
+* Inside the model::            
+* Outside the model::           
+@end menu
+
+@node Inside the model
+@subsubsection Inside the model
+
+Parameters used inside the model refer to the value given through
+parameter initialization (@pxref{Parameter initialization}) or
+@code{homotopy_setup} when doing a simulation, or are the estimated
+variables when doing an estimation.
+
+Variables used in a @var{MODEL_EXPRESSION} denote @emph{current period}
+values when neither a lead or a lag is given. A lead or a lag can be
+given by enclosing an integer between parenthesis just after the
+variable name: a positive integer means a lead, a negative one means a
+lag. Leads or lags of more than one period are allowed. For example, if
+@code{c} is an endogenous variable, then @code{c(+1)} is the variable
+one period ahead, and @code{c(-2)} is the variable two periods before.
+
+When specifying the leads and lags of endogenous variables, it is
+important to respect the following convention: in Dynare, the timing of
+a variable reflects when that variable is decided. A control variable ---
+which by definition is decided in the current period --- must have no
+lead. A predetermined variable --- which by definition has been decided in
+a previous period --- must have a lag. A consequence of this is that all
+stock variables must use the ``stock at the end of the period''
+convention. Please refer to @cite{Mancini-Griffoli (2007)} for more
+details and concrete examples.
+
+Leads and lags are primarily used for endogenous variables, but can be
+used for exogenous variables. They have no effect on parameters and are
+forbidden for local model variables (@pxref{Model declaration}).
+
+@node Outside the model
+@subsubsection Outside the model
+
+When used in an expression outside the model block, a parameter or a
+variable simply refers to the last value given to that variable. More
+precisely, for a parameter it refers to the value given in the
+corresponding parameter initialization (@pxref{Parameter
+initialization}); for an endogenous or exogenous variable, it refers to
+the value given in the most recent @code{initval} or @code{endval} block.
+
+@node Operators
+@subsection Operators
+
+The following operators are allowed in both @var{MODEL_EXPRESSION} and
+@var{EXPRESSION}:
+
+@itemize 
+
+@item
+binary arithmetic operators: @code{+}, @code{-}, @code{*}, @code{/}, @code{^}
+
+@item
+unary arithmetic operators: @code{+}, @code{-}
+
+@item
+binary comparison operators (which evaluate to either @code{0} or
+@code{1}): @code{<}, @code{>}, @code{<=}, @code{>=}, @code{==},
+@code{!=}
+@end itemize
+
+The following special operators are accepted in @var{MODEL_EXPRESSION}
+(but not in @var{EXPRESSION}):
+
+@deffn Operator STEADY_STATE (@var{MODEL_EXPRESSION})
+This operator is used to take the value of the enclosed expression at
+the steady state. A typical usage is in the Taylor rule, where you may
+want to use the value of GDP at steady state to compute the output gap.
+@end deffn
+
+@anchor{expectation}
+@deffn Operator EXPECTATION (@var{INTEGER}) (@var{MODEL_EXPRESSION})
+This operator is used to take the expectation of some expression using
+a different information set than the information available at current
+period. For example, @code{EXPECTATION(-1)(x(+1))} is equal to the
+expected value of variable @code{x} at next period, using the
+information set available at the previous period. Note that a value
+of @code{0} for the time shift component is reserved for partial
+information models (not yet fully implemented). @xref{Auxiliary
+variables}, for an explanation of how this operator is handled
+internally and how this affects the output.
+@end deffn
+
+@node Functions
+@subsection Functions
+
+@menu
+* Built-in Functions::          
+* External Functions::          
+@end menu
+
+@node Built-in Functions
+@subsubsection Built-in Functions
+
+The following standard functions are supported internally for both
+@var{MODEL_EXPRESSION} and @var{EXPRESSION}:
+
+@defun exp (@var{x})
+Natural exponential.
+@end defun
+
+@defun log (@var{x})
+@defunx ln (@var{x})
+Natural logarithm.
+@end defun
+
+@defun log10 (@var{x})
+Base 10 logarithm.
+@end defun
+
+@defun sqrt (@var{x})
+Square root.
+@end defun
+
+@defun sin (@var{x})
+@defunx cos (@var{x})
+@defunx tan (@var{x})
+@defunx asin (@var{x})
+@defunx acos (@var{x})
+@defunx atan (@var{x})
+Trigonometric functions.
+@end defun
+
+@defun max (@var{a}, @var{b})
+@defunx min (@var{a}, @var{b})
+Maximum and minimum of two reals.
+@end defun
+
+@defun normcdf (@var{x})
+@defunx normcdf (@var{x}, @var{mu}, @var{sigma})
+Gaussian cumulative density function, with mean @var{mu} and standard
+deviation @var{sigma}. Note that @code{normcdf(@var{x})} is equivalent
+to @code{normcdf(@var{x},0,1)}.
+@end defun
+
+@defun normpdf (@var{x})
+@defunx normpdf (@var{x}, @var{mu}, @var{sigma})
+Gaussian probability density function, with mean @var{mu} and standard
+deviation @var{sigma}. Note that @code{normpdf(@var{x})} is equivalent
+to @code{normpdf(@var{x},0,1)}.
+@end defun
+
+@defun erf (@var{x})
+Gauss error function.
+@end defun
+
+@node External Functions
+@subsubsection External Functions
+
+Any other user-defined (or built-in) MATLAB or Octave function may be
+used in both a @var{MODEL_EXPRESSION} and an @var{EXPRESSION}, provided
+that this function has a scalar argument as a return value.
+
+To use an external function in a @var{MODEL_EXPRESSION}, one must
+declare the function using the @code{external_function} statement. This
+is not necessary for external functions used in an @var{EXPRESSION}.
+
+@deffn Command external_function (@var{OPTIONS}@dots{});
+
+@descriptionhead
+
+This command declares the external functions used in the model block. It
+is required for every unique function used in the model block.
+
+@code{external_function} commands can appear several times in the file
+and must come before the model block.
+
+@optionshead
+
+@table @code
+
+@item name = @var{NAME}
+The name of the function, which must also be the name of the M-/MEX file
+implementing it. This option is mandatory.
+
+@item nargs = @var{INTEGER}
+The number of arguments of the function. If this option is not provided,
+Dynare assumes @code{nargs = 1}.
+
+@item first_deriv_provided [= @var{NAME}]
+If @var{NAME} is provided, this tells Dynare that the Jacobian is
+provided as the only output of the M-/MEX file given as the option
+argument. If @var{NAME} is not provided, this tells Dynare that the
+M-/MEX file specified by the argument passed to @code{name} returns the
+Jacobian as its second output argument.
+
+@item second_deriv_provided [= @var{NAME}]
+If @var{NAME} is provided, this tells Dynare that the Hessian is
+provided as the only output of the M-/MEX file given as the option
+argument. If @var{NAME} is not provided, this tells Dynare that the
+M-/MEX file specified by the argument passed to @code{name} returns the
+Hessian as its third output argument. NB: This option can only be used
+if the @code{first_deriv_provided} option is used in the same
+@code{external_function} command.
+@end table
+
+@examplehead
+
+@example
+external_function(name = funcname);
+external_function(name = otherfuncname, nargs = 2,
+                  first_deriv_provided, second_deriv_provided);
+external_function(name = yetotherfuncname, nargs = 3,
+                  first_deriv_provided = funcname_deriv);
+@end example
+
+@end deffn
+
+@node Parameter initialization
+@section Parameter initialization
+
+When using Dynare for computing simulations, it is necessary to
+calibrate the parameters of the model. This is done through parameter
+initialization.
+
+The syntax is the following:
+
+@example
+@var{PARAMETER_NAME} = @var{EXPRESSION};
+@end example
+
+Here is an example of calibration:
+
+@example
+parameters alpha, bet;
+
+beta = 0.99;
+alpha = 0.36;
+A = 1-alpha*beta;
+@end example
+
+Internally, the parameter values are stored in @code{M_.params}:
+
+@defvr {MATLAB/Octave variable} M_.params
+
+Contains the values of model parameters. The parameters are in the
+order that was used in the @code{parameters} command.
+
+@end defvr
+
+
+@node Model declaration
+@section Model declaration
+
+The model is declared inside a @code{model} block:
+
+@deffn Block model ;
+@deffnx Block model (@var{OPTIONS}@dots{});
+
+@descriptionhead
+
+The equations of the model are written in a block delimited by
+@code{model} and @code{end} keywords.
+
+There must be as many equations as there are endogenous variables in the
+model, except when computing the unconstrained optimal policy with
+@code{ramsey_policy} or @code{discretionary_policy}.
+
+The syntax of equations must follow the conventions for
+@var{MODEL_EXPRESSION} as described in @ref{Expressions}. Each equation
+must be terminated by a semicolon (@samp{;}). A normal equation looks
+like:
+@example
+@var{MODEL_EXPRESSION} = @var{MODEL_EXPRESSION};
+@end example
+
+When the equations are written in homogenous form, it is possible to
+omit the @samp{=0} part and write only the left hand side of the
+equation. A homogenous equation looks like:
+@example
+@var{MODEL_EXPRESSION};
+@end example
+
+Inside the model block, Dynare allows the creation of @emph{model-local
+variables}, which constitute a simple way to share a common expression
+between several equations. The syntax consists of a pound sign
+(@code{#}) followed by the name of the new model local variable (which
+must @strong{not} be declared as in @ref{Variable declarations}), an equal
+sign, and the expression for which this new variable will stand. Later
+on, every time this variable appears in the model, Dynare will
+substitute it by the expression assigned to the variable. Note that the
+scope of this variable is restricted to the model block; it cannot be
+used outside. A model local variable declaration looks like:
+@example
+# @var{VARIABLE_NAME} = @var{MODEL_EXPRESSION};
+@end example
+
+@optionshead
+
+@table @code
+
+@item linear
+Declares the model as being linear. It spares oneself from having to
+declare initial values for computing the steady state, and it sets
+automatically @code{order=1} in @code{stoch_simul}.
+
+@item use_dll
+@anchor{use_dll}
+Instructs the preprocessor to create dynamic loadable libraries (DLL)
+containing the model equations and derivatives, instead of writing those
+in M-files. You need a working compilation environment, @i{i.e.}
+a working @code{mex} command (see @ref{Software requirements} for more
+details). Using this option can result in faster simulations or
+estimations, at the expense of some initial compilation
+time.@footnote{In particular, for big models, the compilation step can
+be very time-consuming, and use of this option may be counter-productive
+in those cases.}
+
+@item block
+@anchor{block}
+Perform the block decomposition of the model, and exploit it in
+computations. See
+@uref{http://www.dynare.org/DynareWiki/FastDeterministicSimulationAndSteadyStateComputation,Dynare
+wiki} for details on the algorithm.
+
+@item bytecode
+@anchor{bytecode}
+Instead of M-files, use a bytecode representation of the model, @i{i.e.}
+a binary file containing a compact representation of all the equations.
+
+@item cutoff = @var{DOUBLE}
+Threshold under which a jacobian element is considered as null during
+the model normalization. Only available with option
+@code{block}. Default: @code{1e-15}
+
+@item mfs = @var{INTEGER}
+Controls the handling of minimum feedback set of endogenous
+variables. Only available with option @code{block}. Possible values:
+
+@table @code
+
+@item 0
+All the endogenous variables are considered as feedback variables (Default).
+
+@item 1
+The endogenous variables assigned to equation naturally normalized
+(@i{i.e.} of the form @math{x=f(Y)} where @math{x} does not appear in
+@math{Y}) are potentially recursive variables. All the other variables
+are forced to belong to the set of feedback variables.
+
+@item 2
+In addition of variables with @code{mfs = 1} the endogenous variables
+related to linear equations which could be normalized are potential
+recursive variables. All the other variables are forced to belong to
+the set of feedback variables.
+
+@item 3
+In addition of variables with @code{mfs = 2} the endogenous variables
+related to non-linear equations which could be normalized are
+potential recursive variables. All the other variables are forced to
+belong to the set of feedback variables.
+@end table
+
+@item no_static
+Don't create the static model file. This can be useful for models which
+don't have a steady state.
+@end table
+
+@customhead{Example 1: elementary RBC model}
+
+@example
+var c k;
+varexo x;
+parameters aa alph bet delt gam;
+
+model;
+c =  - k + aa*x*k(-1)^alph + (1-delt)*k(-1);
+c^(-gam) = (aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam)/(1+bet);
+end;
+@end example
+
+@customhead{Example 2: use of model local variables}
+
+The following program:
+
+@example
+model;
+# gamma = 1 - 1/sigma;
+u1 = c1^gamma/gamma;
+u2 = c2^gamma/gamma;
+end;
+@end example
+
+@noindent
+@dots{}is formally equivalent to:
+
+@example
+model;
+u1 = c1^(1-1/sigma)/(1-1/sigma);
+u2 = c2^(1-1/sigma)/(1-1/sigma);
+end;
+@end example
+
+@customhead{Example 3: a linear model}
+
+@example
+model(linear);
+x = a*x(-1)+b*y(+1)+e_x;
+y = d*y(-1)+e_y;
+end;
+@end example
+
+@end deffn
+
+Dynare has the ability to output the list of model equations to a
+LaTeX file, using the @code{write_latex_dynamic_model} command. The
+static model can also be written with the
+@code{write_latex_static_model} command.
+
+@anchor{write_latex_dynamic_model}
+@deffn Command write_latex_dynamic_model ;
+
+@descriptionhead
+
+This command creates a LaTeX file containing the (dynamic) model.
+
+If your @file{.mod} file is @file{@var{FILENAME}.mod}, then Dynare
+will create a file called @file{@var{FILENAME}_dynamic.tex},
+containing the list of all the dynamic model equations.
+
+If LaTeX names were given for variables and parameters
+(@pxref{Variable declarations}), then those will be used; otherwise,
+the plain text names will be used.
+
+Time subscripts (@code{t}, @code{t+1}, @code{t-1}, @dots{}) will be
+appended to the variable names, as LaTeX subscripts.
+
+Note that the model written in the TeX file will differ from the model
+declared by the user in the following dimensions:
+
+@itemize 
+
+@item
+the timing convention of predetermined variables
+(@pxref{predetermined_variables}) will have been changed to the
+default Dynare timing convention; in other words, variables declared
+as predetermined will be lagged on period back,
+
+@item
+the expectation operators (@pxref{expectation}) will have
+been removed, replaced by auxiliary variables and new equations as
+explained in the documentation of the operator,
+
+@item
+endogenous variables with leads or lags greater or equal than two will
+have been removed, replaced by new auxiliary variables and equations,
+
+@item
+for a stochastic model, exogenous variables with leads or lags will
+also have been replaced by new auxiliary variables and equations.
+@end itemize
+
+@end deffn
+
+@deffn Command write_latex_static_model ;
+
+@descriptionhead
+
+This command creates a LaTeX file containing the static model.
+
+If your @file{.mod} file is @file{@var{FILENAME}.mod}, then Dynare
+will create a file called @file{@var{FILENAME}_static.tex}, containing
+the list of all the equations of the steady state model.
+
+If LaTeX names were given for variables and parameters
+(@pxref{Variable declarations}), then those will be used; otherwise,
+the plain text names will be used.
+
+Note that the model written in the TeX file will differ from the model
+declared by the user in the some dimensions
+(@pxref{write_latex_dynamic_model} for details).
+
+Also note that this command will not output the contents of the
+optional @code{steady_state_model} block (@pxref{steady_state_model});
+it will rather output a static version (@i{i.e.} without leads and
+lags) of the dynamic model declared in the @code{model} block.
+
+@end deffn
+
+@node Auxiliary variables
+@section Auxiliary variables
+
+The model which will is solved internally by Dynare is not exactly the
+model declared by the user. In some cases, Dynare will introduce
+auxiliary endogenous variables --- along with corresponding auxiliary
+equations ---, which will appear in the final output.
+
+The main transformation concerns leads and lags. Dynare will perform a
+transformation of the model so that there is only one lead and one lag
+on endogenous, and, in the case of a stochastic model, no lead/lag on
+exogenous.
+
+This transformation is achieved by the creation of auxiliary
+variables, and corresponding equations. For example, if @code{x(+2)}
+exists in the model, Dynare will create one auxiliary variable
+@code{AUX_ENDO_LEAD = x(+1)}, and replace @code{x(+2)} by
+@code{AUX_ENDO_LEAD(+1)}.
+
+A similar transformation is done for lags greater than 2 on endogenous
+(auxiliary variables will have a name beginning with
+@code{AUX_ENDO_LAG}), and for exogenous with leads and lags (auxiliary
+variables will have a name beginning with @code{AUX_EXO_LEAG} or
+@code{AUX_EXO_LAG} respectively).
+
+Another transformation is done for the @code{EXPECTATION}
+operator. For each occurence of this operator, Dynare creates an
+auxiliary variable equal to @code{AUX_EXPECT_LAG_1 = x(+2)}, and
+replaces the expectation operator by @code{AUX_EXPECT_LAG_1(-1)}.
+
+Once created, all auxiliary variables are included in the set of
+endogenous variables. The output of decision rules (see below) is such
+that auxiliary variable names are replaced by the original variables
+they refer to.
+
+@vindex M_.orig_endo_nbr
+@vindex M_.endo_nbr
+The number of endogenous variables before the creation of auxiliary
+variables is stored in @code{M_.orig_endo_nbr}, and the number of
+endogenous variables after the creation of auxiliary variables is
+stored in @code{M_.endo_nbr}.
+
+See @uref{http://www.dynare.org/DynareWiki/AuxiliaryVariables,Dynare
+Wiki} for more technical details on auxiliary variables.
+
+@node Initial and terminal conditions
+@section Initial and terminal conditions
+
+For most simulation exercises, it is necessary to provide initial (and
+possibly terminal) conditions. It is also necessary to provide initial
+guess values for non-linear solvers. This section describes the
+statements used for those purposes.
+
+In many contexts (determistic or stochastic), it is necessary to
+compute the steady state of a non-linear model: @code{initval} then
+specifies numerical initial values for the non-linear solver. The
+command @code{resid} can be used to compute the equation residuals for
+the given initial values.
+
+Used in perfect foresight mode, the types of forward-loking models for
+which Dynare was designed require both initial and terminal
+conditions. Most often these initial and terminal conditions are
+static equilibria, but not necessarily.
+
+One typical application is to consider an economy at the equilibrium,
+trigger a shock in first period, and study the trajectory of return at
+the initial equilbrium. To do that, one needs @code{initval} and
+@code{shocks} (@pxref{Shocks on exogenous variables}.
+
+Another one is to study, how an economy, starting from arbitrary
+initial conditions converges toward equilibrium. To do that, one needs
+@code{initval} and @code{endval}.
+
+For models with lags on more than one period, the command
+@code{histval} permits to specify different historical initial values
+for periods before the beginning of the simulation.
+
+@deffn Block initval ;
+
+@descriptionhead
+
+The @code{initval} block serves two purposes: declaring the initial
+(and possibly terminal) conditions in a simulation exercise, and
+providing guess values for non-linear solvers.
+
+This block is terminated by @code{end;}, and contains lines of the
+form:
+@example
+@var{VARIABLE_NAME} = @var{EXPRESSION};
+@end example
+
+@customhead{In a deterministic (@i{i.e.} perfect foresight) model}
+
+First, it provides the initial conditions for all the endogenous and
+exogenous variables at all the periods preceeding the first simulation
+period (unless some of these initial values are modified by
+@code{histval}).
+
+Second, in the absence of an @code{endval} block, it sets the terminal
+conditions for all the periods succeeding the last simulation period.
+
+Third, in the absence of an @code{endval} block, it provides initial
+guess values at all simulation dates for the non-linear solver
+implemented in @code{simul}.
+
+For this last reason, it necessary to provide values for all the
+endogenous variables in an @code{initval} block (even though,
+theoretically, initial conditions are only necessary for lagged
+variables). If some exogenous variables are not mentionned in the
+@code{initval} block, a zero value is assumed.
+
+Note that if the @code{initval} block is immediately followed by a
+@code{steady} command, its semantics is changed. The @code{steady}
+command will compute the steady state of the model for all the
+endogenous variables, assuming that exogenous variables are kept
+constant to the value declared in the @code{initval} block, and using
+the values declared for the endogenous as initial guess values for the
+non-linear solver. An @code{initval} block followed by @code{steady}
+is formally equivalent to an @code{initval} block with the same values
+for the exogenous, and with the associated steady state values for the
+endogenous.
+
+@customhead{In a stochastic model}
+
+The main purpose of @code{initval} is to provide initial guess values
+for the non-linear solver in the steady state computation. Note that
+if the @code{initval} block is not followed by @code{steady}, the
+steady state computation will still be triggered by subsequent
+commands (@code{stoch_simul}, @code{estimation}@dots{}).
+
+It is not necessary to declare @code{0} as initial value for exogenous
+stochastic variables, since it is the only possible value.
+
+This steady state will be used as the initial condition at all the
+periods preceeding the first simulation period for the two possible
+types of simulations in stochastic mode:
+
+@itemize 
+
+@item
+in @code{stoch_simul}, if the @code{periods} options is specified
+
+@item
+in @code{forecast} (in this case, note that it is still possible to
+modify some of these initial values with @code{histval})
+@end itemize
+
+@examplehead
+
+@example
+initval;
+c = 1.2;
+k = 12;
+x = 1;
+end;
+
+steady;
+@end example
+
+@end deffn
+
+@deffn Block endval ;
+
+@descriptionhead
+
+This block is terminated by @code{end;}, and contains lines of the
+form:
+@example
+@var{VARIABLE_NAME} = @var{EXPRESSION};
+@end example
+
+The @code{endval} block makes only sense in a determistic model, and
+serves two purposes.
+
+First, it sets the terminal conditions for all the periods succeeding
+the last simulation period.
+
+Second, it provides initial guess values at all the simulation dates
+for the non-linear solver implemented in @code{simul}.
+
+For this last reason, it necessary to provide values for all the
+endogenous variables in an @code{endval} block (even though,
+theoretically, initial conditions are only necessary for forward
+variables). If some exogenous variables are not mentionned in the
+@code{endval} block, a zero value is assumed.
+
+Note that if the @code{endval} block is immediately followed by a
+@code{steady} command, its semantics is changed. The @code{steady}
+command will compute the steady state of the model for all the
+endogenous variables, assuming that exogenous variables are kept
+constant to the value declared in the @code{endval} block, and using
+the values declared for the endogenous as initial guess values for the
+non-linear solver. An @code{endval} block followed by @code{steady} is
+formally equivalent to an @code{endval} block with the same values for
+the exogenous, and with the associated steady state values for the
+endogenous.
+
+@examplehead
+
+@example
+var c k;
+varexo x;
+@dots{}
+initval;
+c = 1.2;
+k = 12;
+x = 1;
+end;
+
+steady;
+
+endval;
+c = 2;
+k = 20;
+x = 2;
+end;
+
+steady;
+@end example
+
+The initial equilibrium is computed by @code{steady} for @code{x=1},
+and the terminal one, for @code{x=2}.
+
+@end deffn
+
+@deffn Block histval ;
+
+@descriptionhead
+
+In models with lags on more than one period, the @code{histval} block
+permits to specify different historical initial values for different
+periods.
+
+This block is terminated by @code{end;}, and contains lines of the
+form:
+@example
+@var{VARIABLE_NAME}(@var{INTEGER}) = @var{EXPRESSION};
+@end example
+
+@var{EXPRESSION} is any valid expression returning a numerical value
+and can contain already initialized variable names.
+
+By convention in Dynare, period 1 is the first period of the
+simulation. Going backward in time, the first period before the start
+of the simulation is period @code{0}, then period @code{-1}, and so on.
+
+If your lagged variables are linked by identities, be careful to
+satisfy these identities when you set historical initial values.
+
+@examplehead
+
+@example
+var x y;
+varexo e;
+
+model;
+x = y(-1)^alpha*y(-2)^(1-alpha)+e;
+@dots{}
+end;
+
+initval;
+x = 1;
+y = 1;
+e = 0.5;
+end;
+
+steady;
+
+histval;
+y(0) = 1.1;
+y(-1) = 0.9;
+end;
+@end example
+
+@end deffn
+
+@deffn Command resid ;
+
+This command will display the residuals of the static equations of the
+model, using the values given for the endogenous in the last
+@code{initval} or @code{endval} block (or the steady state file if you
+provided one, @pxref{Steady state}).
+
+@end deffn
+
+
+@deffn Command initval_file (filename = @var{FILENAME});
+
+@descriptionhead
+
+In a deterministic setup, this command is used to specify a path for
+all endogenous and exogenous variables. The length of these paths must
+be equal to the number of simulation periods, plus the number of leads
+and the number of lags of the model (for example, with 50 simulation
+periods, in a model with 2 lags and 1 lead, the paths must have a
+length of 53). Note that these paths cover two different things:
+
+@itemize 
+
+@item
+the constraints of the problem, which are given by the path for
+exogenous and the initial and terminal values for endogenous
+
+@item
+the initial guess for the non-linear solver, which is given by the
+path for endogenous variables for the simulation periods (excluding
+initial and terminal conditions)
+@end itemize
+
+The command accepts three file formats:
+
+@itemize 
+
+@item
+M-file (extension @file{.m}): for each endogenous and exogenous
+variable, the file must contain a row vector of the same name.
+
+@item
+MAT-file (extension @file{.mat}): same as for M-files.
+
+@item
+Excel file (extension @file{.xls}): for each endogenous and exogenous,
+the file must contain a column of the same name (not supported under Octave).
+@end itemize
+
+@customhead{Warning}
+
+The extension must be omitted in the command argument. Dynare will
+automatically figure out the extension and select the appropriate file
+type.
+
+@end deffn
+
+@node Shocks on exogenous variables
+@section Shocks on exogenous variables
+
+In a deterministic context, when one wants to study the transition of
+one equilibrium position to another, it is equivalent to analyze the
+consequences of a permanent shock and this in done in Dynare through
+the proper use of @code{initval} and @code{endval}.
+
+Another typical experiment is to study the effects of a temporary
+shock after which the system goes back to the original equilibrium (if
+the model is stable@dots{}). A temporary shock is a temporary change of
+value of one or several exogenous variables in the model. Temporary
+shocks are specified with the command @code{shocks}.
+
+In a stochastic framework, the exogenous variables take random values
+in each period. In Dynare, these random values follow a normal
+distribution with zero mean, but it belongs to the user to specify the
+variability of these shocks. The non-zero elements of the matrix of
+variance-covariance of the shocks can be entered with the @code{shocks}
+command. Or, the entire matrix can be direclty entered with
+@code{Sigma_e} (this use is however deprecated).
+
+If the variance of an exogenous variable is set to zero, this variable
+will appear in the report on policy and transition functions, but
+isn't used in the computation of moments and of Impulse Response
+Functions. Setting a variance to zero is an easy way of removing an
+exogenous shock.
+
+@deffn Block shocks ;
+
+@customhead{In deterministic context}
+
+For deterministic simulations, the @code{shocks} block specifies
+temporary changes in the value of an exogenous variables. For
+permanent shocks, use an @code{endval} block.
+
+The block should contain one or several occurrences of the following
+group of three lines:
+
+@example
+var @var{VARIABLE_NAME}; 
+periods @var{INTEGER}[:@var{INTEGER}] [[,] @var{INTEGER}[:@var{INTEGER}]]@dots{};
+values @var{DOUBLE} | (@var{EXPRESSION})  [[,] @var{DOUBLE} | (@var{EXPRESSION}) ]@dots{};
+@end example
+
+It is possible to specify shocks which last several periods and which can
+vary over time. The @code{periods} keyword accepts a list of
+several dates or date ranges, which must be matched by as many shock values
+in the @code{values} keyword. Note that a range in the
+@code{periods} keyword must be matched by only one value in the
+@code{values} keyword: this syntax means that the exogenous
+will have a constant value over the range.
+
+Note that shock values are not restricted to numerical constants:
+arbitrary expressions are also allowed, but you have to enclose them
+inside parentheses.
+
+Here is an example:
+
+@example
+shocks;
+var e;
+periods 1;
+values 0.5;
+var u;
+periods 4:5;
+values 0;
+var v;
+periods 4:5 6 7:9;
+values 1 1.1 0.9;
+var w;
+periods 1 2;
+values (1+p) (exp(z));
+end;
+@end example
+
+@customhead{In stochastic context}
+
+For stochastic simulations, the @code{shocks} block specifies the non
+zero elements of the covariance matrix of the shocks of exogenous
+variables.
+
+You can use the following types of entries in the block:
+
+@table @code
+
+@item var @var{VARIABLE_NAME}; stderr @var{EXPRESSION};
+Specifies the standard error of a variable.
+
+@item var @var{VARIABLE_NAME} = @var{EXPRESSION};
+Specifies the variance error of a variable.
+
+@item var @var{VARIABLE_NAME}, @var{VARIABLE_NAME} = @var{EXPRESSION};
+Specifies the covariance of two variables.
+
+@item corr @var{VARIABLE_NAME}, @var{VARIABLE_NAME} = @var{EXPRESSION};
+Specifies the correlation of two variables.
+
+@end table
+
+In an estimation context, it is also possible to specify variances and
+covariances on endogenous variables: in that case, these values are
+interpreted as the calibration of the measurement errors on these
+variables.
+
+Here is an example:
+
+@example
+shocks;
+var e = 0.000081;
+var u; stderr 0.009;
+corr e, u = 0.8;
+var v, w = 2;
+end;
+@end example
+
+@customhead{Mixing determininistic and stochastic shocks}
+
+It is possible to mix deterministic and stochastic shocks to build
+models where agents know from the start of the simulation about future
+exogenous changes. In that case @code{stoch_simul} will compute the
+rational expectation solution adding future information to the state
+space (nothing is shown in the output of @code{stoch_simul}) and
+@code{forecast} will compute a simulation conditional on initial
+conditions and future information.
+
+Here is an example:
+
+@example
+varexo_det tau;
+varexo e;
+
+@dots{}
+
+shocks;
+var e; stderr 0.01;
+var tau;
+periods 1:9;
+values -0.15;
+end;
+
+stoch_simul(irf=0);
+
+forecast;
+@end example
+
+@end deffn
+
+
+@deffn Block mshocks ;
+
+The purpose of this block is similar to that of the @code{shocks}
+block for deterministic shocks, except that the numeric values given
+will be interpreted in a multiplicative way. For example, if a value
+of @code{1.05} is given as shock value for some exogenous at some
+date, it means 5% above its steady state value (as given by the last
+@code{initval} or @code{endval} block).
+
+The syntax is the same than @code{shocks} in a deterministic context.
+
+This command is only meaningful in two situations:
+
+@itemize 
+
+@item
+on exogenous variables with a non-zero steady state, in a deterministic setup,
+
+@item
+on deterministic exogenous variables with a non-zero steady state, in
+a stochastic setup.
+@end itemize
+
+@end deffn
+
+@defvr {Special variable} Sigma_e
+
+@customhead{Warning}
+
+@strong{The use of this special variable is deprecated and is strongly
+discouraged.} You should use a @code{shocks} block instead.
+
+@descriptionhead
+
+This special variable specifies directly the covariance matrix of the
+stochastic shocks, as an upper (or lower) triangular matrix. Dynare
+builds the corresponding symmetrix matrix. Each row of the triangular
+matrix, except the last one, must be terminated by a semi-colon
+@code{;}. For a given element, an arbitrary @var{EXPRESSION} is
+allowed (instead of a simple constant), but in that case you need to
+enclose the expression in parentheses. @emph{The order of the
+covariances in the matrix is the same as the one used in the
+@code{varexo} declaration.}
+
+@examplehead
+
+@example
+
+varexo u, e;
+@dots{}
+Sigma_e = [ 0.81 (phi*0.9*0.009);
+            0.000081];
+@end example
+
+This sets the variance of @code{u} to 0.81, the variance of @code{e}
+to 0.000081, and the correlation between @code{e} and @code{u} to
+@code{phi}.
+
+@end defvr
+
+@node Other general declarations
+@section Other general declarations
+
+@deffn {Command} dsample @var{INTEGER} [@var{INTEGER}];
+Reduces the number of periods considered in subsequent output commands.
+@end deffn
+
+@deffn {Command} periods @var{INTEGER};
+
+@descriptionhead
+
+This command is now deprecated (but will still work for older model
+files). It is not necessary when no simulation is performed and is
+replaced by an option @code{periods} in @code{simul} and
+@code{stoch_simul}.
+
+This command sets the number of periods in the simulation. The periods
+are numbered from @code{1} to @var{INTEGER}. In perfect foresight
+simulations, it is assumed that all future events are perfectly known
+at the beginning of period @code{1}.
+
+@examplehead
+
+@example
+periods 100;
+@end example
+
+@end deffn
+
+@node Steady state
+@section Steady state
+
+There are two ways of computing the steady state (@i{i.e.} the static
+equilibrium) of a model. The first way is to let Dynare compute the
+steady state using a nonlinear Newton-type solver; this should work
+for most models, and is relatively simple to use. The second way is to
+give more guidance to Dynare, using your knowledge of the model, by
+providing it with a ``steady state file''.
+
+@menu
+* Finding the steady state with Dynare nonlinear solver::  
+* Using a steady state file::   
+@end menu
+
+@node Finding the steady state with Dynare nonlinear solver
+@subsection Finding the steady state with Dynare nonlinear solver
+
+@deffn Command steady ;
+@deffnx Command steady (@var{OPTIONS}@dots{});
+
+@descriptionhead
+
+This command computes the steady state of a model using a nonlinear
+Newton-type solver.
+
+More precisely, it computes the equilibrium value of the endogenous
+variables for the value of the exogenous variables specified in the
+previous @code{initval} or @code{endval} block.
+
+@code{steady} uses an iterative procedure and takes as initial guess
+the value of the endogenous variables set in the previous
+@code{initval} or @code{endval} block.
+
+For complicated models, finding good numerical initial values for the
+endogenous variables is the trickiest part of finding the equilibrium
+of that model. Often, it is better to start with a smaller model and
+add new variables one by one.
+
+@optionshead
+
+@table @code
+
+@item solve_algo = @var{INTEGER}
+@anchor{solve_algo}
+Determines the non-linear solver to use. Possible values for the option are:
+
+@table @code
+
+@item 0
+Use @code{fsolve} (under MATLAB, only available if you have the
+Optimization Toolbox; always available under Octave)
+
+@item 1
+Use Dynare's own nonlinear equation solver
+
+@item 2
+Splits the model into recursive blocks and solves each block in turn
+
+@item 3
+Use Chris Sims' solver
+
+@item 4
+Similar to value @code{2}, except that it deals differently with
+nearly singular Jacobian
+
+@item 5
+Newton algorithm with a sparse Gaussian elimination (SPE) (requires
+@code{bytecode} option, @pxref{Model declaration})
+
+@item 6
+Newton algorithm with a sparse LU solver at each iteration (requires
+@code{bytecode} and/or @code{block} option, @pxref{Model declaration})
+
+@item 7
+Newton algorithm with a Generalized Minimal Residual (GMRES) solver at
+each iteration (requires @code{bytecode} and/or @code{block} option,
+@pxref{Model declaration}; not available under Octave))
+
+@item 8
+Newton algorithm with a Stabilized Bi-Conjugate Gradient (BICGSTAB)
+solver at each iteration (requires @code{bytecode} and/or @code{block}
+option, @pxref{Model declaration})
+@end table
+
+@noindent
+Default value is @code{2}.
+
+@item homotopy_mode = @var{INTEGER}
+Use a homotopy (or divide-and-conquer) technique to solve for the
+steady state. If you use this option, you must specify a
+@code{homotopy_setup} block. This option can take three possible
+values:
+
+@table @code
+
+@item 1
+In this mode, all the parameters are changed simultaneously, and the
+distance between the boudaries for each parameter is divided in as
+many intervals as there are steps (as defined by @code{homotopy_steps}
+option); the problem is solves as many times as there are steps.
+
+@item 2
+Same as mode @code{1}, except that only one parameter is changed at a
+time; the problem is solved as many times as steps times number of
+parameters.
+
+@item 3
+Dynare tries first the most extreme values. If it fails to compute the
+steady state, the interval between initial and desired values is
+divided by two for all parameters. Every time that it is impossible to
+find a steady state, the previous interval is divided by two. When it
+succeeds to find a steady state, the previous interval is multiplied
+by two. In that last case @code{homotopy_steps} contains the maximum
+number of computations attempted before giving up.
+@end table
+
+@item homotopy_steps = @var{INTEGER}
+Defines the number of steps when performing a homotopy. See
+@code{homotopy_mode} option for more details.
+@end table
+
+@examplehead
+
+@xref{Initial and terminal conditions}.
+
+@end deffn
+
+After computation, the steady state is available in the following
+variable:
+
+@defvr {MATLAB/Octave variable} oo_.steady_state
+
+Contains the computed steady state.
+
+Endogenous variables are ordered in order of declaration used in
+@code{var} command (which is also the order used in @code{M_.endo_names}). 
+
+@end defvr
+
+@deffn Block homotopy_setup ;
+
+@descriptionhead
+
+This block is used to declare initial and final values when using
+a homotopy method. It is used in conjunction with the option
+@code{homotopy_mode} of the @code{steady} command.
+
+The idea of homotopy (also called divide-and-conquer by some authors)
+is to subdivide the problem of finding the steady state into smaller
+problems. It assumes that you know how to compute the steady state for
+a given set of parameters, and it helps you finding the steady state
+for another set of parameters, by incrementally moving from one to
+another set of parameters.
+
+The purpose of the @code{homotopy_setup} block is to declare the final
+(and possibly also the initial) values for the parameters or exogenous
+that will be changed during the homotopy. It should contain lines of
+the form:
+
+@example
+@var{VARIABLE_NAME}, @var{EXPRESSION}, @var{EXPRESSION};
+@end example
+
+This syntax specifies the initial and final values of a given
+parameter/exogenous.
+
+There is an alternative syntax:
+@example
+@var{VARIABLE_NAME}, @var{EXPRESSION};
+@end example
+
+Here only the final value is specified for a given
+parameter/exogenous; the initial value is taken from the preceeding
+@code{initval} block.
+
+A necessary condition for a successful homotopy is that Dynare must be
+able to solve the steady state for the initial parameters/exogenous
+without additional help (using the guess values given in the
+@code{initval} block).
+
+If the homotopy fails, a possible solution is to increase the number
+of steps (given in @code{homotopy_steps} option of @code{steady}).
+
+@examplehead
+
+In the following example, Dynare will first compute the steady state
+for the initial values (@code{gam=0.5} and @code{x=1}), and then
+subdivide the problem into 50 smaller problems to find the steady
+state for the final values (@code{gam=2} and @code{x=2}).
+
+@example
+var c k;
+varexo x;
+
+parameters alph gam delt bet aa;
+alph=0.5;
+delt=0.02;
+aa=0.5;
+bet=0.05;
+
+model;
+c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
+c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
+end;
+
+initval;
+x = 1;
+k = ((delt+bet)/(aa*x*alph))^(1/(alph-1));
+c = aa*x*k^alph-delt*k;
+end;
+
+homotopy_setup;
+gam, 0.5, 2;
+x, 2;
+end;
+
+steady(homotopy_mode = 1, homotopy_steps = 50);
+@end example
+
+@end deffn
+
+@node Using a steady state file
+@subsection Using a steady state file
+
+If you know how to compute the steady state for your model, you can
+provide a MATLAB/Octave function doing the computation instead of
+using @code{steady}. If your MOD-file is called
+@file{@var{FILENAME}.mod}, the steady state file should be called
+@file{@var{FILENAME}_steadystate.m}.
+
+Again, there are two options for creating this file:
+
+@itemize
+
+@item
+You can write this file by hand. See @file{fs2000_steadystate.m}
+in the @file{examples} directory for an example. This is the option
+which gives the most flexibility, at the expense of a heavier
+programming burden.
+
+@item
+You can use the @code{steady_state_model} block, for a more
+user-friendly interface.
+
+@end itemize
+
+@anchor{steady_state_model}
+@deffn Block steady_state_model ;
+
+@descriptionhead
+
+When the analytical solution of the model is known, this command can
+be used to help Dynare find the steady state in a more efficient and
+reliable way, especially during estimation where the steady state has
+to be recomputed for every point in the parameter space.
+
+Each line of this block consists of a variable (either an endogenous,
+a temporary variable or a parameter) which is assigned an expression
+(which can contain parameters, exogenous at the steady state, or any
+endogenous or temporary variable already declared above). Each line
+therefore looks like:
+
+@example
+@var{VARIABLE_NAME} = @var{EXPRESSION};
+@end example
+
+Note that it is also possible to assign several variables at the same
+time, if the main function in the right hand side is a MATLAB/Octave
+function returning several arguments:
+
+@example
+[ @var{VARIABLE_NAME}, @var{VARIABLE_NAME}@dots{} ] = @var{EXPRESSION};
+@end example
+
+Dynare will automatically generate a steady state file using the
+information provided in this block.
+
+@examplehead
+
+@example
+var m P c e W R k d n l gy_obs gp_obs y dA;
+varexo e_a e_m;
+
+parameters alp bet gam mst rho psi del;
+
+@dots{}
+// parameter calibration, (dynamic) model declaration, shock calibration@dots{}
+@dots{}
+
+steady_state_model;
+  dA = exp(gam);
+  gst = 1/dA; // A temporary variable
+  m = mst;
+  
+  // Three other temporary variables
+  khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
+  xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
+  nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
+
+  n  = xist/(nust+xist);
+  P  = xist + nust;
+  k  = khst*n;
+
+  l  = psi*mst*n/( (1-psi)*(1-n) );
+  c  = mst/P;
+  d  = l - mst + 1;
+  y  = k^alp*n^(1-alp)*gst^alp;
+  R  = mst/bet;
+
+  // You can use MATLAB functions which return several arguments
+  [W, e] = my_function(l, n);
+  
+  gp_obs = m/dA;
+  gy_obs = dA;
+end;
+
+steady;
+@end example
+
+@end deffn
+
+
+@node Getting information about the model
+@section Getting information about the model
+
+@deffn Command check ;
+@deffnx Command check (solve_algo = @var{INTEGER}) ;
+
+@descriptionhead
+
+Computes the eigenvalues of the model linearized around the values
+specified by the last @code{initval}, @code{endval} or @code{steady}
+statement. Generally, the eigenvalues are only meaningful if the
+linearization is done around a steady state of the model. It is a
+device for local analysis in the neighborhood of this steady state.
+
+A necessary condition for the uniqueness of a stable equilibrium in
+the neighborhood of the steady state is that there are as many
+eigenvalues larger than one in modulus as there are forward looking
+variables in the system. An additional rank condition requires that
+the square submatrix of the right Schur vectors corresponding to the
+forward looking variables (jumpers) and to the explosive eigenvalues
+must have full rank.
+
+@optionshead
+
+@table @code
+
+@item solve_algo = @var{INTEGER}
+@xref{solve_algo}, for the possible values and their meaning.
+@end table
+
+@outputhead
+
+@code{check} returns the eigenvalues in the global variable
+@code{oo_.dr.eigval}.
+
+@end deffn
+
+@defvr {MATLAB/Octave variable} oo_.dr.eigval
+Contains the eigenvalues of the model, as computed by the @code{check}
+command.
+@end defvr
+
+@deffn Command model_info ;
+
+@descriptionhead
+
+This command provides information about:
+
+@itemize 
+
+@item
+the normalization of the model: an endogenous variable is attributed
+to each equation of the model;
+
+@item
+the block structure of the model: for each block model_info indicates
+its type, the equations number and endogenous variables belonging to
+this block.
+
+@end itemize
+
+This command can only be used in conjunction with the @code{block}
+option of the @code{model} block.
+
+There are five different types of blocks depending on the simulation
+method used:
+
+@table @samp
+
+@item EVALUATE FORWARD
+In this case the block contains only equations where endogenous
+variable attributed to the equation appears currently on the left hand
+side and where no forward looking endogenous variables appear. The
+block has the form: @math{y_{j,t} = f_j(y_t, y_{t-1}, \ldots, y_{t-k})}.
+
+@item EVALUATE BACKWARD
+The block contains only equations where endogenous variable attributed
+to the equation appears currently on the left hand side and where no
+backward looking endogenous variables appear. The block has the form:
+@math{y_{j,t} = f_j(y_t, y_{t+1}, \ldots, y_{t+k})}.
+
+@item SOLVE FORWARD @var{x}
+The block contains only equations where endogenous variable attributed
+to the equation does not appear currently on the left hand side and
+where no forward looking endogenous variables appear. The block has
+the form: @math{g_j(y_{j,t}, y_t, y_{t-1}, \ldots, y_{t-k})=0}.
+@var{x} is equal to @samp{SIMPLE} if the block has only one
+equation. If several equation appears in the block, @var{x} is equal
+to @samp{COMPLETE}.
+
+@item SOLVE FORWARD @var{x}
+The block contains only equations where endogenous variable attributed
+to the equation does not appear currently on the left hand side and
+where no backward looking endogenous variables appear. The block has
+the form: @math{g_j(y_{j,t}, y_t, y_{t+1}, \ldots,
+y_{t+k})=0}. @var{x} is equal to @samp{SIMPLE} if the block has only
+one equation. If several equation appears in the block, @var{x} is
+equal to @samp{COMPLETE}.
+
+@item SOLVE TWO BOUNDARIES @var{x}
+The block contains equations depending on both forward and backward
+variables. The block looks like: @math{g_j(y_{j,t}, y_t, y_{t-1},
+\ldots, y_{t-k} ,y_t, y_{t+1}, \ldots, y_{t+k})=0}. @var{x} is equal
+to @samp{SIMPLE} if the block has only one equation. If several
+equation appears in the block, @var{x} is equal to @samp{COMPLETE}.
+@end table
+
+@end deffn
+
+@deffn Command print_bytecode_dynamic_model ;
+Prints the equations and the Jacobian matrix of the dynamic model
+stored in the bytecode binary format file. Can only be used in
+conjunction with the @code{bytecode} option of the @code{model} block.
+@end deffn
+
+@deffn Command print_bytecode_static_model ;
+Prints the equations and the Jacobian matrix of the static model
+stored in the bytecode binary format file. Can only be used in
+conjunction with the @code{bytecode} option of the @code{model} block.
+@end deffn
+
+@node Deterministic simulation
+@section Deterministic simulation
+
+When the framework is deterministic, Dynare can be used for models
+with the assumption of perfect foresight. Typically, the system is
+supposed to be in a state of equilibrium before a period @samp{1} when
+the news of a contemporaneous or of a future shock is learned by the
+agents in the model. The purpose of the simulation is to describe the
+reaction in anticipation of, then in reaction to the shock, until the
+system returns to the old or to a new state of equilibrium. In most
+models, this return to equilibrium is only an asymptotic phenomenon,
+which one must approximate by an horizon of simulation far enough in
+the future.  Another exercise for which Dynare is well suited is to
+study the transition path to a new equilibrium following a permanent
+shock.  For deterministic simulations, Dynare uses a Newton-type
+algorithm, first proposed by @cite{Laffargue (1990)} and
+@cite{Boucekkine (1995)}, instead of a first order technique like the
+one proposed by @cite{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 can
+be found in @cite{Juillard (1996)}.
+
+@deffn Command simul ;
+@deffnx Command simul (@var{OPTIONS}@dots{});
+
+@descriptionhead
+
+Triggers the computation of a deterministic simulation of the model
+for the number of periods set in the option @code{periods}.
+
+@optionshead
+
+@table @code
+
+@item periods = @var{INTEGER}
+Number of periods of the simulation
+
+@item stack_solve_algo = @var{INTEGER}
+Algorithm used for computing the solution. Possible values are:
+
+@table @code
+
+@item 0
+Newton method to solve simultaneously all the equations for every
+period, see @cite{Juillard (1996)} (Default).
+
+@item 1
+Use a Newton algorithm with a sparse LU solver at each iteration
+(requires @code{bytecode} and/or @code{block} option, @pxref{Model
+declaration}).
+
+@item 2
+Use a Newton algorithm with a Generalized Minimal Residual (GMRES)
+solver at each iteration (requires @code{bytecode} and/or @code{block}
+option, @pxref{Model declaration}; not available under Octave)
+
+@item 3
+Use a Newton algorithm with a Stabilized Bi-Conjugate Gradient
+(BICGSTAB) solver at each iteration (requires @code{bytecode} and/or
+@code{block} option, @pxref{Model declaration}).
+
+@item 4
+Use a Newton algorithm with a optimal path length at each iteration
+(requires @code{bytecode} and/or @code{block} option, @pxref{Model
+declaration}).
+
+@item 5
+Use a Newton algorithm with a sparse Gaussian elimination (SPE) solver
+at each iteration (requires @code{bytecode} option, @pxref{Model
+declaration}).
+@end table
+
+@item markowitz = @var{DOUBLE}
+Value of the Markowitz criterion, used to select the pivot. Only used
+when @code{stack_solve_algo = 5}. Default: @code{0.5}.
+
+@item minimal_solving_periods = @var{INTEGER}
+Specify the minimal number of periods where the model has to be
+solved, before using a constant set of operations for the remaining
+periods. Only used when @code{stack_solve_algo = 5}. Default: @code{1}.
+
+@item datafile = @var{FILENAME}
+If the variables of the model are not constant over time, their
+initial values, stored in a text file, could be loaded, using that
+option, as initial values before a deteministic simulation.
+@end table
+
+@outputhead
+
+The simulated endogenous variables are available in global matrix
+@code{oo_.endo_simul}.
+
+@end deffn
+
+@anchor{oo_.endo_simul}
+@defvr {MATLAB/Octave variable} oo_.endo_simul
+This variable stores the result of a deterministic simulation
+(computed by @code{simul}) or of a stochastic simulation (computed by
+@code{stoch_simul} with the @code{periods} option).
+
+The variables are arranged row by row, in order of declaration (as in
+@code{M_.endo_names}). Note that this variable also contains initial
+and terminal conditions, so it has more columns than the value of
+@code{periods} option.
+@end defvr
+
+@node Stochastic solution and simulation
+@section Stochastic solution and simulation
+
+In a stochastic context, Dynare computes one or several simulations
+corresponding to a random draw of the shocks. Dynare uses a Taylor
+approximation, up to third order, of the expectation functions (see
+@cite{Judd (1996)}, @cite{Collard and Juillard (2001a)}, @cite{Collard
+and Juillard (2001b)}, and @cite{Schmitt-Grohé and Uríbe (2004)}).
+
+@menu
+* Computing the stochastic solution::  
+* Typology and ordering of variables::  
+* First order approximation::   
+* Second order approximation::  
+* Third order approximation::   
+@end menu
+
+@node Computing the stochastic solution
+@subsection Computing the stochastic solution
+
+@deffn Command stoch_simul [@var{VARIABLE_NAME}@dots{}];
+@deffnx Command stoch_simul (@var{OPTIONS}@dots{}) [@var{VARIABLE_NAME}@dots{}];
+
+@descriptionhead
+
+@code{stoch_simul} solves a stochastic (@i{i.e.} rational
+expectations) model, using perturbation techniques.
+
+More precisely, @code{stoch_simul} computes a Taylor approximation of
+the decision and transition functions for the model. Using this, it
+computes impulse response functions and various descriptive statistics
+(moments, variance decomposition, correlation and autocorrelation
+coefficients). For correlated shocks, the variance decomposition is
+computed as in the VAR literature through a Cholesky decomposition of
+the covariance matrix of the exogenous variables. When the shocks are
+correlated, the variance decomposition depends upon the order of the
+variables in the @code{varexo} command.
+
+The Taylor approximation is computed around the steady state
+(@pxref{Steady state}).
+
+The IRFs are computed as the difference between the trajectory of a
+variable following a shock at the beginning of period 1 and its steady
+state value.
+
+Variance decomposition, correlation, autocorrelation are only
+displayed for variables with positive variance. Impulse response
+functions are only plotted for variables with response larger than
+@math{10^{-10}}.
+
+Variance decomposition is computed relative to the sum of the
+contribution of each shock. Normally, this is of course equal to
+aggregate variance, but if a model generates very large variances, it
+may happen that, due to numerical error, the two differ by a
+significant amount. Dynare issues a warning if the maximum relative
+difference between the sum of the contribution of each shock and
+aggregate variance is larger than 0.01%.
+
+Currently, the IRFs are only plotted for 12 variables. Select the ones
+you want to see, if your model contains more than 12 endogenous
+variables.
+
+The covariance matrix of the shocks is specified with the
+@code{shocks} command (@pxref{Shocks on exogenous variables}).
+
+When a list of @var{VARIABLE_NAME} is specified, results are displayed
+only for these variables.
+
+@optionshead
+
+@table @code
+
+@item ar = @var{INTEGER}
+@anchor{ar}
+Order of autocorrelation coefficients to compute and to print. Default: @code{5}.
+
+@item drop = @var{INTEGER}
+Number of points dropped at the beginning of simulation before
+computing the summary statistics. Default: @code{100}.
+
+@item hp_filter = @var{INTEGER}
+Uses HP filter with @math{\lambda} = @var{INTEGER} before computing
+moments. Default: no filter.
+
+@item hp_ngrid = @var{INTEGER}
+Number of points in the grid for the discrete Inverse Fast Fourier
+Transform used in the HP filter computation. It may be necessary to
+increase it for highly autocorrelated processes. Default: @code{512}.
+
+@item irf = @var{INTEGER}
+@anchor{irf} 
+Number of periods on which to compute the IRFs. Setting @code{irf=0},
+suppresses the plotting of IRF's. Default: @code{40}.
+
+@item relative_irf
+Requests the computation of normalized IRFs in percentage of the
+standard error of each shock.
+
+@item linear
+Indicates that the original model is linear (put it rather in the
+@code{model} command).
+
+@item nocorr
+Don't print the correlation matrix (printing them is the default).
+
+@item nofunctions
+Don't print the coefficients of the approximated solution (printing
+them is the default).
+
+@item nomoments
+Don't print moments of the endogenous variables (printing them is the
+default).
+
+@item nograph.
+@anchor{nograph}
+Doesn't do the graphs. Useful for loops.
+
+@item noprint
+Don't print anything. Useful for loops.
+
+@item print
+Print results (opposite of @code{noprint}).
+
+@item order = @var{INTEGER}
+@anchor{order}
+Order of Taylor approximation. Acceptable values are @code{1},
+@code{2} and @code{3}. Note that for third order,
+@code{k_order_solver} option is implied and only empirical moments are
+available (you must provide a value for @code{periods}
+option). Default: @code{2}.
+
+@item k_order_solver
+@anchor{k_order_solver}
+Use a k-order solver (implemented in C++) instead of the default
+Dynare solver. This option is not yet compatible with the
+@code{bytecode} option (@pxref{Model declaration}. Default: disabled
+for order 1 and 2, enabled otherwise
+
+@item periods = @var{INTEGER}
+@vindex oo_.endo_simul
+If different from zero, empirical moments will be computed instead of
+theoretical moments. The value of the option specifies the number of
+periods to use in the simulations. Values of the @code{initval} block,
+possibly recomputed by @code{steady}, will be used as starting point
+for the simulation. The simulated endogenous variables are made
+available to the user in a vector for each variable and in the global
+matrix @code{oo_.endo_simul} (@pxref{oo_.endo_simul}). Default: @code{0}.
+
+@item qz_criterium = @var{DOUBLE}
+Value used to split stable from unstable eigenvalues in reordering the
+Generalized Schur decomposition used for solving 1^st order
+problems. Default: @code{1.000001} (except when estimating with
+@code{lik_init} option equal to @code{1}: the default is
+@code{0.999999} in that case; @pxref{Estimation}).
+
+@item replic = @var{INTEGER}
+Number of simulated series used to compute the IRFs. Default: @code{1}
+if @code{order}=@code{1}, and @code{50} otherwise.
+
+@item solve_algo = @var{INTEGER}
+@xref{solve_algo}, for the possible values and their meaning.
+
+@item aim_solver
+@anchor{aim_solver}
+Use the Anderson-Moore Algorithm (AIM) to compute the decision rules,
+instead of using Dynare's default method based on a generalized Schur
+decomposition. This option is only valid for first order
+approximation. See
+@uref{http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html,AIM
+website} for more details on the algorithm.
+
+@item conditional_variance_decomposition = @var{INTEGER}
+@anchor{conditional_variance_decomposition = INTEGER}
+See below.
+
+@item conditional_variance_decomposition = [@var{INTEGER1}:@var{INTEGER2}]
+See below.
+
+@item conditional_variance_decomposition = [@var{INTEGER1} @var{INTEGER2} @dots{}]
+Computes a conditional variance decomposition for the specified
+period(s). Conditional variances are given by
+@math{var(y_{t+k}|t)}. For period 1, the conditional variance
+decomposition provides the decomposition of the effects of shocks upon
+impact.
+
+@item pruning
+Discard higher order terms when iteratively computing simulations of
+the solution, as in @cite{Schaumburg and Sims (2008)}.
+
+@item partial_information
+@anchor{partial_information}
+Computes the solution of the model under partial information, along
+the lines of @cite{Currie and Levine (1986)}. Agents are supposed to
+observe only some variables of the economy. The set of observed
+variables is declared using the @code{varobs} command. Note that if
+@code{varobs} is not present or contains all endogenous variables, then
+this is the full information case and this option has no effect.
+@end table
+
+@outputhead
+
+This command sets @code{oo_.dr}, @code{oo_.mean}, @code{oo_.var} and
+@code{oo_.autocorr}, which are described below.
+
+If option @code{periods} is present, sets @code{oo_.endo_simul}
+(@pxref{oo_.endo_simul}), and also saves the simulated variables in
+MATLAB/Octave vectors of the global workspace with the same name as
+the endogenous variables.
+
+If options @code{irf} is different from zero, sets @code{oo_.irfs}
+(see below) and also saves the IRFs in MATLAB/Octave vectors of
+the global workspace (this latter way of accessing the IRFs is
+deprecated and will disappear in a future version).
+
+
+@customhead{Example 1}
+
+@example
+shocks;
+var e;
+stderr 0.0348;
+end;
+
+stoch_simul;
+@end example
+
+Performs the simulation of the 2nd order approximation of a model
+with a single stochastic shock @code{e}, with a standard error of
+0.0348.
+
+@customhead{Example 2}
+
+@example
+stoch_simul(linear,irf=60) y k;
+@end example
+
+Performs the simulation of a linear model and displays impulse
+response functions on 60 periods for variables @code{y} and @code{k}.
+@end deffn
+
+@defvr {MATLAB/Octave variable} oo_.mean
+After a run of @code{stoch_simul}, contains the mean of the endogenous
+variables. Contains theoretical mean if the @code{periods} option is
+not present, and empirical mean otherwise. The variables are arranged
+in declaration order.
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.var
+After a run of @code{stoch_simul}, contains the variance-covariance of
+the endogenous variables. Contains theoretical variance if the
+@code{periods} option is not present, and empirical variance
+otherwise. The variables are arranged in declaration order.
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.autocorr
+After a run of @code{stoch_simul}, contains a cell array of the
+autocorrelation matrices of the endogenous variables. The element
+number of the matrix in the cell array corresponds to the order of
+autocorrelation. The option @code{ar} specifies the number of
+autocorrelation matrices available. Contains theoretical
+autocorrelations if the @code{periods} option is not present, and
+empirical autocorrelations otherwise.
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.irfs
+After a run of @code{stoch_simul} with option @code{irf} different
+from zero, contains the impulse responses, with the following naming
+convention: @code{@var{VARIABLE_NAME}_@var{SHOCK_NAME}}.
+
+For example, @code{oo_.irfs.gnp_ea} contains the effect on @code{gnp}
+of a one standard deviation shock on @code{ea}.
+@end defvr
+
+@vindex oo_.dr
+The approximated solution of a model takes the form of a set of decision
+rules or transition equations expressing the current value of the endogenous
+variables of the model as function of the previous state of the model and
+shocks oberved at the beginning of the period. The decision rules are stored
+in the structure @code{oo_.dr} which is described below.
+
+@node Typology and ordering of variables
+@subsection Typology and ordering of variables
+
+Dynare distinguishes four types of endogenous variables:
+
+@table @emph
+
+@item Purely backward (or purely predetermined) variables
+@vindex oo_.dr.npred
+@vindex oo_.dr.nboth
+Those that appear only at current and past period in the model, but
+not at future period (@i{i.e.} at @math{t} and @math{t-1} but not
+@math{t+1}). The number of such variables is equal to
+@code{oo_.dr.npred - oo_.dr.nboth}.
+
+@item Purely forward variables
+@vindex oo_.dr.nfwrd
+Those that appear only at current and future period in the model, but
+not at past period (@i{i.e.} at @math{t} and @math{t+1} but not
+@math{t-1}). The number of such variables is stored in
+@code{oo_.dr.nfwrd}.
+
+@item Mixed variables
+@vindex oo_.dr.nboth
+Those that appear at current, past and future period in the model
+(@i{i.e.} at @math{t}, @math{t+1} and @math{t-1}). The number of such
+variables is stored in @code{oo_.dr.nboth}.
+
+@item Static variables
+@vindex oo_.dr.nstatic
+Those that appear only at current, not past and future period in the
+model (@i{i.e.} only at @math{t}, not at @math{t+1} or
+@math{t-1}). The number of such variables is stored in
+@code{oo_.dr.nstatic}.
+@end table
+
+Note that all endogenous variables fall into one of these four
+categories, since after the creation of auxiliary variables
+(@pxref{Auxiliary variables}), all endogenous have at most one lead
+and one lag. We therefore have the following identity:
+
+@example
+oo_.dr.npred + oo_.dr.nfwrd + oo_.dr.nstatic = M_.endo_nbr
+@end example
+
+Internally, Dynare uses two orderings of the endogenous variables: the
+order of declaration (which is reflected in @code{M_.endo_names}), and
+an order based on the four types described above, which we will call
+the DR-order (``DR'' stands for decision rules). Most of the time, the
+declaration order is used, but for elements of the decision rules, the
+DR-order is used.
+
+The DR-order is the following: static variables appear first, then purely
+backward variables, then mixed variables, and finally purely forward
+variables. Inside each category, variables are arranged according to the
+declaration order.
+
+@vindex oo_.dr.order_var
+@vindex oo_.dr.inv_order_var
+Variable @code{oo_.dr.order_var} maps DR-order to declaration
+order, and variable @code{oo_.dr.inv_order_var} contains the
+inverse map. In other words, the k-th variable in the DR-order corresponds
+to the endogenous variable numbered @code{oo_.dr_order_var(k)} in
+declaration order. Conversely, k-th declared variable is numbered
+@code{oo_.dr.inv_order_var(k)} in DR-order.
+
+@vindex oo_.dr.npred
+Finally, the state variables of the model are the purely backward variables
+and the mixed variables. They are orderer in DR-order when they appear in
+decision rules elements. There are @code{oo_.dr.npred} such
+variables.
+
+@node First order approximation
+@subsection First order approximation
+
+The approximation has the form:
+
+@math{y_t = y^s + A y^h_{t-1} + B u_t}
+
+where @math{y^s} is the steady state value of @math{y} and
+@math{y^h_t=y_t-y^s}.
+
+The coefficients of the decision rules are stored as follows:
+
+@itemize 
+
+@item
+@vindex oo_.dr.ys
+@math{y^s} is stored in @code{oo_.dr.ys}. The vector rows
+correspond to all endogenous in the declaration order.
+
+@item
+@vindex oo_.dr.ghx
+A is stored in @code{oo_.dr.ghx}. The matrix rows correspond to all
+endogenous in DR-order. The matrix columns correspond to state
+variables in DR-order.
+
+@item
+@vindex oo_.dr.ghu
+B is stored @code{oo_.dr.ghu}. The matrix rows correspond to all
+endogenous in DR-order. The matrix columns correspond to exogenous
+variables in declaration order.
+@end itemize
+
+@node Second order approximation
+@subsection Second order approximation
+
+The approximation has the form:
+
+@math{y_t = y^s + 0.5 \Delta^2 +
+A y^h_{t-1} + B u_t + 0.5 C
+(y^h_{t-1}\otimes y^h_{t-1}) + 0.5 D
+(u_t \otimes u_t) + E
+(y^h_{t-1} \otimes u_t)}
+
+where @math{y^s} is the steady state value of @math{y},
+@math{y^h_t=y_t-y^s}, and @math{\Delta^2} is the shift effect of the
+variance of future shocks.
+
+The coefficients of the decision rules are stored in the variables
+described for first order approximation, plus the following variables:
+
+@itemize 
+
+@item
+@vindex oo_.dr.ghs2
+@math{\Delta^2} is stored in @code{oo_.dr.ghs2}. The vector rows
+correspond to all endogenous in DR-order.
+
+@item
+@vindex oo_.dr.ghxx
+@math{C} is stored in @code{oo_.dr.ghxx}. The matrix rows
+correspond to all endogenous in DR-order. The matrix columns correspond
+to the Kronecker product of the vector of state variables in DR-order.
+
+@item
+@vindex oo_.dr.ghuu
+@math{D} is stored in @code{oo_.dr.ghuu}. The matrix rows correspond
+to all endogenous in DR-order. The matrix columns correspond to the
+Kronecker product of exogenous variables in declaration order.
+
+@item
+@vindex oo_.dr.ghxu
+@math{E} is stored in @code{oo_.dr.ghxu}. The matrix rows correspond
+to all endogenous in DR-order. The matrix columns correspond to the
+Kronecker product of the vector of state variables (in DR-order) by
+the vector of exogenous variables (in declaration order).
+@end itemize
+
+@node Third order approximation
+@subsection Third order approximation
+
+The approximation has the form:
+
+@math{y_t = y^s + G_0 +
+G_1 z_t +
+G_2 (z_t \otimes z_t) +
+G_3 (z_t \otimes z_t \otimes z_t)}
+
+where @math{y^s} is the steady state value of @math{y}, and @math{z_t} is a
+vector consisting of the deviation from the steady state of the state
+variables (in DR-order) at date @math{t-1} followed by the exogenous variables at
+date @math{t} (in declaration order). The vector @math{z_t} is
+therefore of size @math{n_z} = @code{oo_.dr.npred +
+M_.exo_nbr}.
+
+The coefficients of the decision rules are stored as follows:
+
+@itemize 
+
+@item
+@vindex oo_.dr.ys
+@math{y^s} is stored in @code{oo_.dr.ys}. The vector rows
+correspond to all endogenous in the declaration order.
+
+@item
+@vindex oo_.dr.g_0
+@math{G_0} is stored in @code{oo_.dr.g_0}. The
+vector rows correspond to all endogenous in DR-order.
+
+@item
+@vindex oo_.dr.g_1
+@math{G_1} is stored in @code{oo_.dr.g_1}. The matrix rows correspond
+to all endogenous in DR-order. The matrix columns correspond to state
+variables in DR-order, followed by exogenous in declaration order.
+
+@item
+@vindex oo_.dr.g_2
+@math{G_2} is stored in @code{oo_.dr.g_2}. The matrix rows correspond
+to all endogenous in DR-order. The matrix columns correspond to the
+Kronecker product of state variables (in DR-order), followed by
+exogenous (in declaration order). Note that the Kronecker product is
+stored in a folded way, @i{i.e.} symmetric elements are stored only
+once, which implies that the matrix has @math{n_z(n_z+1)/2} columns.  More
+precisely, each column of this matrix corresponds to a pair @math{(i_1, i_2)}
+where each index represents an element of @math{z_t} and is therefore between
+@math{1} and @math{n_z}. Only non-decreasing pairs are stored, @i{i.e.} those for
+which @math{i_1 \leq i_2}. The columns are arranged in the lexicographical order
+of non-decreasing pairs. Also note that for those pairs where @math{i_1 \neq
+i_2}, since the element is stored only once but appears two times in
+the unfolded @math{G_2} matrix, it must be multiplied by 2 when computing the
+decision rules.
+
+@item
+@vindex oo_.dr.g_3
+@math{G_3} is stored in @code{oo_.dr.g_3}. The matrix rows correspond
+to all endogenous in DR-order. The matrix columns correspond to the
+third Kronecker power of state variables (in DR-order), followed by
+exogenous (in declaration order). Note that the third Kronecker power
+is stored in a folded way, @i{i.e.} symmetric elements are stored only
+once, which implies that the matrix has @math{n_z(n_z+1)(n_z+2)/6}
+columns.  More precisely, each column of this matrix corresponds to a
+tuple @math{(i_1, i_2, i_3)} where each index represents an element of
+@math{z_t} and is therefore between @math{1} and @math{n_z}. Only
+non-decreasing tuples are stored, @i{i.e.} those for which @math{i_1
+\leq i_2 \leq i_3}. The columns are arranged in the lexicographical
+order of non-decreasing tuples. Also note that for tuples that have
+three distinct indices (@i{i.e.} @math{i_1 \neq i_2} and @math{i_1
+\neq i_3} and @math{i_2 \neq i_3}, since these elements are stored
+only once but appears six times in the unfolded @math{G_3} matrix,
+they must be multiplied by 6 when computing the decision
+rules. Similarly, for those tuples that have two equal indices
+(@i{i.e.} of the form @math{(a,a,b)} or @math{(a,b,a)} or
+@math{(b,a,a)}), since these elements are stored only once but appears
+three times in the unfolded @math{G_3} matrix, they must be multiplied
+by 3 when computing the decision rules.
+@end itemize
+
+
+@node Estimation
+@section Estimation
+
+Provided that you have observations on some endogenous variables, it
+is possible to use Dynare to estimate some or all parameters. Both
+maximum likelihood (as in @cite{Ireland (2004)}) and Bayesian
+techniques (as in @cite{Rabanal and Rubio-Ramirez (2003)},
+@cite{Schorfheide (2000)} or @cite{Smets and Wouters (2003)}) are
+available. Using Bayesian methods, it is possible to estimate DSGE
+models, VAR models, or a combination of the two techniques called
+DSGE-VAR.
+
+Note that in order to avoid stochastic singularity, you must have at
+least as many shocks or measurement errors in your model as you have
+observed variables.
+
+@deffn Command varobs @var{VARIABLE_NAME}@dots{};
+
+@descriptionhead
+
+This command lists the name of observed endogenous variables for the
+estimation procedure. These variables must be available in the data
+file (@pxref{estimation}).
+
+Alternatively, this command is also used in conjunction with the
+@code{partial_information} option of @code{stoch_simul}, for declaring
+the set of observed variables when solving the model under partial
+information.
+
+Only one instance of @code{varobs} is allowed in a model file. If one
+needs to declare observed variables in a loop, the macroprocessor can
+be used as shown in the second example below.
+
+@customhead{Simple example}
+
+@example
+varobs C y rr;
+@end example
+
+@customhead{Example with a loop}
+
+@example
+varobs
+@@#for co in countries
+  GDP_@@@{co@}
+@@#endfor
+;
+@end example
+
+@end deffn
+
+@deffn Block observation_trends ;
+
+@descriptionhead
+
+This block specifies @emph{linear} trends for observed variables as
+functions of model parameters.
+
+Each line inside of the block should be of the form:
+
+@example
+@var{VARIABLE_NAME}(@var{EXPRESSION});
+@end example
+
+In most cases, variables shouldn't be centered when
+@code{observation_trends} is used.
+
+@examplehead
+
+@example
+observation_trends;
+Y (eta);
+P (mu/eta);
+end;
+@end example
+
+@end deffn
+
+
+@anchor{estimated_params}
+@deffn Block estimated_params ;
+
+@descriptionhead
+
+This block lists all parameters to be estimated and specifies bounds
+and priors as necessary.
+
+Each line corresponds to an estimated parameter.
+
+In a maximum likelihood estimation, each line follows this syntax:
+
+@example
+stderr VARIABLE_NAME | corr VARIABLE_NAME_1, VARIABLE_NAME_2 | PARAMETER_NAME
+, INITIAL_VALUE [, LOWER_BOUND, UPPER_BOUND ];
+@end example
+
+In a Bayesian estimation, each line follows this syntax:
+
+@example
+stderr VARIABLE_NAME | corr VARIABLE_NAME_1, VARIABLE_NAME_2 |
+PARAMETER_NAME | DSGE_PRIOR_WEIGHT
+[, INITIAL_VALUE [, LOWER_BOUND, UPPER_BOUND]], PRIOR_SHAPE,
+PRIOR_MEAN, PRIOR_STANDARD_ERROR [, PRIOR_3RD_PARAMETER [,
+PRIOR_4TH_PARAMETER [, SCALE_PARAMETER ] ] ];
+@end example
+
+The first part of the line consists of one of the three following
+alternatives:
+
+@table @code
+
+@item stderr @var{VARIABLE_NAME}
+Indicates that the standard error of the exogenous variable
+@var{VARIABLE_NAME}, or of the observation error associated with
+endogenous observed variable @var{VARIABLE_NAME}, is to be estimated
+
+@item corr @var{VARIABLE_NAME_1}, @var{VARIABLE_NAME_2}
+Indicates that the correlation between the exogenous variables
+@var{VARIABLE_NAME_1} and @var{VARIABLE_NAME_2}, or the correlation of
+the observation errors associated with endogenous observed variables
+@var{VARIABLE_NAME_1} and @var{VARIABLE_NAME_2}, is to be estimated
+
+@item @var{PARAMETER_NAME}
+The name of a model parameter to be estimated
+
+@item DSGE_PRIOR_WEIGHT
+@dots{}
+
+@end table
+
+The rest of the line consists of the following fields, some of them
+being optional:
+
+@table @code
+
+@item @var{INITIAL_VALUE}
+Specifies a starting value for maximum likelihood estimation
+
+@item @var{LOWER_BOUND}
+Specifies a lower bound for the parameter value in maximum likelihood estimation
+
+@item @var{UPPER_BOUND}
+Specifies an upper bound for the parameter value in maximum likelihood estimation
+
+@item @var{PRIOR_SHAPE}
+A keyword specifying the shape of the prior density.
+The possible values are: @code{beta_pdf},
+@code{gamma_pdf}, @code{normal_pdf},
+@code{uniform_pdf}, @code{inv_gamma_pdf},
+@code{inv_gamma1_pdf}, @code{inv_gamma2_pdf}. Note
+that @code{inv_gamma_pdf} is equivalent to
+@code{inv_gamma1_pdf}
+
+@item @var{PRIOR_MEAN}
+The mean of the prior distribution
+
+@item @var{PRIOR_STANDARD_ERROR}
+The standard error of the prior distribution
+
+@item @var{PRIOR_3RD_PARAMETER}
+A third parameter of the prior used for generalized beta distribution,
+generalized gamma and for the uniform distribution. Default: @code{0}
+
+@item @var{PRIOR_4TH_PARAMETER}
+A fourth parameter of the prior used for generalized beta distribution
+and for the uniform distribution. Default: @code{1}
+
+@item @var{SCALE_PARAMETER}
+The scale parameter to be used for the jump distribution of the
+Metropolis-Hasting algorithm
+@end table
+
+Note that @var{INITIAL_VALUE}, @var{LOWER_BOUND}, @var{UPPER_BOUND},
+@var{PRIOR_MEAN}, @var{PRIOR_STANDARD_ERROR},
+@var{PRIOR_3RD_PARAMETER}, @var{PRIOR_4TH_PARAMETER} and
+@var{SCALE_PARAMETER} can be any valid @var{EXPRESSION}. Some of them
+can be empty, in which Dynare will select a default value depending on
+the context and the prior shape.
+
+As one uses options more towards the end of the list, all previous
+options must be filled: for example, if you want to specify
+@var{SCALE_PARAMETER}, you must specify @var{PRIOR_3RD_PARAMETER} and
+@var{PRIOR_4TH_PARAMETER}. Use empty values, if these parameters don't
+apply.
+
+@customhead{Parameter transformation}
+
+Sometimes, it is desirable to estimate a transformation of a parameter
+appearing in the model, rather than the parameter itself. It is of
+course possible to replace the original parameter by a function of the
+estimated parameter everywhere is the model, but it is often
+unpractical.
+
+In such a case, it is possible to declare the parameter to be estimated
+in the @code{parameters} statement and to define the transformation,
+using a pound sign (#) expression (@pxref{Model declaration}).
+
+@examplehead
+
+@example
+parameters bet;
+
+model;
+# sig = 1/bet;
+c = sig*c(+1)*mpk;
+end;
+
+estimated_params;
+bet, normal_pdf, 1, 0.05;
+end;
+@end example
+
+@end deffn
+
+@deffn Block estimated_params_init ;
+
+This block declares numerical initial values for the optimizer when
+these ones are different from the prior mean.
+
+Each line has the following syntax:
+
+@example
+stderr VARIABLE_NAME | corr VARIABLE_NAME_1, VARIABLE_NAME_2 | PARAMETER_NAME
+, INITIAL_VALUE;
+@end example
+
+@xref{estimated_params}, for the meaning and syntax of the various components.
+
+@end deffn
+
+@deffn Block estimated_params_bounds ;
+
+This block declares lower and upper bounds for parameters in maximum
+likelihood estimation.
+
+Each line has the following syntax:
+
+@example
+stderr VARIABLE_NAME | corr VARIABLE_NAME_1, VARIABLE_NAME_2 | PARAMETER_NAME
+, LOWER_BOUND, UPPER_BOUND;
+@end example
+
+@xref{estimated_params}, for the meaning and syntax of the various components.
+
+@end deffn
+
+@anchor{estimation}
+@deffn Command estimation [@var{VARIABLE_NAME}@dots{}];
+@deffnx Command estimation (@var{OPTIONS}@dots{}) [@var{VARIABLE_NAME}@dots{}];
+
+@descriptionhead
+
+This command runs Bayesian or maximum likelihood estimation.
+
+The following information will be displayed by the command:
+@itemize 
+
+@item
+results from posterior optimization (also for maximum likelihood)
+
+@item
+marginal log density
+
+@item
+mean and shortest confidence interval from posterior simulation
+
+@item
+Metropolis-Hastings convergence graphs that still need to be documented
+
+@item
+graphs with prior, posterior and mode
+
+@item
+graphs of smoothed shocks, smoothed observation errors, smoothed and historical variables
+@end itemize
+
+@optionshead
+
+@table @code
+
+@item datafile = @var{FILENAME}
+The datafile (a @file{.m} file, a @file{.mat} file or, under MATLAB, a
+@file{.xls} file)
+
+@item xls_sheet = @var{NAME}
+@anchor{xls_sheet}
+The name of the sheet with the data in an Excel file
+
+@item xls_range = @var{RANGE}
+@anchor{xls_range}
+The range with the data in an Excel file
+
+@item nobs = @var{INTEGER}
+The number of observations to be used. Default: all observations in
+the file
+
+@item nobs = [@var{INTEGER_1}:@var{INTEGER_2}]
+Runs a recursive estimation and forecast for samples of size ranging
+of @var{INTEGER_1} to @var{INTEGER_2}. Option @code{forecast} must
+also be specified
+
+@item first_obs = @var{INTEGER}
+The number of the first observation to be used. Default: @code{1}
+
+@item prefilter = @var{INTEGER}
+A value of @code{1} means that the estimation procedure will demean
+the data. Default: @code{0}, @i{i.e.} no prefiltering
+
+@item presample = @var{INTEGER}
+The number of observations to be skipped before evaluating the
+likelihood. Default: @code{0}
+
+@item loglinear
+Computes a log-linear approximation of the model instead of a linear
+approximation. The data must correspond to the definition of the
+variables used in the model. Default: computes a linear approximation
+
+@item plot_priors = @var{INTEGER}
+Control the plotting of priors:
+
+@table @code
+
+@item 0
+No prior plot
+
+@item 1
+Prior density for each estimated parameter is plotted. It is important
+to check that the actual shape of prior densities matches what you
+have in mind. Ill choosen values for the prior standard density can
+result in absurd prior densities.
+@end table
+
+@noindent
+Default value is @code{1}.
+
+@item nograph
+No graphs should be plotted
+
+@item lik_init = @var{INTEGER}
+@anchor{lik_init}
+Type of initialization of Kalman filter:
+
+@table @code
+
+@item 1
+For stationary models, the initial matrix of variance of the error of
+forecast is set equal to the unconditional variance of the state
+variables
+
+@item 2
+For nonstationary models: a wide prior is used with an initial matrix
+of variance of the error of forecast diagonal with 10 on the diagonal
+
+@item 3
+For nonstationary models: @dots{}
+@end table
+
+@noindent
+Default value is @code{1}.
+
+@item lik_algo = @var{INTEGER}
+@dots{}
+
+@item conf_sig = @var{DOUBLE}
+@xref{conf_sig}.
+
+@item mh_replic = @var{INTEGER}
+@anchor{mh_replic} Number of replications for Metropolis-Hastings
+algorithm. For the time being, @code{mh_replic} should be larger than
+@code{1200}. Default: @code{20000}
+
+@item mh_nblocks = @var{INTEGER}
+Number of parallel chains for Metropolis-Hastings algorithm. Default:
+@code{2}
+
+@item mh_drop = @var{DOUBLE}
+The fraction of initially generated parameter vectors to be dropped
+before using posterior simulations. Default: @code{0.5}
+
+@item mh_jscale = @var{DOUBLE}
+The scale to be used for the jumping distribution in
+Metropolis-Hastings algorithm. The default value is rarely
+satisfactory. This option must be tuned to obtain, ideally, an
+acceptation rate of 25% in the Metropolis-Hastings algorithm. Default:
+@code{0.2}
+
+@item mh_init_scale = @var{DOUBLE}
+The scale to be used for drawing the initial value of the
+Metropolis-Hastings chain. Default: 2*@code{mh_scale}
+
+@item mh_recover
+@anchor{mh_recover} Attempts to recover a Metropolis-Hastings
+simulation that crashed prematurely. Shouldn't be used together with
+@code{load_mh_file}
+
+@item mh_mode = @var{INTEGER}
+@dots{}
+
+@item mode_file = @var{FILENAME}
+Name of the file containing previous value for the mode. When
+computing the mode, Dynare stores the mode (@code{xparam1}) and the
+hessian (@code{hh}) in a file called
+@file{@var{MODEL_FILENAME}_mode.mat}
+
+@item mode_compute = @var{INTEGER} | @var{FUNCTION_NAME}
+Specifies the optimizer for the mode computation:
+
+@table @code
+
+@item 0
+The mode isn't computed. @code{mode_file} option must be specified
+
+@item 1
+Uses @code{fmincon} optimization routine (not available under Octave)
+
+@item 2
+Value no longer used
+
+@item 3
+Uses @code{fminunc} optimization routine
+
+@item 4
+Uses Chris Sims's @code{csminwel}
+
+@item 5
+Uses Marco Ratto's @code{newrat}
+
+@item 6
+Uses a Monte-Carlo based optimization routine (see
+@uref{http://www.dynare.org/DynareWiki/MonteCarloOptimization,Dynare
+wiki} for more details)
+
+@item 7
+Uses @code{fminsearch}, a simplex based optimization routine
+(available under Octave if the
+@uref{http://octave.sourceforge.net/optim/,optim} package from
+Octave-Forge is installed)
+
+@item @var{FUNCTION_NAME}
+It is also possible to give a @var{FUNCTION_NAME} to this option,
+instead of an @var{INTEGER}. In that case, Dynare takes the return
+value of that function as the posterior mode.
+@end table
+
+@noindent
+Default value is @code{4}.
+
+@item mode_check
+Tells Dynare to plot the posterior density for values around the
+computed mode for each estimated parameter in turn. This is helpful to
+diagnose problems with the optimizer
+
+@item prior_trunc = @var{DOUBLE}
+@anchor{prior_trunc} Probability of extreme values of the prior
+density that is ignored when computing bounds for the
+parameters. Default: @code{1e-32}
+
+@item load_mh_file
+@anchor{load_mh_file} Tells Dynare to add to previous
+Metropolis-Hastings simulations instead of starting from
+scratch. Shouldn't be used together with @code{mh_recover}
+
+@item optim = (@var{fmincon options})
+Can be used to set options for @code{fmincon}, the optimizing function
+of MATLAB Optimizaiton toolbox. Use MATLAB's syntax for these
+options. Default:
+@code{('display','iter','LargeScale','off','MaxFunEvals',100000,'TolFun',1e-8,'TolX',1e-6)}
+
+@item nodiagnostic
+Doesn't compute the convergence diagnostics for
+Metropolis-Hastings. Default: diagnostics are computed and displayed
+
+@item bayesian_irf
+@vindex oo_.PosteriorIRF.Dsge
+@anchor{bayesian_irf} Triggers the computation of the posterior
+distribution of IRFs. The length of the IRFs are controlled by the
+@code{irf} option. Results are stored in @code{oo_.PosteriorIRF.Dsge}
+(see below for a description of this variable)
+
+@item dsge_var
+Triggers the estimation of a DSGE-VAR model, where the weight of the
+DSGE prior of the VAR model will be estimated.  The prior on the
+weight of the DSGE prior, @code{dsge_prior_weight}, must be defined in
+the @code{estimated_params} section.  NB: The previous method of
+declaring @code{dsge_prior_weight} as a parameter and then placing it
+in @code{estimated_params} is now deprecated and will be removed in a
+future release of Dynare.
+
+@item dsge_var = @var{DOUBLE}
+Triggers the estimation of a DSGE-VAR model, where the weight of the
+DSGE prior of the VAR model is calibrated to the value passed. NB: The
+previous method of declaring @code{dsge_prior_weight} as a parameter
+and then calibrating it is now deprecated and will be removed in a
+future release of Dynare.
+
+@item dsge_varlag = @var{INTEGER}
+@anchor{dsge_varlag} The number of lags used to estimate a DSGE-VAR
+model. Default: @code{4}.
+
+@item moments_varendo
+@vindex oo_.PosteriorTheoreticalMoments
+@anchor{moments_varendo} Triggers the computation of the posterior
+distribution of the theoretical moments of the endogenous
+variables. Results are stored in
+@code{oo_.PosteriorTheoreticalMoments} (see below for a description of
+this variable)
+
+@item filtered_vars
+@vindex oo_.FilteredVariables
+@anchor{filtered_vars} Triggers the computation of the posterior
+distribution of filtered endogenous variables and shocks. Results are
+stored in @code{oo_.FilteredVariables} (see below for a description of
+this variable)
+
+@item smoother
+@vindex oo_.SmoothedVariables
+@vindex oo_.SmoothedShocks
+@vindex oo_.SmoothedMeasurementErrors
+@anchor{smoother} Triggers the computation of the posterior
+distribution of smoothered endogenous variables and shocks. Results
+are stored in @code{oo_.SmoothedVariables}, @code{oo_.SmoothedShocks}
+and @code{oo_.SmoothedMeasurementErrors} (see below for a description
+of these variables)
+
+@item forecast = @var{INTEGER}
+@vindex oo_.forecast
+@anchor{forecast} Computes the posterior distribution of a forecast on
+@var{INTEGER} periods after the end of the sample used in
+estimation. The result is stored in variable @code{oo_.forecast}
+(@pxref{Forecasting})
+
+@item tex
+@anchor{tex} Requests the printing of results and graphs in TeX tables
+and graphics that can be later directly included in LaTeX files (not
+yet implemented)
+
+@item kalman_algo = @var{INTEGER}
+@dots{}
+
+@item kalman_tol = @var{DOUBLE}
+@dots{}
+
+@item filter_covariance
+@anchor{filter_covariance} Saves the series of one step ahead error of
+forecast covariance matrices.
+
+@item filter_step_ahead = [@var{INTEGER_1}:@var{INTEGER_2}]
+@anchor{filter_step_ahead} Triggers the computation k-step ahead
+filtered values.
+
+@item filter_decomposition
+@anchor{filter_decomposition} Triggers the computation of the shock
+decomposition of the above k-step ahead filtered values.
+
+@item constant
+@dots{}
+
+@item noconstant
+@dots{}
+
+@item diffuse_filter
+@dots{}
+
+@item selected_variables_only
+Only run the smoother on the variables listed just after the
+@code{estimation} command. Default: run the smoother on all the
+declared endogenous variables.
+
+@item cova_compute = @var{INTEGER}
+When @code{0}, the covariance matrix of estimated parameters is not
+computed after the computation of posterior mode (or maximum
+likelihood). This increases speed of computation in large models
+during development, when this information is not always necessary. Of
+course, it will break all successive computations that would require
+this covariance matrix. Default is @code{1}.
+
+@item solve_algo = @var{INTEGER}
+@xref{solve_algo}.
+
+@item order = @var{INTEGER}
+@xref{order}.
+
+@item irf = @var{INTEGER}
+@xref{irf}.
+
+@item aim_solver
+@xref{aim_solver}.
+@end table
+
+@customhead{Note}
+
+If no @code{mh_jscale} parameter is used in estimated_params, the
+procedure uses @code{mh_jscale} for all parameters. If
+@code{mh_jscale} option isn't set, the procedure uses @code{0.2} for
+all parameters.
+
+@outputhead
+
+@vindex M_.params
+@vindex M_.Sigma_e
+After running @code{estimation}, the parameters @code{M_.params} and
+the variance matrix @code{M_.Sigma_e} of the shocks are set to the
+mode for maximum likelihood estimation or posterior mode computation
+without Metropolis iterations.
+
+After @code{estimation} with Metropolis iterations (option
+@code{mh_replic} > 0 or option @code{load_mh_file} set) the parameters
+@code{M_.params} and the variance matrix @code{M_.Sigma_e} of the
+shocks are set to the posterior mean.
+
+Depending on the options, @code{estimation} stores results in various
+fields of the @code{oo_} structure, described below.
+
+@customhead{Running the smoother with calibrated parameters}
+
+It is possible to compute smoothed value of the endogenous variables
+and the shocks with calibrated parameters, without estimation
+proper. For this usage, there should be no @code{estimated_params}
+block. Observed variables must be declared. A dataset must be
+specified in the @code{estimation} instruction. In addition, use the
+following options:
+@code{mode_compute=0,mh_replic=0,smoother}. Currently, there is no
+specific output for this usage of the @code{estimation} command. The
+results are made available in fields of @code{oo_} structure. An
+example is available in @file{./tests/smoother/calibrated_model.mod}.
+
+@end deffn
+
+In the following variables, we will adopt the following shortcuts for
+specific field names:
+
+@table @var
+
+@item MOMENT_NAME
+
+This field can take the following values:
+
+@table @code
+
+@item HPDinf
+Lower bound of a 90% HPD interval@footnote{See option @ref{conf_sig}
+to change the size of the HPD interval}
+
+@item HPDsup
+Upper bound of a 90% HPD interval 
+
+@item Mean
+Mean of the posterior distribution
+
+@item Median
+Median of the posterior distribution
+
+@item Std
+Standard deviation of the posterior distribution
+@end table
+
+@item ESTIMATED_OBJECT
+
+This field can take the following values:
+
+@table @code
+
+@item measurement_errors_corr
+Correlation between two measurement errors
+
+@item measurement_errors_std
+Standard deviation of measurement errors
+
+@item parameters
+Parameters
+
+@item shocks_corr
+Correlation between two structural shocks
+
+@item shocks_std
+Standard deviation of structural shocks
+
+@end table
+@end table
+
+
+@defvr {MATLAB/Octave variable} oo_.MarginalDensity.LaplaceApproximation
+Variable set by the @code{estimation} command.
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.MarginalDensity.ModifiedHarmonicMean
+Variable set by the @code{estimation} command, if it is used with
+@code{mh_replic > 0} or @code{load_mh_file} option.
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.FilteredVariables
+Variable set by the @code{estimation} command, if it is used with the
+@code{filtered_vars} option. Fields are of the form:
+@example
+@code{oo_.FilteredVariables.@var{MOMENT_NAME}.@var{VARIABLE_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.PosteriorIRF.Dsge
+Variable set by the @code{estimation} command, if it is used with the
+@code{bayesian_irf} option. Fields are of the form:
+@example
+@code{oo_.PosteriorIRF.Dsge.@var{MOMENT_NAME}.@var{VARIABLE_NAME}_@var{SHOCK_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.SmoothedMeasurementErrors
+Variable set by the @code{estimation} command, if it is used with the
+@code{smoother} option. Fields are of the form:
+@example
+@code{oo_.SmoothedMeasurementErrors.@var{MOMENT_NAME}.@var{VARIABLE_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.SmoothedShocks
+Variable set by the @code{estimation} command, if it is used with the
+@code{smoother} option. Fields are of the form:
+@example
+@code{oo_.SmoothedShocks.@var{MOMENT_NAME}.@var{VARIABLE_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.SmoothedVariables
+Variable set by the @code{estimation} command, if it is used with the
+@code{smoother} option. Fields are of the form:
+@example
+@code{oo_.SmoothedVariables.@var{MOMENT_NAME}.@var{VARIABLE_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.PosteriorTheoreticalMoments
+Variable set by the @code{estimation} command, if it is used with the
+@code{moments_varendo} option. Fields are of the form:
+@example
+@code{oo_.PosteriorTheoreticalMoments.@var{THEORETICAL_MOMENT}.@var{ESTIMATED_OBJECT}.@var{MOMENT_NAME}.@var{VARIABLE_NAME}}
+@end example
+where @var{THEORETICAL_MOMENT} is one of the following:
+
+@table @code
+
+@item Autocorrelation
+Autocorrelation of endogenous variables@footnote{The autocorrlation
+coefficients are computed for the number of periods specified in
+option @code{ar}.}
+
+@item Correlation
+Correlation between two endogenous variables
+
+@item Decomp
+Decomposition of variance@footnote{When the shocks are correlated, it
+is the decomposition of orthogonalized shocks via Cholesky
+decompostion according to the order of declaration of shocks
+(@pxref{Variable declarations})}
+
+@item Expectation
+Expectation of endogenous variables
+
+@item Variance
+
+(co-)variance of endogenous variables
+
+@end table
+
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.posterior_density
+Variable set by the @code{estimation} command, if it is used with
+@code{mh_replic > 0} or @code{load_mh_file} option. Fields are of the form:
+@example
+@code{oo_.posterior_density.@var{PARAMETER_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.posterior_hpdinf
+Variable set by the @code{estimation} command, if it is used with
+@code{mh_replic > 0} or @code{load_mh_file} option. Fields are of the form:
+@example
+@code{oo_.posterior_hpdinf.@var{ESTIMATED_OBJECT}.@var{VARIABLE_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.posterior_hpdsup
+Variable set by the @code{estimation} command, if it is used with
+@code{mh_replic > 0} or @code{load_mh_file} option. Fields are of the form:
+@example
+@code{oo_.posterior_hpdsup.@var{ESTIMATED_OBJECT}.@var{VARIABLE_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.posterior_mean
+Variable set by the @code{estimation} command, if it is used with
+@code{mh_replic > 0} or @code{load_mh_file} option. Fields are of the form:
+@example
+@code{oo_.posterior_mean.@var{ESTIMATED_OBJECT}.@var{VARIABLE_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.posterior_mode
+Variable set by the @code{estimation} command, if it is used with
+@code{mh_replic > 0} or @code{load_mh_file} option. Fields are of the form:
+@example
+@code{oo_.posterior_mode.@var{ESTIMATED_OBJECT}.@var{VARIABLE_NAME}}
+@end example
+@end defvr
+
+@defvr {MATLAB/Octave variable} oo_.posterior_std
+Variable set by the @code{estimation} command, if it is used with
+@code{mh_replic > 0} or @code{load_mh_file} option. Fields are of the form:
+@example
+@code{oo_.posterior_std.@var{ESTIMATED_OBJECT}.@var{VARIABLE_NAME}}
+@end example
+@end defvr
+
+Here are some examples of generated variables:
+
+@example
+oo_.posterior_mode.parameters.alp
+oo_.posterior_mean.shocks_std.ex
+oo_.posterior_hpdsup.measurement_errors_corr.gdp_conso
+@end example
+
+
+@deffn Command model_comparison @var{FILENAME}[(@var{DOUBLE})]@dots{};
+@deffnx Command model_comparison (marginal_density = laplace | modifiedharmonicmean) @var{FILENAME}[(@var{DOUBLE})]@dots{};
+
+This command computes odds ratios and estimate a posterior density
+over a colletion of models. The priors over models can be specified as
+the @var{DOUBLE} values, otherwise a uniform prior is assumed.
+
+@end deffn
+
+@deffn Command shock_decomposition [@var{VARIABLE_NAME}]@dots{};
+@deffnx Command shock_decomposition (@var{OPTIONS}@dots{}) [@var{VARIABLE_NAME}]@dots{};
+
+@descriptionhead
+
+This command computes and displays shock decomposition according to
+the model for a given sample.
+
+@optionshead
+
+@table @code
+
+@item parameter_set = @var{PARAMETER_SET}
+Specify the parameter set to use for running the smoother. The
+@var{PARAMETER_SET} can take one of the following five values:
+@code{prior_mode}, @code{prior_mean}, @code{posterior_mode},
+@code{posterior_mean}, @code{posterior_median}. Default value:
+@code{posterior_mean} if Metropolis has been run, else
+@code{posterior_mode}.
+
+@item shocks = (@var{VARIABLE_NAME} [@var{VARIABLE_NAME} @dots{}]  [ ; @var{VARIABLE_NAME} [@var{VARIABLE_NAME} @dots{}] @dots{}] )
+@dots{}
+
+@item labels = ( @var{VARIABLE_NAME} [@var{VARIABLE_NAME} @dots{}] )
+@dots{}
+@end table
+
+@end deffn
+
+
+@deffn Command unit_root_vars @var{VARIABLE_NAME}@dots{};
+
+@code{unit_root_vars} is used to declare a list of unit-root
+endogenous variables of a model so that dynare won't check the steady
+state levels (defined in the steadystate file) file for these
+variables. The information given by this command is no more used for
+the initialization of the diffuse kalman filter (as described in
+@cite{Durbin and Koopman (2001)} and @cite{Koopman and Durbin
+(2003)}).
+
+When @code{unit_root_vars} is used the @code{lik_init} option of
+@code{estimation} has no effect.
+
+When there are nonstationary variables in a model, there is no unique
+deterministic steady state. The user must supply a MATLAB/Octave
+function that computes the steady state values of the stationary
+variables in the model and returns dummy values for the nonstationary
+ones. The function should be called with the name of the @file{.mod}
+file followed by @file{_steadystate}. See @file{fs2000_steadystate.m}
+in @file{examples} directory for an example.
+
+Note that the nonstationary variables in the model must be integrated
+processes (their first difference or k-difference must be stationary).
+@end deffn
+
+Dynare also has the ability to estimate Bayesian VARs:
+
+@deffn Command bvar_density ;
+Computes the marginal density of an estimated BVAR model, using
+Minnesota priors.
+
+See @file{bvar-a-la-sims.pdf}, which comes with Dynare distribution,
+for more information on this command.
+@end deffn
+
+
+@node Forecasting
+@section Forecasting
+
+On a calibrated model, forecasting is done using the @code{forecast}
+command. On an estimated command, use the @code{forecast} option of
+@code{estimation} command.
+
+It is also possible to compute forecasts on a calibrated or estimated
+model for a given constrained path of the future endogenous
+variables. This is done, from the reduced form representation of the
+DSGE model, by finding the structural shocks that are needed to match
+the restricted paths. Use @code{conditional_forecast},
+@code{conditional_forecast_paths} and @code{plot_conditional_forecast}
+for that purpose.
+
+Finally, it is possible to do forecasting with a Bayesian VAR using
+the @code{bvar_forecast} command.
+
+@deffn Command forecast [@var{VARIABLE_NAME}@dots{}];
+@deffnx Command forecast (@var{OPTIONS}@dots{}) [@var{VARIABLE_NAME}@dots{}];
+
+@descriptionhead
+
+This command computes a simulation of a stochastic model from an
+arbitrary initial point.
+
+When the model also contains deterministic exogenous shocks, the
+simulation is computed conditionaly to the agents knowing the future
+values of the deterministic exogenous variables.
+
+@code{forecast} must be called after @code{stoch_simul}.
+
+@code{forecast} plots the trajectory of endogenous variables. When a
+list of variable names follows the command, only those variables are
+plotted. A 90% confidence interval is plotted around the mean
+trajectory. Use option @code{conf_sig} to change the level of the
+confidence interval.
+
+@optionshead
+
+@table @code
+
+@item periods = @var{INTEGER}
+Number of periods of the forecast. Default: @code{40}
+
+@item conf_sig = @var{DOUBLE}
+@anchor{conf_sig} Level of significance for confidence
+interval. Default: @code{0.90}
+
+@item nograph
+Don't display graphics.
+@end table
+
+@outputhead
+
+The results are stored in @code{oo_.forecast}, which is described below.
+
+@examplehead
+
+@example
+varexo_det tau;
+varexo e;
+
+@dots{}
+
+shocks;
+var e; stderr 0.01;
+var tau;
+periods 1:9;
+values -0.15;
+end;
+
+stoch_simul(irf=0);
+
+forecast;    
+@end example
+
+@end deffn
+
+@defvr {MATLAB/Octave variable} oo_.forecast
+Variable set by the @code{forecast} command, or by the
+@code{estimation} command if used with the @code{forecast}
+option. Fields are of the form:
+@example
+@code{oo_.forecast.@var{FORECAST_MOMENT}.@var{VARIABLE_NAME}}
+@end example
+where @var{FORECAST_MOMENT} is one of the following:
+
+@table @code
+
+@item HPDinf
+Lower bound of a 90% HPD interval@footnote{See option @ref{conf_sig}
+to change the size of the HPD interval} of forecast due to parameter
+uncertainty
+
+@item HPDsup
+Lower bound of a 90% HPD interval due to parameter uncertainty
+
+@item HPDTotalinf
+Lower bound of a 90% HPD interval of forecast due to parameter
+uncertainty and future shocks (only with the @code{estimation} command)
+
+@item HPDTotalsup
+Lower bound of a 90% HPD interval due to parameter uncertainty and
+future shocks (only with the @code{estimation} command)
+
+@item Mean
+Mean of the posterior distribution of forecasts
+
+@item Median
+Median of the posterior distribution of forecasts
+
+@item Std
+Standard deviation of the posterior distribution of forecasts
+@end table
+
+@end defvr
+
+@deffn Command conditional_forecast (@var{OPTIONS}@dots{}) [@var{VARIABLE_NAME}@dots{}];
+
+@descriptionhead
+
+This command computes forecasts on an estimated model for a given
+constrained path of some future endogenous variables. This is done,
+from the reduced form representation of the DSGE model, by finding the
+structural shocks that are needed to match the restricted paths. This
+command has to be called after estimation.
+
+Use @code{conditional_forecast_paths} block to give the list of
+constrained endogenous, and their constrained future path. Option
+@code{controlled_varexo} is used to specify the structural shocks
+which will be matched to generate the constrained path.
+
+Use @code{plot_conditional_forecast} to graph the results.
+
+@optionshead
+
+@table @code
+
+@item parameter_set = @code{prior_mode} | @code{prior_mean} | @code{posterior_mode} | @code{posterior_mean} | @code{posterior_median}
+Specify the parameter set to use for the forecasting. No default
+value, mandatory option.
+
+@item controlled_varexo = (@var{VARIABLE_NAME}@dots{})
+Specify the exogenous variables to use as control variables. No
+default value, mandatory option.
+
+@item periods = @var{INTEGER}
+Number of periods of the forecast. Default: @code{40}.  @code{periods}
+cannot be less than the number of constrained periods.
+
+@item replic = @var{INTEGER}
+Number of simulations. Default: @code{5000}.
+
+@item conf_sig = @var{DOUBLE}
+Level of significance for confidence interval. Default: @code{0.80}
+@end table
+
+@examplehead
+
+@example
+var y a
+varexo e u;
+
+@dots{}
+
+estimation(@dots{});
+
+conditional_forecast_paths;
+var y;
+periods 1:3, 4:5;
+values 2, 5;
+var a;
+periods 1:5;
+values 3;
+end;
+
+conditional_forecast(parameter_set = calibration, controlled_varexo = (e, u), replic = 3000);
+
+plot_conditional_forecast(periods = 10) e u;
+@end example
+
+@end deffn
+
+@deffn Block conditional_forecast_paths ;
+
+Describes the path of constrained endogenous, before calling
+@code{conditional_forecast}. The syntax is similar to deterministic
+shocks in @code{shocks}, see @code{conditional_forecast} for an
+example.
+
+The syntax of the block is the same than the deterministic shocks in
+the @code{shocks} blocks (@pxref{Shocks on exogenous variables}).
+
+@end deffn
+
+@deffn Command plot_conditional_forecast [@var{VARIABLE_NAME}@dots{}];
+@deffnx Command plot_conditional_forecast (periods = @var{INTEGER}) [@var{VARIABLE_NAME}@dots{}];
+
+@descriptionhead
+
+Plots the conditional forecasts.
+
+To be used after @code{conditional_forecast}.
+
+@optionshead
+
+@table @code
+
+@item periods = @var{INTEGER}
+Number of periods to be plotted. Default: equal to @code{periods} in
+@code{conditional_forecast}. The number of periods declared in
+@code{plot_conditional_forecast} cannot be greater than the one
+declared in @code{conditional_forecast}.
+@end table
+
+@end deffn
+
+@deffn Command bvar_forecast ;
+This command computes in-sample or out-sample forecasts for an
+estimated BVAR model, using Minnesota priors.
+
+See @file{bvar-a-la-sims.pdf}, which comes with Dynare distribution,
+for more information on this command.
+@end deffn
+
+
+@node Optimal policy
+@section Optimal policy
+
+Dynare has tools to compute optimal policies for quadratic
+objectives. You can either solve for optimal policy under commitment
+with @code{ramsey_policy}, for optimal policy under discretion with
+@code{discretionary_policy} or for optimal simple rule with @code{osr}.
+
+
+@anchor{osr}
+
+@deffn Command osr [@var{VARIABLE_NAME}@dots{}];
+@deffnx Command osr (@var{OPTIONS}@dots{}) [@var{VARIABLE_NAME}@dots{}];
+
+@descriptionhead
+
+This command computes optimal simple policy rules for
+linear-quadratic problems of the form:
+
+@quotation
+@math{\max_\gamma E(y'_tWy_t)}
+@end quotation
+
+such that:
+@quotation
+@math{A_1 E_ty_{t+1}+A_2 y_t+ A_3 y_{t-1}+C e_t=0}
+@end quotation
+
+where:
+
+@itemize
+
+@item
+@math{\gamma} are parameters to be optimized. They must be elements of matrices
+@math{A_1}, @math{A_2}, @math{A_3};
+
+@item
+@math{y} are the endogenous variables;
+
+@item
+@math{e} are the exogenous stochastic shocks;
+@end itemize
+
+The parameters to be optimized must be listed with @code{osr_params}.
+
+The quadratic objectives must be listed with @code{optim_weights}.
+
+This problem is solved using a numerical optimizer.
+
+@optionshead
+
+This command accept the same options than @code{stoch_simul}
+(@pxref{Computing the stochastic solution}).
+
+@end deffn
+
+@anchor{osr_params}
+@deffn Command osr_params @var{PARAMETER_NAME}@dots{};
+This command declares parameters to be optimized by @code{osr}.
+@end deffn
+
+@anchor{optim_weights}
+@deffn Block optim_weights ;
+
+This block specifies quadratic objectives for optimal policy problems
+
+More precisely, this block specifies the nonzero elements of the
+quadratic weight matrices for the objectives in @code{osr}.
+
+A element of the diagonal of the weight matrix is given by a line of
+the form:
+@example
+@var{VARIABLE_NAME} @var{EXPRESSION};
+@end example
+
+An off-the-diagonal element of the weight matrix is given by a line of
+the form:
+@example
+@var{VARIABLE_NAME},  @var{VARIABLE_NAME} @var{EXPRESSION};
+@end example
+
+@end deffn
+
+@deffn Command ramsey_policy [@var{VARIABLE_NAME}@dots{}];
+@deffnx Command ramsey_policy (@var{OPTIONS}@dots{}) [@var{VARIABLE_NAME}@dots{}];
+
+@descriptionhead
+
+This command computes the first order approximation of the policy that
+maximizes the policy maker objective function submitted to the
+constraints provided by the equilibrium path of the economy.
+
+The planner objective must be declared with the
+@code{planner_objective} command.
+
+@optionshead
+
+This command accepts all options of @code{stoch_simul}, plus:
+
+@table @code
+
+@item planner_discount = @var{DOUBLE}
+Declares the discount factor of the central planner. Default: @code{1.0}
+@end table
+
+Note that only first order approximation is available (@i{i.e.}
+@code{order=1} must be specified).
+
+@outputhead
+
+This command generates all the output variables of @code{stoch_simul}.
+
+@vindex oo_.planner_objective_value
+In addition, it stores the value of planner objective function under
+Ramsey policy in @code{oo_.planner_objective_value}.
+
+@end deffn
+
+@anchor{discretionary_policy}
+@deffn Command discretionary_policy [@var{VARIABLE_NAME}@dots{}];
+@deffnx Command discretionary_policy (@var{OPTIONS}@dots{}) [@var{VARIABLE_NAME}@dots{}];
+
+@descriptionhead
+
+This command computes an approximation of the optimal policy under
+discretion
+
+@optionshead
+
+This command accepts the same options than @code{ramsey_policy}.
+
+@end deffn
+
+
+@anchor{planner_objective}
+@deffn Command planner_objective @var{MODEL_EXPRESSION};
+
+This command declares the policy maker objective, for use with
+@code{ramsey_policy} or @code{discretionary_policy}.
+@end deffn
+
+@node Sensitivity and identification analysis
+@section Sensitivity and identification analysis
+
+
+@deffn Command dynare_sensitivity ;
+@deffnx Command dynare_sensitivity (@var{OPTIONS}@dots{});
+
+This function is an interface to the global sensitivity analysis (GSA)
+toolbox developed by the Joint Research Center (JRC) of the European
+Commission. The GSA toolbox is now part of the official Dynare distribution.
+
+Please refer to the documentation of the GSA toolbox on the official
+website (@uref{http://eemc.jrc.ec.europa.eu/Software-DYNARE.htm,JRC
+web site}) for more details on the usage of this command.
+@end deffn
+
+@deffn Command identification ;
+@deffnx Command identification (@var{OPTIONS}@dots{});
+
+@descriptionhead
+
+This command triggers identification analysis.
+
+@optionshead
+
+@table @code
+
+@item ar = @var{INTEGER}
+Number of lags of computed autocorrelations (theoretical moments). Default: @code{3}
+
+@item useautocorr = @var{INTEGER}
+If equal to @code{1}, compute derivatives of autocorrelation. If equal
+to @code{0}, compute derivatives of autocovariances. Default: @code{1}
+
+@item load_ident_files = @var{INTEGER}
+If equal to @code{1}, allow Dynare to load previously 
+computed analyzes. Default: @code{0}
+
+@item prior_mc = @var{INTEGER}
+Size of Monte Carlo sample. Default: @code{2000}
+@end table
+
+@end deffn
+
+@node Displaying and saving results
+@section Displaying and saving results
+
+Dynare has comments to plot the results of a simulation and to save the results.
+
+@deffn Command rplot @var{VARIABLE_NAME}@dots{};
+
+Plots the simulated path of one or several variables, as stored in
+@var{oo_.endo_simul} by either @var{simul} (@pxref{Deterministic
+simulation}) or @var{stoch_simul} with
+option @var{periods} (@pxref{Computing the stochastic solution}). The
+variables are plotted in levels.
+
+@end deffn
+
+
+@deffn Command dynatype (@var{FILENAME}) [@var{VARIABLE_NAME}@dots{}];
+This command prints the listed variables in a text file named
+@var{FILENAME}. If no @var{VARIABLE_NAME} is listed, all endogenous
+variables are printed.
+@end deffn
+
+@deffn Command dynasave (@var{FILENAME}) [@var{VARIABLE_NAME}@dots{}];
+
+This command saves the listed variables in a binary file named
+@var{FILENAME}. If no @var{VARIABLE_NAME} are listed, all endogenous
+variables are saved.
+
+In MATLAB or Octave, variables saved with the @code{dynasave} command
+can be retrieved by the command:
+
+@example
+load -mat @var{FILENAME}
+@end example
+
+@end deffn
+
+@node Macro-processing language
+@section Macro-processing language
+
+It is possible to use ``macro'' commands in the @file{.mod} file for
+doing the following tasks: source file inclusion, replicating blocks
+of equations through loops, conditional inclusion of code@dots{}
+
+Technically, this macro language is totally independent of the basic
+Dynare language, and is processed by a separate component of the
+Dynare pre-processor. The macro processor transforms a @file{.mod}
+file with macros into a @file{.mod} file without macros (doing
+expansions/inclusions), and then feeds it to the Dynare parser.
+
+@deffn {Macro directive} @@#include "@var{FILENAME}"
+Includes another file.
+@end deffn
+
+@deffn {Macro directive} @@#define @var{MACRO_VARIABLE} = @var{MACRO_EXPRESSION}
+Defines a macro-variable.
+@end deffn
+
+@deffn {Macro directive} @@#if @var{MACRO_EXPRESSION}
+@deffnx {Macro directive} @@#else
+@deffnx {Macro directive} @@#endif
+Conditional inclusion of some part of the @file{.mod} file.
+@end deffn
+
+@deffn {Macro directive} @@#for @var{MACRO_VARIABLE} in @var{MACRO_EXPRESSION}
+@deffnx {Macro directive} @@#endfor
+Loop for replications of portions of the @file{.mod} file.
+@end deffn
+
+@deffn {Macro directive} @@#echo @var{MACRO_EXPRESSION}
+Asks the preprocessor to display some message on standard output.
+@end deffn
+
+@deffn {Macro directive} @@#error @var{MACRO_EXPRESSION}
+Asks the preprocessor to display some error message on standard output
+and to abort.
+@end deffn
+
+@node Misc commands
+@section Misc commands
+
+
+@deffn Command set_dynare_seed (@var{INTEGER})
+@deffnx Command set_dynare_seed ('default')
+@deffnx Command set_dynare_seed ('reset')
+@deffnx Command set_dynare_seed ('@var{ALGORITHM}', @var{INTEGER})
+
+Sets the seed used for random number generation.
+
+@end deffn
+
+@deffn Command save_params_and_steady_state @var{FILENAME};
+
+For all parameters, endogenous and exogenous variables, stores
+their value in a text file, using a simple name/value associative table.
+
+@itemize 
+
+@item
+for parameters, the value is taken from the last parameter
+initialization
+
+@item
+for exogenous, the value is taken from the last initval block
+
+@item
+for endogenous, the value is taken from the last steady state computation
+(or, if no steady state has been computed, from the last initval block)
+@end itemize
+
+Note that no variable type is stored in the file, so that the values
+can be reloaded with @code{load_params_and_steady_state} in a setup where
+the variable types are different.
+
+The typical usage of this function is to compute the steady-state of a
+model by calibrating the steady-state value of some endogenous
+variables (which implies that some parameters must be endogeneized
+during the steady-state computation).
+
+You would then write a first @file{.mod} file which computes the
+steady state and saves the result of the computation at the end of the
+file, using @code{save_params_and_steady_state}.
+
+In a second file designed to perform the actual simulations, you would
+use @code{load_params_and_steady_state} just after your variable
+declarations, in order to load the steady state previously computed
+(including the parameters which had been endogeneized during the
+steady state computation).
+
+The need for two separate @file{.mod} files arises from the fact that
+the variable declarations differ between the files for steady state
+calibration and for simulation (the set of endogenous and parameters
+differ between the two); this leads to different @code{var} and
+@code{parameters} statements.
+
+Also note that you can take advantage of the @code{@@#include}
+directive to share the model equations between the two files
+(@pxref{Macro-processing language}).
+
+@end deffn
+
+@anchor{load_params_and_steady_state}
+@deffn Command load_params_and_steady_state @var{FILENAME};
+
+For all parameters, endogenous and exogenous variables, loads
+their value from a file created with @code{save_params_and_steady_state}.
+
+@itemize 
+
+@item
+for parameters, their value will be initialized as if they
+had been calibrated in the @file{.mod} file
+
+@item
+for endogenous and exogenous, their value will be initialized
+as they would have been from an initval block
+@end itemize
+
+This function is used in conjunction with
+@code{save_params_and_steady_state}; see the documentation of that
+function for more information.
+
+@end deffn
+
+@node The Configuration File
+@chapter The Configuration File
+
+The configuration file is used to provide Dynare with information not
+related to the model (and hence not placed in the model file). At the
+moment, it is only used when using Dynare to run parallel
+computations.
+
+On Linux and Mac OS X, the default location of the configuration file
+is @file{$HOME/.dynare}, while on Windows it is
+@file{%APPDATA%\dynare.ini} (typically @file{C:\Documents and
+Settings\@var{USERNAME}\Application Data\dynare.ini} under Windows XP,
+or @file{C:\Users\@var{USERNAME}\AppData\dynare.ini} under Windows
+Vista or Windows 7).
+
+The parsing of the configuration file is case-sensitive and it should
+take the following form, with each option/choice pair placed on a
+newline:
+
+@example
+[command0]
+option0 = choice0
+option1 = choice1
+
+[command1]
+option0 = choice0
+option1 = choice1 
+@end example
+
+The configuration file follows a few conventions (self-explanatory
+conventions such as @var{USER_NAME} have been excluded for concision):
+
+@table @var
+
+@item COMPUTER_NAME
+Indicates the valid name of a server (@i{e.g.} @code{localhost},
+@code{server.cepremap.org}) or an IP address.
+
+@item DRIVE_NAME
+Indicates a valid drive name in Windows, without the trailing colon (@i{e.g.} @code{C}).
+
+@item PATH
+Indicates a valid path in the underlying operating system (@i{e.g.}
+@code{/home/user/dynare/matlab/}).
+
+@item PATH_AND_FILE
+Indicates a valid path to a file in the underlying operating system
+(@i{e.g.} @code{/usr/local/MATLAB/R2010b/bin/matlab}).
+
+@item BOOLEAN
+Is @code{true} or @code{false}.
+@end table
+
+@menu
+* Parallel Configuration::      
+@end menu
+
+@node Parallel Configuration
+@section Parallel Configuration
+
+@deffn {Configuration block} [cluster]
+
+@descriptionhead
+
+When working in parallel, @code{[cluster]} is required to specify the
+group of computers that will be used. It is required even if you are
+only invoking multiple processes on one computer.
+
+@optionshead
+
+@table @code
+
+@item Name = @var{CLUSTER_NAME}
+The reference name of this cluster.
+
+@item Members = @var{NODE_NAME}[(@var{WEIGHT})] @var{NODE_NAME}[(@var{WEIGHT})] @dots{}
+A list of nodes that comprise the cluster with an optional computing
+weight specified for that node. The computing weight indicates how
+much more powerful one node is with respect to the others (@i{e.g.}
+@code{n1(2) n2(1) n3(3)}, means that @code{n1} is two times more
+powerful than @code{n2} whereas @code{n3} is three times more powerful
+than @code{n2}). Each node is separated by at least one space and the
+weights are in parenthesis with no spaces separating them from their
+node.
+@end table
+
+@examplehead
+
+@example
+[cluster]
+Name = c1
+Members = n1 n2 n3
+
+[cluster]
+Name = c2
+Members = n1(4) n2 n3
+@end example
+
+@end deffn
+
+@deffn {Configuration block} [node]
+
+@descriptionhead
+
+When working in parallel, @code{[node]} is required for every computer
+that will be used. The options that are required differ, depending on
+the underlying operating system and whether you are working locally or
+remotely.
+
+@optionshead
+
+@table @code
+
+@item Name = @var{NODE_NAME}
+The reference name of this node.
+
+@item CPUnbr = @var{INTEGER} | [@var{INTEGER}:@var{INTEGER}]
+If just one integer is passed, the number of processors to use. If a
+range of integers is passed, the specific processors to use (processor
+counting is defined to begin at one as opposed to zero). Note that
+using specific processors is only possible under Windows; under Linux
+and Mac OS X, if a range is passed the same number of processors will
+be used but the range will be adjusted to begin at one.
+
+@item ComputerName = @var{COMPUTER_NAME}
+The name or IP address of the node. If you want to run locally, use
+@code{localhost} (case-sensitive).
+
+@item UserName = @var{USER_NAME}
+The username used to log into a remote system. Required for remote
+runs on all platforms.
+
+@item Password = @var{PASSWORD}
+The password used to log into the remote system. Required for remote
+runs originating from Windows.
+
+@item RemoteDrive = @var{DRIVE_NAME}
+The drive to be used for remote computation. Required for remote runs
+originating from Windows.
+
+@item RemoteDirectory = @var{PATH}
+The directory to be used for remote computation. Required for remote
+runs on all platforms.
+
+@item DynarePath = @var{PATH}
+The path to the @file{matlab} subdirectory within the Dynare
+installation directory. The default is the empty string.
+
+@item MatlabOctavePath = @var{PATH_AND_FILE}
+The path to the MATLAB or Octave executable. The default value is
+@code{matlab}.
+
+@item SingleCompThread = @var{BOOLEAN}
+Whether or not to disable MATLAB's native multithreading. The default
+value is @code{true}. Option meaningless under Octave.
+
+@item OperatingSystem = @var{OPERATING_SYSTEM}
+The operating system associated with a node. Only necessary when
+creating a cluster with nodes from different operating systems.
+Possible values are @code{unix} or @code{windows}. There is no default
+value.
+@end table
+
+@examplehead
+
+@example
+[node]
+Name = n1
+ComputerName = localhost
+CPUnbr = 1
+
+[node]
+Name = n2
+ComputerName = dynserv.cepremap.org
+CPUnbr = 5
+UserName = usern
+RemoteDirectory = /home/usern/Remote
+DynarePath = /home/usern/dynare/matlab
+MatlabOctavePath = matlab
+
+[node]
+Name = n3
+ComputerName = dynserv.dynare.org
+CPUnbr = [2:4]
+UserName = usern
+RemoteDirectory = /home/usern/Remote
+DynarePath = /home/usern/dynare/matlab
+MatlabOctavePath = matlab    
+@end example
+
+@end deffn
+
+@node Examples
+@chapter Examples
+
+Dynare comes with a database of example @file{.mod} files, which are
+designed to show a broad range of Dynare features, and are taken from
+academic papers for most of them. You should have these files in the
+@file{examples} subdirectory of your distribution.
+
+Here is a short list of the examples included. For a more complete
+description, please refer to the comments inside the files themselves.
+
+@table @file
+
+@item ramst.mod
+An elementary real business cycle (RBC) model, simulated in a
+deterministic setup.
+
+@item example1.mod
+@itemx example2.mod
+Two examples of a small RBC model in a stochastic setup, presented in
+@cite{Collard (2001)} (see the file @file{guide.pdf} which comes with
+Dynare).
+
+@item fs2000.mod
+A cash in advance model, estimated by @cite{Schorfheide (2000)}.
+
+@item fs2000_nonstationary.mod
+The same model than @file{fs2000.mod}, but written in non-stationary
+form. Detrending of the equations is done by Dynare.
+
+@item bkk.mod
+Multi-country RBC model with time to build, presented in @cite{Backus,
+Kehoe and Kydland (1992)}.
+@end table
+
+@node Bibliography
+@chapter Bibliography
+
+@itemize
+
+@item
+Backus, David K., Patrick J. Kehoe, and Finn E. Kydland (1992):
+``International Real Business Cycles,'' @i{Journal of Political
+Economy}, 100(4), 745--775.
+
+@item
+Boucekkine, Raouf (1995): ``An alternative methodology for solving
+nonlinear forward-looking models,'' @i{Journal of Economic Dynamics
+and Control}, 19, 711--734.
+
+@item
+Collard, Fabrice (2001): ``Stochastic simulations with Dynare: A practical guide''.
+
+@item
+Collard, Fabrice and Michel Juillard (2001a): ``Accuracy of stochastic
+perturbation methods: The case of asset pricing models,'' @i{Journal
+of Economic Dynamics and Control}, 25, 979--999.
+
+@item
+Collard, Fabrice and Michel Juillard (2001b): ``A Higher-Order Taylor
+Expansion Approach to Simulation of Stochastic Forward-Looking Models
+with an Application to a Non-Linear Phillips Curve,'' @i{Computational
+Economics}, 17, 125--139.
+
+@item
+Durbin, J. and S. J. Koopman (2001), @i{Time Series Analysis by State
+Space Methods}, Oxford University Press.
+
+@item
+Fair, Ray and John Taylor (1983): ``Solution and Maximum Likelihood
+Estimation of Dynamic Nonlinear Rational Expectation Models,''
+@i{Econometrica}, 51, 1169--1185.
+
+@item
+Fernandez-Villaverde, Jesus and Juan Rubio-Ramirez (2004): ``Comparing
+Dynamic Equilibrium Economies to Data: A Bayesian Approach,''
+@i{Journal of Econometrics}, 123, 153--187.
+
+@item
+Ireland, Peter (2004): ``A Method for Taking Models to the Data,''
+@i{Journal of Economic Dynamics and Control}, 28, 1205--26.
+
+@item
+Judd, Kenneth (1996): ``Approximation, Perturbation, and Projection
+Methods in Economic Analysis'', in @i{Handbook of Computational
+Economics}, ed. by Hans Amman, David Kendrick, and John Rust, North
+Holland Press, 511--585.
+
+@item
+Juillard, Michel (1996): ``Dynare: A program for the resolution and
+simulation of dynamic models with forward variables through the use of
+a relaxation algorithm,'' CEPREMAP, @i{Couverture Orange}, 9602.
+
+@item
+Kim, Jinill, Sunghyun Kim, Ernst Schaumburg, and Christopher A. Sims
+(2008): ``Calculating and using second-order accurate solutions of
+discrete time dynamic equilibrium models,'' @i{Journal of Economic
+Dynamics and Control}, 32(11), 3397--3414. 
+
+@item
+Koopman, S. J. and J. Durbin (2003): ``Filtering and Smoothing of
+State Vector for Diffuse State Space Models,'' @i{Journal of Time
+Series Analysis}, 24(1), 85--98.
+
+@item
+Laffargue, Jean-Pierre (1990): ``Résolution d'un modèle
+macroéconomique avec anticipations rationnelles'', @i{Annales
+d'Économie et Statistique}, 17, 97--119.
+
+@item
+Lubik, Thomas and Frank Schorfheide (2007): ``Do Central Banks Respond
+to Exchange Rate Movements? A Structural Investigation,'' @i{Journal
+of Monetary Economics}, 54(4), 1069--1087.
+
+@item
+Mancini-Griffoli, Tommaso (2007): ``Dynare User Guide: An introduction
+to the solution and estimation of DSGE models''.
+
+@item
+Pearlman, Joseph, David Currie, and Paul Levine (1986): ``Rational
+expectations models with partial information,'' @i{Economic
+Modelling}, 3(2), 90--105.
+
+@item
+Rabanal, Pau and Juan Rubio-Ramirez (2003): ``Comparing New Keynesian
+Models of the Business Cycle: A Bayesian Approach,'' Federal Reserve
+of Atlanta, @i{Working Paper Series}, 2003-30.
+
+@item
+Schorfheide, Frank (2000): ``Loss Function-based evaluation of DSGE
+models,'' @i{Journal of Applied Econometrics}, 15(6), 645--670.
+
+@item
+Schmitt-Grohé, Stephanie and Martin Uríbe (2004): ``Solving Dynamic
+General Equilibrium Models Using a Second-Order Approximation to the
+Policy Function,'' @i{Journal of Economic Dynamics and Control},
+28(4), 755--775.
+
+@item
+Smets, Frank and Rafael Wouters (2003): ``An Estimated Dynamic
+Stochastic General Equilibrium Model of the Euro Area,'' @i{Journal of
+the European Economic Association}, 1(5), 1123--1175.
+
+@end itemize
+
+@node Command and Function Index
+@unnumbered Command and Function Index
+
+@printindex fn
+
+@node Variable Index
+@unnumbered Variable Index
+
+@printindex vr
+
+@bye
diff --git a/doc/dynare.xsl b/doc/dynare.xsl
deleted file mode 100644
index f48e4fb0c5413b7f48b53e76a8ffa5dbdc03b931..0000000000000000000000000000000000000000
--- a/doc/dynare.xsl
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
-                version='1.0'>
-
-  <xsl:param name="generate.index">1</xsl:param>
-  <xsl:param name="refentry.generate.name">0</xsl:param>
-  <xsl:param name="refentry.generate.title">1</xsl:param>
-  <xsl:param name="section.autolabel" select="1"></xsl:param>
-  <xsl:param name="biblioentry.item.separator">, </xsl:param>
-
-  <xsl:attribute-set name="section.level1.properties">
-    <xsl:attribute name="break-before">page</xsl:attribute>
-  </xsl:attribute-set>
-
-</xsl:stylesheet>
diff --git a/doc/dynare_html.xsl b/doc/dynare_html.xsl
deleted file mode 100644
index 727cd4138563e8bb1c606e716d7d61112cbb9fff..0000000000000000000000000000000000000000
--- a/doc/dynare_html.xsl
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
-                version='1.0'>
-
-  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
-
-  <xsl:import href="dynare.xsl"/>
-
-</xsl:stylesheet>
diff --git a/doc/manual.xml b/doc/manual.xml
deleted file mode 100644
index 72a583c22939c376767dbc0f0ea579bf5d52dd95..0000000000000000000000000000000000000000
--- a/doc/manual.xml
+++ /dev/null
@@ -1,5199 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<book>
-  <bookinfo>
-    <title>Dynare Reference Manual</title>
-    <subtitle>Version 4.3.0</subtitle>
-    <author>
-      <firstname>Stéphane</firstname><surname>Adjemian</surname>
-      <affiliation><orgname>Université du Mans and CEPREMAP</orgname></affiliation>
-      <email>stephane.adjemian@ens.fr</email>
-      <address><street>142 rue du Chevaleret</street><postcode>75013</postcode><city>Paris</city><country>France</country></address>
-    </author>
-    <author>
-      <firstname>Houtan</firstname><surname>Bastani</surname>
-      <affiliation><orgname>CEPREMAP</orgname></affiliation>
-      <email>houtan.bastani@ens.fr</email>
-      <address><street>142 rue du Chevaleret</street><postcode>75013</postcode><city>Paris</city><country>France</country></address>
-    </author>
-    <author>
-      <firstname>Michel</firstname><surname>Juillard</surname>
-      <affiliation><orgname>Banque de France and CEPREMAP</orgname></affiliation>
-      <email>michel.juillard@mjui.fr</email>
-      <address><street>142 rue du Chevaleret</street><postcode>75013</postcode><city>Paris</city><country>France</country></address>
-    </author>
-    <author>
-      <firstname>Junior</firstname><surname>Maih</surname>
-      <affiliation><orgname>Norges Bank</orgname></affiliation>
-      <email>junior.maih@gmail.com</email>
-    </author>
-    <author>
-      <firstname>Ferhat</firstname><surname>Mihoubi</surname>
-      <affiliation><orgname>Université d'Évry and CEPREMAP</orgname></affiliation>
-      <email>fmihoubi@univ-evry.fr</email>
-      <address><street>142 rue du Chevaleret</street><postcode>75013</postcode><city>Paris</city><country>France</country></address>
-    </author>
-    <author>
-      <firstname>George</firstname><surname>Perendia</surname>
-      <affiliation><orgname>CEPREMAP</orgname></affiliation>
-      <email>george@perendia.orangehome.co.uk</email>
-      <address><street>142 rue du Chevaleret</street><postcode>75013</postcode><city>Paris</city><country>France</country></address>
-    </author>
-    <author>
-      <firstname>Marco</firstname><surname>Ratto</surname>
-      <affiliation><orgname>The European Commission, Joint Research Centre and CEPREMAP</orgname></affiliation>
-      <email>marco.ratto@jrc.ec.europa.eu</email>
-      <address><street>142 rue du Chevaleret</street><postcode>75013</postcode><city>Paris</city><country>France</country></address>
-    </author>
-    <author>
-      <firstname>Sébastien</firstname><surname>Villemot</surname>
-      <affiliation><orgname>CEPREMAP</orgname></affiliation>
-      <email>sebastien.villemot@ens.fr</email>
-      <address><street>142 rue du Chevaleret</street><postcode>75013</postcode><city>Paris</city><country>France</country></address>
-    </author>
-
-    <copyright><year>1996-2011</year><holder>Dynare Team</holder></copyright>
-
-    <legalnotice>
-      <para>
-        Permission is granted to copy, distribute and/or modify this document
-        under the terms of the GNU Free Documentation License, Version 1.3 or
-        any later version published by the Free Software Foundation; with no
-        Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
-      </para>
-      <para>
-        A copy of the license can be found at:
-        <ulink url="http://www.gnu.org/licenses/fdl.txt">http://www.gnu.org/licenses/fdl.txt</ulink>
-      </para>
-    </legalnotice>
-  </bookinfo>
-
-  <chapter><title>Introduction</title>
-
-  <sect1><title>What is Dynare ?</title>
-  <para>
-    Dynare is a pre-processor and a collection of <ulink url="http://www.mathworks.com/products/matlab/"><trademark class="registered">MATLAB</trademark></ulink> and <ulink url="http://www.octave.org">GNU Octave</ulink> routines which solve, simulate and estimate non-linear
-    models with forward looking variables. It is the result of research carried at
-    <ulink url="http://www.cepremap.ens.fr/">CEPREMAP</ulink> by several people (see <xref linkend="laffargue_1990"/>,
-    <xref linkend="boucekkine_1995"/>, <xref linkend="juillard_1996"/>, <xref linkend="collard-juillard_2001a" /> and <xref linkend="collard-juillard_2001b"/>).
-  </para>
-  <para>
-    When the framework is deterministic, Dynare can be used for models with the assumption of perfect
-    foresight. Typically, the system is supposed to be in a state of
-    equilibrium before a period <literal>1</literal> when the news of a contemporaneous
-    or of a future shock is learned by the agents in the model. The
-    purpose of the simulation is to describe the reaction in anticipation of,
-    then in reaction to the shock, until the system returns to the old or
-    to a new state of equilibrium. In most models, this return to
-    equilibrium is only an asymptotic phenomenon, which one must
-    approximate by an horizon of simulation far enough in the future.
-    Another exercise for which Dynare is well suited is to study the
-    transition path to a new equilibrium following a permanent shock.
-    For deterministic simulations, Dynare uses a Newton-type algorithm, first
-    proposed by <xref linkend="laffargue_1990"/>, instead of a first order technique like
-    the one proposed by <xref linkend="fair-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 can be found in <xref linkend="juillard_1996"/>.
-  </para>
-  <para>
-    In a stochastic context, Dynare computes one or several simulations corresponding to a random draw of the shocks. Dynare uses a Taylor approximation, up to third order, of the expectation functions (see <xref linkend="judd_1996"/>, 
-    <xref linkend="collard-juillard_2001a" />, <xref linkend="collard-juillard_2001b"/>, and <xref linkend="schmitt-grohe-uribe_2002"/>).
-  </para>
-  <para>
-    It is also possible to use Dynare to estimate model parameters either by maximum likelihood as in <xref linkend="ireland_2004"/> or using a Bayesian approach as in <xref linkend="rabanal-rubio-ramirez_2003"/>, <xref linkend="schorfheide_2000"/> or <xref linkend="smets-wouters_2003"/>.
-  </para>
-
-  <para>
-    Currently the development team of Dynare is composed of S. Adjemian, H. Bastani, M. Juillard, F. Mihoubi, G. Perendia, M. Ratto and S. Villemot. Several parts of Dynare use or have strongly benefited from publicly available programs by G. Anderson, F. Collard, L. Ingber, O. Kamenik, P. Klein, S. Sakata, F. Schorfheide, C. Sims, P. Soederlind and R. Wouters.  
-  </para>
-  </sect1>
-
-  </chapter>
-
-  <chapter><title>Installation and configuration</title>
-
-
-  <sect1 id="software-requirements"><title>Software requirements</title>
-  <para>
-    Packaged versions of Dynare are available for <trademark class="registered">Windows</trademark> XP/Vista, <ulink url="http://www.debian.org">Debian GNU/Linux</ulink>, <ulink url="http://www.ubuntu.com/">Ubuntu</ulink> and <trademark class="registered">Mac OS X</trademark> Leopard/Snow Leopard.
-    Dynare should work on other systems, but some compilation steps are necessary in that case.
-  </para>
-  <para>In order to run Dynare, you need at least one of the following:
-  <itemizedlist>
-    <listitem><para><trademark class="registered">MATLAB</trademark> version 6.5 or above; note that no toolbox is needed by Dynare,</para></listitem>
-    <listitem><para>GNU Octave version 3.0.0 or above.</para></listitem>
-  </itemizedlist>
-  </para>
-
-  <para>Some installation instructions for GNU Octave can be found on the <ulink url="http://www.dynare.org/DynareWiki/DynareOctave">Dynare Wiki</ulink>.</para>
-
-  <para>If you plan to use the <xref linkend="use_dll"/> option, you will need to install the necessary requirements for compiling MEX files on your machine. If you are using MATLAB under Windows, install a C++ compiler on your machine and configure it with MATLAB: see <ulink url="http://www.dynare.org/DynareWiki/ConfigureMatlabWindowsForMexCompilation">instructions on the Dynare wiki</ulink>. Users of Octave under Linux should install the package for MEX file compilation (under Debian or Ubuntu, it is called <filename>octave3.2-headers</filename> or <filename>octave3.0-headers</filename>). If you are using Octave or MATLAB under Mac OS X, you should install the latest version of XCode: see <ulink url="http://www.dynare.org/DynareWiki/InstallOnMacOSX">instructions on the Dynare wiki</ulink>. Mac OS X Octave users will also need to install gnuplot if they want graphing capabilities. Users of MATLAB under Linux and Mac OS X, and users of Octave under Windows, normally need to do nothing, since a working compilation environment is available by default.</para>
-
-  </sect1>
-
-  <sect1><title>Installation of Dynare</title>
-
-  <para>
-    After installation, Dynare can be used in any directory on your computer. It is best practice to keep your model files in directories different from the one containing the Dynare toolbox. That way you can upgrade Dynare and discard the previous version without having to worry about your own files.
-  </para>
-
-  <sect2><title>On <trademark class="registered">Windows</trademark></title>
-
-  <para>Execute the automated installer called <filename>dynare-4.x.y-win.exe</filename> (where 4.x.y is the version number), and follow the instructions. The default installation directory is <filename>c:\dynare\4.x.y</filename>.</para>
-
-  <para>After installation, this directory will contain several sub-directories, among which are <filename>matlab</filename>, <filename>mex</filename> and <filename>doc</filename>.</para>
-
-  <para>The installer will also add an entry in your Start Menu with a shortcut to the documentation files and uninstaller.</para>
-
-  <para>Note that you can have several versions of Dynare coexisting (for example in <filename>c:\dynare</filename>), as long as you correctly adjust your path settings (see <xref linkend="path_warning" />).</para>
-
-  </sect2>
-
-  <sect2><title>On Debian GNU/Linux and Ubuntu</title>
-  <para>Please refer to the <ulink url="http://www.dynare.org/DynareWiki/InstallOnDebianOrUbuntu">Dynare Wiki</ulink> for detailed instructions.</para>
-
-  <para>Dynare will be installed under <filename>/usr/share/dynare</filename> and <filename>/usr/lib/dynare</filename>. Documentation will be under <filename>/usr/share/doc/dynare</filename>.</para>
-  </sect2>
-
-  <sect2><title>On Mac OS X</title>
-  <para>Execute the automated installer called <filename>dynare-4.x.y-macosx-10.5+10.6.pkg</filename> (where 4.x.y is the version number), and follow the instructions. The default installation directory is <filename>/Applications/Dynare/4.x.y</filename>.</para>
-  <para>Please refer to the <ulink url="http://www.dynare.org/DynareWiki/InstallOnMacOSX">Dynare Wiki</ulink> for detailed instructions.</para>
-
-  <para>After installation, this directory will contain several sub-directories, among which are <filename>matlab</filename>, <filename>mex</filename> and <filename>doc</filename>.</para>
-
-  <para>Note that you can have several versions of Dynare coexisting (for example in <filename>c:\dynare</filename>), as long as you correctly adjust your path settings (see <xref linkend="path_warning" />).</para>
-
-  </sect2>
-
-  <sect2 id="install_other_systems"><title>For other systems</title>
-  <para>You need to download Dynare source code from the <ulink url="http://www.dynare.org">Dynare website</ulink> and unpack it somewhere.</para>
-
-  <para>Then you will need to recompile the pre-processor and the dynamic loadable libraries. Please refer to <ulink url="http://www.dynare.org/DynareWiki/BuildingDynareFromSource">Dynare Wiki</ulink>.</para>
-  </sect2>
-  </sect1>
-
-  <sect1><title>Configuration</title>
-
-  <sect2><title>For <trademark class="registered">MATLAB</trademark></title>
-
-  <para>You need to add the <filename>matlab</filename> subdirectory of your Dynare
-  installation to <trademark class="registered">MATLAB</trademark> path. You have two options for doing that:</para>
-  <itemizedlist>
-
-    <listitem><para>Using the <command>addpath</command> command in the <trademark class="registered">MATLAB</trademark> command window:</para>
-
-    <para>Under <trademark class="registered">Windows</trademark>, assuming that you have installed Dynare in the standard location, and replacing "4.x.y" with the correct version number, type:</para>
-    <programlisting>
-addpath c:\dynare\4.x.y\matlab
-    </programlisting>
-
-    <para>Under Debian GNU/Linux or Ubuntu, type:</para>
-    <programlisting>
-addpath /usr/share/dynare/matlab
-    </programlisting>
-
-    <para>Under <trademark class="registered">Mac OS X</trademark>, assuming that you have installed Dynare in the standard location, and replacing "4.x.y" with the correct version number, type:</para>
-    <programlisting>
-addpath /Applications/Dynare/4.x.y/matlab/
-    </programlisting>
-
-    <para><trademark class="registered">MATLAB</trademark> will not remember this setting next time you run it, and you will have
-    to do it again.</para>
-    </listitem>
-    <listitem><para>Via the menu entries:</para>
-    <para>Select the "Set Path" entry in the "File" menu, then click on "Add
-    Folder...", and select the <filename>matlab</filename> subdirectory of your Dynare
-    installation. Note that you <emphasis>should not</emphasis> use "Add with Subfolders...". Apply
-    the settings by clicking on "Save". Note that <trademark class="registered">MATLAB</trademark> will remember this
-    setting next time you run it.</para></listitem>
-  </itemizedlist>
-  </sect2>
-
-  <sect2><title>For GNU Octave</title>
-
-  <para>You need to add the <filename>matlab</filename> subdirectory of your Dynare
-  installation to Octave path, using the <command>addpath</command> at the Octave command prompt.</para>
-
-  <para>Under <trademark class="registered">Windows</trademark>, assuming that you have installed Dynare in the standard location, and replacing "4.x.y" with the correct version number, type:</para>
-  <programlisting>
-addpath c:\dynare\4.x.y\matlab
-  </programlisting>
-
-  <para>Under Debian GNU/Linux or Ubuntu, there is no need to use the <command>addpath</command> command; the packaging does it for you.</para>
-
-  <para>Under <trademark class="registered">Mac OS X</trademark>, assuming that you have installed Dynare in the standard location, and replacing "4.x.y" with the correct version number, type:</para>
-  <programlisting>
-addpath /Applications/Dynare/4.x.y/matlab
-  </programlisting>
-
-  <para>If you are using an Octave version strictly older than 3.2.0, you will also want to tell to Octave to accept the short syntax (without parentheses and quotes) for the <command>dynare</command> command, by typing:</para>
-  <programlisting>
-mark_as_command dynare
-  </programlisting>
-  <para>If you don't want to type this command every time you run Octave,
-  you can put it in a file called <filename>.octaverc</filename> in your home directory (under <trademark class="registered">Windows</trademark> this will generally by <filename>c:\Documents and Settings\USERNAME\</filename>). This file is run by Octave at every startup.</para>
-  </sect2>
-
-  <sect2 id="path_warning"><title>Some words of warning</title>
-
-  <para>You should be very careful about the content of your <trademark class="registered">MATLAB</trademark> or Octave path. You can display its content by simply typing <command>path</command> in the command window.</para>
-
-  <para>The path should normally contain system directories of <trademark class="registered">MATLAB</trademark> or Octave, and some subdirectories of your Dynare installation. You have to manually add the <filename>matlab</filename> subdirectory, and Dynare will automatically add a few other subdirectories at runtime (depending on your configuration). You must verify that there is no directory coming from another version of Dynare than the one you are planning to use.</para>
-
-  <para>You have to be aware that adding other directories to your path can potentially create problems, if some of your M-files have the same names than Dynare files. Your files would then override Dynare files, and make Dynare unusable.</para>
-  </sect2>
-
-</sect1>
-</chapter>
-
-<chapter><title>Dynare invocation</title>
-
-<para>
-  In order to give instructions to Dynare, the user has to write a <emphasis>model file</emphasis> whose filename extension must be <filename class="extension">.mod</filename>. This file contains the description of the model and the computing tasks required by the user. Its contents is described in <xref linkend="modfile"/>.
-</para>
-
-<para>Once the model file is written, Dynare is invoked using the <command>dynare</command> command at the <trademark class="registered">MATLAB</trademark> or Octave prompt (with the filename of the <filename class="extension">.mod</filename> given as argument).</para>
-
-<para>
-  In practice, the handling of the model file is done in two
-  steps: in the first one, the model and the processing instructions
-  written by the user in a <emphasis>model file</emphasis> are
-  interpreted and the proper <trademark class="registered">MATLAB</trademark> or GNU Octave instructions are generated; in the
-  second step, the program actually runs the computations. Boths steps are triggered automatically by the <command>dynare</command> command.
-</para>
-
-<refentry id="dynare">
-  <refmeta>
-    <refentrytitle>dynare</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>dynare</refname>
-    <refpurpose>executes Dynare</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>dynare</command>
-      <arg choice="plain">
-        <replaceable>FILENAME</replaceable>[.mod]
-      </arg>
-      <arg><option>noclearall</option></arg>
-      <arg><option>debug</option></arg>
-      <arg><option>notmpterms</option></arg>
-      <arg><option>savemacro</option><arg>=<replaceable>FILENAME</replaceable></arg></arg>
-      <arg><option>onlymacro</option></arg>
-      <arg><option>nolinemacro</option></arg>
-      <arg><option>warn_uninit</option></arg>
-      <arg><option>console</option></arg>
-      <arg><option>cygwin</option></arg>
-      <arg><option>msvc</option></arg>
-      <arg><option>parallel</option><arg>=<replaceable>CLUSTER_NAME</replaceable></arg></arg>
-      <arg><option>conffile</option>=<replaceable>FILENAME</replaceable></arg>
-      <arg><option>parallel_slave_open_mode</option></arg>
-      <arg><option>parallel_test</option></arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    <command>dynare</command> executes instruction included in <replaceable>FILENAME</replaceable><filename class="extension">.mod</filename>.
-    This user-supplied file contains the model and the processing instructions, as described in <xref linkend="modfile"/>.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Details</title>
-  <para>
-    <command>dynare</command> begins by launching the preprocessor on the <filename class="extension">.mod</filename> file.
-
-    By default (unless <option>use_dll</option> option has been given to <xref linkend="model"/>), the preprocessor creates three intermediary files:
-    <variablelist>
-      <varlistentry>
-        <term><replaceable>FILENAME</replaceable><filename>.m</filename></term>
-        <listitem><para>Contains variable declarations, and computing tasks</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>FILENAME</replaceable><filename>_dynamic.m</filename></term>
-        <listitem><para>Contains the dynamic model equations</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>FILENAME</replaceable><filename>_static.m</filename></term>
-        <listitem><para>Contains the long run static model equations</para></listitem>
-      </varlistentry>
-    </variablelist>
-    These files may be looked at to understand errors reported at the simulation stage.
-  </para>
-  <para><command>dynare</command> will then run the computing tasks by executing <replaceable>FILENAME</replaceable><filename>.m</filename>.</para>
-  </refsect1>
-
-  <refsect1>
-    <title>Options</title>
-
-    <variablelist>
-      <varlistentry>
-        <term><option>noclearall</option></term>
-        <listitem><para>By default, <command>dynare</command> will issue a <command>clear all</command> command to <trademark class="registered">MATLAB</trademark> or Octave, thereby deleting all workspace variables; this options instructs <command>dynare</command> not to clear the workspace</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>debug</option></term>
-        <listitem><para>Instructs the preprocessor to write some debugging information about the scanning and parsing of the <filename class="extension">.mod</filename> file</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>notmpterms</option></term>
-        <listitem><para>Instructs the preprocessor to omit temporary terms in the static and dynamic files; this generally decreases performance, but is used for debugging purposes since it makes the static and dynamic files more readable</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>savemacro</option>[=<replaceable>FILENAME</replaceable>]</term>
-        <listitem><para>Instructs <command>dynare</command> to save the intermediary file which is obtained after macro-processing (see <xref linkend="macrolanguage"/>); the saved output will go in the file specified, or if no file is specified in <replaceable>FILENAME</replaceable><filename>-macroexp.mod</filename></para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>onlymacro</option></term>
-        <listitem><para>Instructs the preprocessor to only perform the macro-processing step, and stop just after. Mainly useful for debugging purposes or for using the macro-processor independently of the rest of Dynare toolbox.</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>nolinemacro</option></term>
-        <listitem><para>Instructs the macro-preprocessor to omit line numbering information in the intermediary <filename class="extension">.mod</filename> file created after the maco-processing step. Useful in conjunction with <option>savemacro</option> when one wants that to reuse the intermediary <filename class="extension">.mod</filename> file, without having it cluttered by line numbering directives.</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>warn_uninit</option></term>
-        <listitem><para>Display a warning for each variable or parameter which is not initialized. Initialization should be done through <xref linkend="param_init"/> or <xref linkend="load_params_and_steady_state"/> for parameters, or through <xref linkend="initval"/>, <xref linkend="endval"/> or <xref linkend="load_params_and_steady_state"/> for endogenous and exogenous.</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>console</option></term>
-        <listitem><para>Activate console mode: Dynare will not use graphical waitbars for long computations. Note that this option is only useful under <trademark class="registered">MATLAB</trademark>, since Octave does not provide graphical waitbar capabilities.</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>cygwin</option></term>
-        <listitem><para>Tells Dynare that your <trademark class="registered">MATLAB</trademark> is configured for compiling MEX files with Cygwin (see <xref linkend="software-requirements"/>). This option is only available under Windows, and is used in conjunction with <xref linkend="use_dll"/>.</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>msvc</option></term>
-        <listitem><para>Tells Dynare that your <trademark class="registered">MATLAB</trademark> is configured for compiling MEX files with Microsoft Visual C++ (see <xref linkend="software-requirements"/>). This option is only available under Windows, and is used in conjunction with <xref linkend="use_dll"/>.</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>parallel</option>[=<replaceable>CLUSTER_NAME</replaceable>]</term>
-        <listitem><para>Tells Dynare to perform computations in parallel. If <replaceable>CLUSTER_NAME</replaceable> is passed, Dynare will use the specified cluster to perform parallel computations. Otherwise, Dynare will use the first cluster specified in the configuration file. See <xref linkend="conffile"/> for more information about the configuration file.</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>conffile=<replaceable>FILENAME</replaceable></option></term>
-        <listitem><para>Specifies the location of the configuration file if it differs from the default. See <xref linkend="conffile"/> for more information about the configuration file and its default location.</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>parallel_slave_open_mode</option></term>
-        <listitem><para>Instructs Dynare to leave the connection to the slave node open after computation is complete, closing this connection only when Dynare finishes processing.</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>parallel_test</option></term>
-        <listitem><para>Tests the parallel setup specified in the configuration file without executing the .mod file. See <xref linkend="conffile"/> for more information about the configuration file.</para></listitem>
-      </varlistentry>
-    </variablelist>
-
-  </refsect1>
-
-  <refsect1>
-    <title>Output</title>
-    <para>
-      Depending on the computing tasks requested in the <filename class="extension">.mod</filename> file, executing command <command>dynare</command> will leave in the workspace variables containing results available for further processing. More details are given under the relevant computing tasks.
-    </para>
-
-    <para>
-      The <varname>M_</varname>, <varname>oo_</varname> and <varname>options_</varname> structures are also saved in a file called <replaceable>FILENAME</replaceable><filename>_results.mat</filename>.
-    </para>
-  </refsect1>
-
-  <refsect1><title>Examples</title>
-  <informalexample>
-    <programlisting>
-dynare ramst
-dynare ramst.mod savemacro
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-</chapter>
-
-<chapter id="modfile"><title>The Model file</title>
-<para>
-  Dynare commands are either single instructions or a block of instructions. Each single instruction and each element of a block is terminated by a semicolon (<literal>;</literal>). Blocks of instructions are terminated by <command>end</command><literal>;</literal>.
-</para>
-
-<para>
-  Most Dynare commands have arguments and several accept options, indicated in parentheses after the command keyword.
-</para>
-
-<para id="conventions" xreflabel="Conventions">
-  In the description of Dynare commands, the following conventions are observed:
-  <itemizedlist>
-    <listitem><para>optional arguments or options are indicated between square brackets <literal>[]</literal></para></listitem>
-    <listitem><para>repreated arguments are indicated by ellipses <literal>...</literal></para></listitem>
-    <listitem><para>mutually exclusive arguments are separated by vertical bars <literal>|</literal></para></listitem>
-    <listitem><para><replaceable>INTEGER</replaceable> indicates an integer number</para></listitem>
-    <listitem><para><replaceable>DOUBLE</replaceable> indicates a double precision number. The following syntaxes are valid: <literal>1.1e3</literal>, <literal>1.1E3</literal>, <literal>1.1d3</literal>, <literal>1.1D3</literal></para></listitem>
-    <listitem><para><replaceable>EXPRESSION</replaceable> indicates a mathematical expression valid outside the model description (see <xref linkend="expressions"/>)</para></listitem>
-    <listitem><para><replaceable>MODEL_EXPRESSION</replaceable> indicates a mathematical expression valid in the model description (see <xref linkend="expressions"/> and <xref linkend="model"/>)</para></listitem>
-    <listitem><para><replaceable>VARIABLE_NAME</replaceable> indicates a variable name starting with an alphabetical character and can't contain <literal>()+-*/^=!;:@#.</literal> or accentuated characters</para></listitem>
-    <listitem><para><replaceable>PARAMETER_NAME</replaceable> indicates a parameter name starting with an alphabetical character and can't contain <literal>()+-*/^=!;:@#.</literal> or accentuated characters</para></listitem>
-    <listitem><para><replaceable>LATEX_NAME</replaceable> indicates a valid LaTeX expression in math mode (not including the dollar signs)</para></listitem>
-    <listitem><para><replaceable>FUNCTION_NAME</replaceable> indicates a valid <trademark class="registered">MATLAB</trademark> function name</para></listitem>
-    <listitem><para><replaceable>FILENAME</replaceable> indicates a filename valid in the underlying operating system; it is necessary to put it between double quotes when specifying the extension or if the filename contains a non-alphanumeric character</para></listitem>
-  </itemizedlist>
-</para>
-
-<sect1 id="vardecls"><title>Variable declarations</title>
-
-<para>Declarations of variables and parameters are made with the following commands:</para>
-<itemizedlist>
-  <listitem><para><xref linkend='var'/></para></listitem>
-  <listitem><para><xref linkend='varexo'/></para></listitem>
-  <listitem><para><xref linkend='varexo_det'/></para></listitem>
-  <listitem><para><xref linkend='parameters'/></para></listitem>
-  <listitem><para><xref linkend='change_type'/></para></listitem>
-  <listitem><para><xref linkend='predetermined_variables'/></para></listitem>
-  <listitem><para><xref linkend='trend_var'/></para></listitem>
-</itemizedlist>
-
-<refentry id="var">
-  <refmeta>
-    <refentrytitle>var</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>var</refname>
-    <refpurpose>declares endogenous variables</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>var</command>
-      <arg>
-        <arg choice="plain">(</arg>
-        <arg choice="req"><option>deflator</option> = <replaceable>MODEL_EXPRESSION</replaceable></arg>
-        <arg choice="plain">)</arg>
-      </arg>
-      <arg choice="plain">
-	      <replaceable>VARIABLE_NAME</replaceable>
-	      <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg rep="repeat"><arg>,</arg>
-      <replaceable>VARIABLE_NAME</replaceable>
-      <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    This required command declares the endogenous variables in the model. See <xref linkend="conventions"/> for the syntax of <replaceable>VARIABLE_NAME</replaceable> and <replaceable>MODEL_EXPRESSION</replaceable>. Optionally it is possible to give a LaTeX name to the variable or, if it nonstationary, provide information regarding its deflator.
-  </para>
-  <para><command>var</command> commands can appear several times in the file and Dynare will concatenate them.</para>
-  </refsect1>
-
-  <refsect1><title>Options</title>
-  <para>If the model is nonstationary and is to be written as such in the <command>model</command> block, Dynare will need the trend deflator for the appropriate endogenous variables in order to stationarize the model. The trend deflator must be provided alongside the variables that follow this trend.</para>
-  <variablelist>
-    <varlistentry>
-      <term><option>deflator = <replaceable>MODEL_EXPRESSION</replaceable></option></term>
-      <listitem><para>The expression used to detrend an endogenous variable. All trend variables, endogenous variables and parameters referenced in <replaceable>MODEL_EXPRESSION</replaceable> must already have been declared by the <command>trend_var</command>, <command>var</command> and <command>parameters</command> commands.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-var c gnp q1 q2;
-var(deflator=A) i b;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="varexo">
-  <refmeta>
-    <refentrytitle>varexo</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>varexo</refname>
-    <refpurpose>declares exogenous variables</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>varexo</command>
-      <arg choice="plain">
-	      <replaceable>VARIABLE_NAME</replaceable>
-	      <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg rep="repeat"><arg>,</arg>
-      <replaceable>VARIABLE_NAME</replaceable>
-      <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    This optional command declares the exogenous variables in the model. See <xref linkend="conventions"/> for the syntax of <replaceable>VARIABLE_NAME</replaceable>. Optionally it is possible to give a LaTeX name to the variable.
-  </para>
-  <para>
-    Exogenous variables are required if the user wants to be able to apply shocks to her model. 
-  </para>
-  <para><command>varexo</command> commands can appear several times in the file and Dynare will concatenate them.</para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-varexo m gov;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="varexo_det">
-  <refmeta>
-    <refentrytitle>varexo_det</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>varexo_det</refname>
-    <refpurpose>declares exogenous deterministic variables in a stochastic model</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>varexo_det</command>
-      <arg choice="plain">
-	      <replaceable>VARIABLE_NAME</replaceable>
-	      <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg rep="repeat"><arg>,</arg>
-      <replaceable>VARIABLE_NAME</replaceable>
-      <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    This optional command declares exogenous deterministic variables in a stochastic model. See <xref linkend="conventions"/> for the syntax of <replaceable>VARIABLE_NAME</replaceable>. Optionally it is possible to give a LaTeX name to the variable.
-  </para>
-  <para>It is possible to mix deterministic and stochastic shocks to build models where agents know from the start of the simulation about future exogenous changes. In that case <xref linkend="stoch_simul"/> will compute the rational expectation solution adding future information to the state space (nothing is shown in the output of <xref linkend="stoch_simul"/>) and <xref linkend="forecast"/> will compute a simulation conditional on initial conditions and future information.
-  </para>
-  <para><command>varexo_det</command> commands can appear several times in the file and Dynare will concatenate them.</para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-varexo m gov;
-varexo_det tau;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="parameters">
-  <refmeta>
-    <refentrytitle>parameters</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>parameters</refname>
-    <refpurpose>declares parameters</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>parameters</command>
-      <arg choice="plain">
-	      <replaceable>PARAMETER_NAME</replaceable>
-	      <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg rep="repeat"><arg>,</arg>
-      <replaceable>PARAMETER_NAME</replaceable>
-      <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    This command declares parameters used in the model, in variable initialization or in shocks declarations. See <xref linkend="conventions"/> for the syntax of <replaceable>PARAMETER_NAME</replaceable>. Optionally it is possible to give a LaTeX name to the parameter.
-  </para>
-  <para>The parameters must subsequently be assigned values, see <xref linkend="param_init"/>.
-  </para>
-  <para><command>parameters</command> commands can appear several times in the file and Dynare will concatenate them.</para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-parameters alpha, bet;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="change_type">
-  <refmeta>
-    <refentrytitle>change_type</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>change_type</refname>
-    <refpurpose>modify the type of declared variables/parameters</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>change_type</command>
-      <arg choice="plain">(</arg>
-      <group choice="plain">
-        <arg choice="plain">var</arg>
-        <arg choice="plain">varexo</arg>
-        <arg choice="plain">varexo_det</arg>
-        <arg choice="plain">parameters</arg>
-      </group>
-      <arg choice="plain">)</arg>
-      <group choice="plain">
-        <arg choice="plain"><replaceable>VARIABLE_NAME</replaceable></arg>
-        <arg choice="plain"><replaceable>PARAMETER_NAME</replaceable></arg>
-      </group>
-      <arg rep="repeat">
-        <arg>,</arg>
-        <group choice="plain">
-          <arg choice="plain"><replaceable>VARIABLE_NAME</replaceable></arg>
-          <arg choice="plain"><replaceable>PARAMETER_NAME</replaceable></arg>
-        </group>
-      </arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    Changes the types of the specified variables/parameters to another type: endogenous, exogenous, exogenous deterministic or parameter.
-  </para>
-  <para>It is important to understand that this command has a global effect on the <filename class="extension">.mod</filename> file: the type change is effective after, but also before, the <command>change_type</command> command. This command is typically used when flipping some variables for steady state calibration: typically a separate model file is used for calibration, which includes the list of variable declarations with the macro-processor, and flips some variable.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-var y, w;
-parameters alpha, bet;
-...
-change_type(var) alpha, bet;
-change_type(parameters) y, w;
-    </programlisting>
-    <para>Here, in the whole model file, <varname>alpha</varname> and <varname>beta</varname> will be endogenous and <varname>y</varname> and <varname>w</varname> will be parameters.</para>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="predetermined_variables">
-  <refmeta>
-    <refentrytitle>predetermined_variables</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>predetermined_variables</refname>
-    <refpurpose>declare some endogenous variables as predetermined</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>predetermined_variables</command>
-      <arg choice="plain"><replaceable>VARIABLE_NAME</replaceable></arg>
-      <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    In Dynare, the default convention is that the timing of a variable reflects when this variable is decided. The typical example is for capital stock: since the capital stock used at current period is actually decided at the previous period, then the capital stock entering the production function is <literal>k(-1)</literal>, and the law of motion of capital must be written:
-    <programlisting>
-k = i + (1-delta)*k(-1)
-    </programlisting>
-  </para>
-
-  <para>Put another way, for stock variables, the default in Dynare is to use a
-  “stock at the end of the period” concept, instead of a “stock at the beginning of the period”
-  convention.</para>
-
-
-  <para>The <command>predetermined_variables</command> is used to change that convention. The endogenous variables declared as predetermined variables are supposed to be decided one period ahead of all other endogenous variables. For stock variables, they are supposed
-  to follow a “stock at the beginning of the period”
-  convention.</para>
-
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-
-    <para>The following two program snippets are strictly equivalent.</para>
-
-    <formalpara><title>Using default Dynare timing convention:</title>
-    <para>
-      <programlisting>
-var y, k, i;
-...
-model;
-y = k(-1)^alpha;
-k = i + (1-delta)*k(-1);
-...
-end;
-      </programlisting>
-    </para>
-    </formalpara>
-
-    <formalpara><title>Using the alternative timing convention:</title>
-    <para>
-      <programlisting>
-var y, k, i;
-predetermined_variables k;
-...
-model;
-y = k^alpha;
-k(+1) = i + (1-delta)*k;
-...
-end;
-      </programlisting>
-    </para>
-    </formalpara>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="trend_var">
-  <refmeta>
-    <refentrytitle>trend_var</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>trend_var</refname>
-    <refpurpose>declares trend variables</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>trend_var</command>
-      <arg choice="plain">
-        <arg choice="plain">(</arg>
-        <arg choice="req"><option>growth_factor</option> = <replaceable>MODEL_EXPRESSION</replaceable></arg>
-        <arg choice="plain">)</arg>
-      </arg>
-      <arg choice="plain">
-        <replaceable>VARIABLE_NAME</replaceable>
-        <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg rep="repeat"><arg>,</arg>
-      <replaceable>VARIABLE_NAME</replaceable>
-      <arg>$<replaceable>LATEX_NAME</replaceable>$</arg>
-      </arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>This optional command declares the trend variables in the model. See <xref linkend="conventions"/> for the syntax of <replaceable>MODEL_EXPRESSION</replaceable> and <replaceable>VARIABLE_NAME</replaceable>. Optionally it is possible to give a LaTeX name to the variable.</para>
-  <para>Trend variables are required if the user wants to be able to write a nonstationary model in the <command>model</command> block. The <command>trend_var</command> command must appear before the <command>var</command> command that references the trend variable.</para>
-  <para><command>trend_var</command> commands can appear several times in the file and Dynare will concatenate them.</para>
-  </refsect1>
-
-  <refsect1><title>Options</title>
-  <para>If the model is nonstationary and is to be written as such in the <command>model</command> block, Dynare will need the growth factor of every trend variable in order to stationarize the model. The growth factor must be provided within the declaration of the trend variable.</para>
-  <variablelist>
-    <varlistentry>
-      <term><option>growth_factor = <replaceable>MODEL_EXPRESSION</replaceable></option></term>
-      <listitem><para>The growth factor of the trend variable. All endogenous variables and parameters referenced in <replaceable>MODEL_EXPRESSION</replaceable> must already have been declared by the <command>var</command> and <command>parameters</command> commands.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-trend_var (growth_factor=gA) A;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-</sect1>
-
-<sect1 id="expressions"><title>Expressions</title>
-
-<para>Dynare distinguishes between two types of mathematical expressions: those that are used to describe the model, and those that are used outside the model block (<foreignphrase>e.g.</foreignphrase> for initializing parameters or variables, or as command options). In this manual, those two types of expressions are respectively denoted by <replaceable>MODEL_EXPRESSION</replaceable> and <replaceable>EXPRESSION</replaceable>.</para>
-
-<para>Unlike <trademark class="registered">MATLAB</trademark> or Octave expressions, Dynare expressions are necessarily scalar ones: they cannot contain matrices or evaluate to matrices<footnote><para>Note that arbitrary <trademark class="registered">MATLAB</trademark> or Octave expressions can be put in a <filename class="extension">.mod</filename> file, but those expressions have to be on separate lines, generally at the end of the file for post-processing purposes. They are not interpreted by Dynare, and are simply passed on unmodified to <trademark class="registered">MATLAB</trademark> or Octave. Those constructions are not addresses in this section.</para></footnote>.</para>
-
-<para>Expressions can be constructed using integers (<replaceable>INTEGER</replaceable>), floating point numbers (<replaceable>DOUBLE</replaceable>), parameter names (<replaceable>PARAMETER_NAME</replaceable>), variable names (<replaceable>VARIABLE_NAME</replaceable>), operators and functions.</para>
-
-<sect2>
-  <title>Parameters and variables</title>
-
-  <para>Parameters and variables can be introduced in expressions by simply typing their names. The semantics of parameters and variables is quite different whether they are used inside or outside the model block.</para>
-
-  <sect3>
-    <title>Inside the model</title>
-
-    <para>Parameters used inside the model refer to the value given through <link linkend="param_init">parameter initialization</link> or <xref linkend="homotopy_setup"/> when doing a simulation, or are the estimated variables when doing an estimation.</para>
-
-    <para>Variables used in a <replaceable>MODEL_EXPRESSION</replaceable> denote <emphasis>current period</emphasis> values when neither a lead or a lag is given. A lead or a lag can be given by enclosing an integer between parenthesis just after the variable name: a positive integer means a lead, a negative one means a lag. Leads or lags of more than one period are allowed. For example, if <literal>c</literal> is an endogenous variable, then <literal>c(+1)</literal> is the variable one period ahead, and <literal>c(-2)</literal> is the variable two periods before.</para>
-
-    <para>When specifying the leads and lags of endogenous variables, it is important to respect the following convention: in Dynare, the timing of a variable reflects when that variable is decided. A control variable - which by definition is decided in the current period - must have no lead. A predetermined variable - which by definition has been decided in a previous period - must have a lag. A consequence of this is that all stock variables must use the "stock at the end of the period" convention. Please refer to <xref linkend="bib_userguide"/> for more details and concrete examples.</para>
-
-    <para>Leads and lags are primarily used for endogenous variables, but can be used for exogenous variables. They have no effect on parameters and are forbidden for local model variables (see <xref linkend="model"/>).</para>
-
-  </sect3>
-
-  <sect3>
-    <title>Outside the model</title>
-    <para>When used in an expression outside the model block, a parameter or a variable simply refers to the last value given to that variable. More precisely, for a parameter it refers to the value given in the corresponding <link linkend="param_init">parameter initialization</link>; for an endogenous or exogenous variable, it refers to the value given in the most recent <xref linkend="initval"/> or <xref linkend="endval"/> block.</para>
-  </sect3>
-
-</sect2>
-
-<sect2><title>Operators</title>
-<para>The following operators are allowed in both <replaceable>MODEL_EXPRESSION</replaceable> and <replaceable>EXPRESSION</replaceable>:
-<itemizedlist>
-  <listitem><para>binary arithmetic operators: <literal>+</literal>, <literal>-</literal>, <literal>*</literal>, <literal>/</literal>, <literal>^</literal></para></listitem>
-  <listitem><para>unary arithmetic operators: <literal>+</literal>, <literal>-</literal></para></listitem>
-  <listitem><para>binary comparison operators (which evaluate to either <literal>0</literal> or <literal>1</literal>): <literal>&lt;</literal>, <literal>&gt;</literal>, <literal>&lt;=</literal>, <literal>&gt;=</literal>, <literal>==</literal>, <literal>!=</literal></para></listitem>
-</itemizedlist>
-</para>
-<para>The following operators are allowed in <replaceable>MODEL_EXPRESSION</replaceable>:
-<itemizedlist>
-  <listitem><para>steady state operator: <literal>STEADY_STATE(</literal><replaceable>MODEL_EXPRESSION</replaceable><literal>)</literal>. This operator is used to take the value of the enclosed expression at the steady state. A typical usage is in the Taylor rule, where you may want to use the value of GDP at steady state to compute the output gap.</para></listitem>
-  <listitem id="expectation_operator"><para>expectation operator: <literal>EXPECTATION(</literal><replaceable>INTEGER</replaceable><literal>)(</literal><replaceable>MODEL_EXPRESSION</replaceable><literal>)</literal>. This operator is used to take the expectation of some expression using a different information set than the information available at current period. For example, <literal>EXPECTATION(-1)(x(+1))</literal> is equal to the expected value of variable <literal>x</literal> at next period, using the information set available at the previous period. In practice, Dynare solves this by creating an auxiliary variable equal to <literal>AUX_EXPECT_LAG_1 = x(+2)</literal>, and by replacing the expectation operator by <literal>AUX_EXPECT_LAG_1(-1)</literal>. Note that a value of <literal>0</literal> for the time shift component is reserved for partial information models (not yet fully implemented).</para></listitem>
-</itemizedlist>
-</para>
-</sect2>
-
-<sect2><title>Functions</title>
-<sect3><title>Internal</title>
-<para>The following standard functions are supported internally for both <replaceable>MODEL_EXPRESSION</replaceable> and <replaceable>EXPRESSION</replaceable>:
-<itemizedlist>
-  <listitem><para>exponential: <literal>exp(<replaceable>x</replaceable>)</literal></para></listitem>
-  <listitem><para>natural logarithm: <literal>log(<replaceable>x</replaceable>)</literal> (or equivalently <literal>ln(<replaceable>x</replaceable>)</literal>)</para></listitem>
-  <listitem><para>base 10 logarithm: <literal>log10(<replaceable>x</replaceable>)</literal></para></listitem>
-  <listitem><para>square root: <literal>sqrt(<replaceable>x</replaceable>)</literal></para></listitem>
-  <listitem><para>trigonometric functions: <literal>sin(<replaceable>x</replaceable>)</literal>, <literal>cos(<replaceable>x</replaceable>)</literal>, <literal>tan(<replaceable>x</replaceable>)</literal>, <literal>asin(<replaceable>x</replaceable>)</literal>, <literal>acos(<replaceable>x</replaceable>)</literal>, <literal>atan(<replaceable>x</replaceable>)</literal></para></listitem>
-  <listitem><para>maximum and minimum: <literal>max(<replaceable>a</replaceable>, <replaceable>b</replaceable>)</literal>, <literal>min(<replaceable>a</replaceable>, <replaceable>b</replaceable>)</literal></para></listitem>
-  <listitem><para>gaussian cumulative distribution function: <literal>normcdf(<replaceable>x</replaceable>, <replaceable>&mu;</replaceable>, <replaceable>&sigma;</replaceable>)</literal> (note that <literal>normcdf(<replaceable>x</replaceable>)</literal> is equivalent to <literal>normcdf(<replaceable>x</replaceable>, 0, 1)</literal>)</para></listitem>
-  <listitem><para>gaussian probability density function: <literal>normpdf(<replaceable>x</replaceable>, <replaceable>&mu;</replaceable>, <replaceable>&sigma;</replaceable>)</literal> (note that <literal>normpdf(<replaceable>x</replaceable>)</literal> is equivalent to <literal>normpdf(<replaceable>x</replaceable>, 0, 1)</literal>)</para></listitem>
-  <listitem><para>gauss error function: <literal>erf(<replaceable>x</replaceable>)</literal></para></listitem>
-</itemizedlist>
-</para>
-</sect3>
-<sect3><title>External</title>
-<para>Any other user-defined (or built-in) <trademark class="registered">MATLAB</trademark> or Octave function may be used in both a <replaceable>MODEL_EXPRESSION</replaceable> and an <replaceable>EXPRESSION</replaceable>, provided that this function has a scalar argument as a return value.</para>
-<para>To use an external function in a <replaceable>MODEL_EXPRESSION</replaceable>, one must declare the function using the <xref linkend='external_function'/> statement. This is not necessary for external functions used in an <replaceable>EXPRESSION</replaceable>.</para>
-
-<refentry id="external_function">
-  <refmeta>
-    <refentrytitle>external_function</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>external_function</refname>
-    <refpurpose>declares external functions</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>external_function</command>
-      <arg choice="plain">(</arg>
-      <arg choice="req"><option>name</option> = <replaceable>NAME</replaceable></arg>
-      <arg choice="opt">,
-      <replaceable>OPTION</replaceable> = <replaceable>INTEGER</replaceable>
-      </arg>
-      <arg choice="opt" rep="repeat">,
-      <replaceable>OPTION</replaceable><arg choice="opt"> = <replaceable>NAME</replaceable></arg>
-      </arg>
-      <arg choice="plain">);</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>name</option> = <replaceable>NAME</replaceable></term>
-      <listitem><para>The name of the function, which must also be the name of the M-/MEX file implementing it.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>nargs</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>The number of arguments of the function. If this option is not provided, Dynare assumes <literal><option>nargs</option> = 1</literal>.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>first_deriv_provided</option> [= <replaceable>NAME</replaceable>]</term>
-      <listitem><para>If <replaceable>NAME</replaceable> is provided, this tells Dynare that the Jacobian is provided as the only output of the M-/MEX file given as the option argument. If <replaceable>NAME</replaceable> is not provided, this tells Dynare that the M-/MEX file specified by the argument passed to <option>name</option> returns the Jacobian as its second output argument.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>second_deriv_provided</option> [= <replaceable>NAME</replaceable>]</term>
-      <listitem><para>If <replaceable>NAME</replaceable> is provided, this tells Dynare that the Hessian is provided as the only output of the M-/MEX file given as the option argument. If <replaceable>NAME</replaceable> is not provided, this tells Dynare that the M-/MEX file specified by the argument passed to <option>name</option> returns the Hessian as its third output argument. NB: This option can only be used if the <option>first_deriv_provided</option> option is used in the same <command>external_function</command> command.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Description</title>
-  <para>
-    This command declares the external functions used in the model block. It is required for every unique function used in the model block.
-  </para>
-  <para><command>external_function</command> commands can appear several times in the file and must come before the model block.</para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <para>
-      <programlisting>
-        external_function(name = funcname);
-        external_function(name = funcname, nargs = 2, first_deriv_provided, second_deriv_provided);
-        external_function(name = funcname, nargs = 3, first_deriv_provided = funcname_deriv);
-      </programlisting>
-    </para>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-</sect3>
-</sect2>
-</sect1>
-
-<sect1 id="param_init"><title>Parameter initialization</title>
-
-<para>When using Dynare for computing simulations, it is necessary to calibrate the parameters of the model. This is done through parameter initialization.</para>
-
-<formalpara><title>Syntax</title>
-<para>
-  <programlisting>
-    <replaceable>PARAMETER_NAME</replaceable> = <replaceable>EXPRESSION</replaceable> ;
-  </programlisting>
-</para>
-</formalpara>
-
-<formalpara><title>Example</title>
-
-<para>
-  <informalexample>
-    <programlisting>
-parameters alpha, bet;
-
-beta = 0.99;
-alpha = 0.36;
-A = 1-alpha*beta;
-    </programlisting>
-  </informalexample>
-</para>
-</formalpara>
-
-</sect1>
-
-<sect1><title>Model declaration</title>
-
-<para>The model is declared inside a <xref linkend="model"/> block.</para>
-
-<para>Note that it is possible to output the list of model equations to a LaTeX file, using the <xref linkend="write_latex_dynamic_model"/> command, or the <xref linkend="write_latex_static_model"/> (for the steady state model).</para>
-
-<refentry id="model">
-  <refmeta>
-    <refentrytitle>model</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>model</refname>
-    <refpurpose>declares the model equations</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>model</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg choice="plain">;</arg>
-      <sbr/>
-      <arg choice="plain" rep="repeat">
-        <group>
-          <arg choice="plain"><replaceable>MODEL_EXPRESSION</replaceable> = <replaceable>MODEL_EXPRESSION</replaceable> ;</arg>
-          <arg choice="plain"><replaceable>MODEL_EXPRESSION</replaceable> ;</arg>
-          <arg choice="plain"># <replaceable>VARIABLE_NAME</replaceable> = <replaceable>MODEL_EXPRESSION</replaceable> ;</arg>
-        </group>
-        </arg><sbr/>
-        <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    The equations of the model are written in a block delimited by <command>model</command> and <command>end</command> keywords.
-  </para>
-  <para>
-  There must be as many equations as there are endogenous variables in the model, except when computing the unconstrained optimal policy with <xref linkend="ramsey_policy"/>.</para>
-
-  <para>The syntax of equations must follow the conventions for <replaceable>MODEL_EXPRESSION</replaceable> as described in <xref linkend="expressions"/>. Each equation must be terminated by a semicolon (<literal>;</literal>).
-  </para>
-  <para>
-    When the equations are written in homogenous form, it is possible to omit the <literal>=0</literal> part and write only the left hand side of the equation.
-  </para>
-  <para>
-    Inside the model block, Dynare allows the creation of <emphasis>model-local variables</emphasis>, which constitute a simple way to share a common expression between several equations. The syntax consists of a pound sign (<literal>#</literal>) followed by the name of the new model local variable (which must <emphasis>not</emphasis> be declared as in <xref linkend="vardecls"/>), an equal sign, and the expression for which this new variable will stand. Later on, every time this variable appears in the model, Dynare will substitute it by the expression assigned to the variable. Note that the scope of this variable is restricted to the model block; it cannot be used outside.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>linear</option></term>
-      <listitem><para>Declares the model as being linear. It spares oneself from having to declare initial values for computing the steady state, and it sets automatically <option>order</option><literal>=1</literal> in <xref linkend="stoch_simul" />.</para></listitem>
-    </varlistentry>
-    <varlistentry id="use_dll">
-      <term><option>use_dll</option></term>
-      <listitem><para>Instructs the preprocessor to create dynamic loadable libraries (DLL) containing the model equations and derivatives, instead of writing those in <filename class="extension">M</filename>-files. You need a working compilation environment, <foreignphrase>i.e.</foreignphrase> a working <literal>mex</literal> command (see <xref linkend="software-requirements"/> for more details). Using this option can result in faster simulations or estimations, at the expense of some initial compilation time.<footnote><para>In particular, for big models, the compilation step can be very time-consuming, and use of this option may be counter-productive in those cases.</para></footnote></para></listitem>
-    </varlistentry>
-    <varlistentry id="block">
-      <term><option>block</option></term>
-      <listitem><para>Perform the block decomposition of the model, and exploit it in computations. See <ulink url="http://www.dynare.org/DynareWiki/FastDeterministicSimulationAndSteadyStateComputation">Dynare wiki</ulink> for details on the algorithm.</para></listitem>
-    </varlistentry>
-    <varlistentry id="bytecode">
-      <term><option>bytecode</option></term>
-      <listitem><para>Instead of M-files, use a bytecode representation of the model, <foreignphrase>i.e.</foreignphrase> a binary file containing a compact representation of all the equations.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>cutoff</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>Threshold under which a jacobian element is considered as null during the model normalization. Only available with option <option>block</option>. Default: <literal>1e-15</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>mfs</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Controls the handling of minimum feedback set of endogenous variables. Only available with option <option>block</option>. Possible values:
-      <itemizedlist>
-        <listitem><para><literal>0</literal>: all the endogenous variables are considered as feedback variables (Default).</para></listitem>
-        <listitem><para><literal>1</literal>: the endogenous variables assigned to equation naturally normalized (<foreignphrase>i.e.</foreignphrase> of the form <literal>x=f(Y)</literal> where <literal>x</literal> does not appear in <literal>Y</literal>) are potentially recursive variables. All the other variables are forced to belong to the set of feedback variables.</para></listitem>
-        <listitem><para><literal>2</literal>: in addition of variables with <literal>mfs = 1</literal> the endogenous variables related to linear equations which could be normalized are potential recursive variables. All the other variables are forced to belong to the set of feedback variables.</para></listitem>
-        <listitem><para><literal>3</literal>: in addition of variables with <literal>mfs = 2</literal> the endogenous variables related to non-linear equations which could be normalized are potential recursive variables. All the other variables are forced to belong to the set of feedback variables.</para></listitem>
-      </itemizedlist>
-      </para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>no_static</option></term>
-      <listitem><para>Don't create the static model file. This can be useful for models which don't have a steady state.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Examples</title>
-  <refsect2><title>Example 1: elementary RBC model</title>
-  <informalexample>
-    <programlisting>
-var c k;
-varexo x;
-parameters aa alph bet delt gam;
-
-model;
-c =  - k + aa*x*k(-1)^alph + (1-delt)*k(-1);
-c^(-gam) = (aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam)/(1+bet);
-end;
-    </programlisting>
-  </informalexample>
-  </refsect2>
-
-  <refsect2><title>Example 2: use of model local variables</title>
-
-  <informalexample>
-    <para>The following program:
-    <programlisting>
-model;
-# gamma = 1 - 1/sigma;
-u1 = c1^gamma/gamma;
-u2 = c2^gamma/gamma;
-end;
-    </programlisting>
-
-    ...is formally equivalent to:
-    <programlisting>
-model;
-u1 = c1^(1-1/sigma)/(1-1/sigma);
-u2 = c2^(1-1/sigma)/(1-1/sigma);
-end;
-    </programlisting>
-    </para>
-  </informalexample>
-  </refsect2>
-
-  <refsect2><title>Example 3: a linear model</title>
-  <informalexample>
-    <programlisting>
-model(linear);
-x = a*x(-1)+b*y(+1)+e_x;
-y = d*y(-1)+e_y;
-end;
-    </programlisting>
-  </informalexample>
-  </refsect2>
-  </refsect1>
-</refentry>
-
-<refentry id="write_latex_dynamic_model">
-  <refmeta>
-    <refentrytitle>write_latex_dynamic_model</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>write_latex_dynamic_model</refname>
-    <refpurpose>create a LaTeX file containing the (dynamic) model</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>write_latex_dynamic_model</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>If your <filename class="extension">.mod</filename> file is <filename><replaceable>FILENAME</replaceable>.mod</filename>, then Dynare will create a file called <filename><replaceable>FILENAME</replaceable>_dynamic.tex</filename>, containing the list of all the dynamic model equations. 
-  </para>
-  <para>If LaTeX names were given for variables and parameters (see <xref linkend="var"/>, <xref linkend="varexo"/>, <xref linkend="varexo_det"/>, <xref linkend="parameters"/>), then those will be used; otherwise, the plain text names will be used.</para>
-  <para>Time subscripts (<literal>t</literal>, <literal>t+1</literal>, <literal>t-1</literal>, ...) will be appended to the variable names, as LaTeX subscripts.</para>
-
-  <para>
-    Note that the model written in the TeX file will differ from the model declared by the user in the following dimensions:
-    <itemizedlist>
-      <listitem><para>the timing convention of <xref linkend="predetermined_variables"/> will have been changed to the default Dynare timing convention; in other words, variables declared as predetermined will be lagged on period back,</para></listitem>
-      <listitem><para>the <link linkend="expectation_operator">expectation operators</link> will have been removed, replaced by auxiliary variables and new equations as explained in the documentation of the operator,</para></listitem>
-      <listitem><para>endogenous variables with leads or lags greater or equal than two will have been removed, replaced by new auxiliary variables and equations,</para></listitem>
-      <listitem><para>for a stochastic model, exogenous variables with leads or lags will also have been replaced by new auxiliary variables and equations.</para></listitem>
-    </itemizedlist>
-  </para>
-
-  </refsect1>
-</refentry>
-
-<refentry id="write_latex_static_model">
-  <refmeta>
-    <refentrytitle>write_latex_static_model</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>write_latex_static_model</refname>
-    <refpurpose>create a LaTeX file containing the (static) model</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>write_latex_static_model</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>If your <filename class="extension">.mod</filename> file is <filename><replaceable>FILENAME</replaceable>.mod</filename>, then Dynare will create a file called <filename><replaceable>FILENAME</replaceable>_static.tex</filename>, containing the list of all the equations of the steady state model.
-  </para>
-  <para>If LaTeX names were given for variables and parameters (see <xref linkend="var"/>, <xref linkend="varexo"/>, <xref linkend="varexo_det"/>, <xref linkend="parameters"/>), then those will be used; otherwise, the plain text names will be used.</para>
-  <para>
-    Note that the model written in the TeX file will differ from the model declared by the user in the some dimensions, see <xref linkend="write_latex_dynamic_model"/>.
-  </para>
-  <para>
-    Also note that this command will not output the contents of the optional <xref linkend="steady_state_model"/> block; it will rather output a static version (<foreignphrase>i.e.</foreignphrase> without leads and lags) of the dynamic model declared in the <xref linkend="model"/> block.
-  </para>
-  </refsect1>
-</refentry>
-
-</sect1>
-
-<sect1><title>Initial and terminal conditions</title>
-
-<para>For most simulation exercises, it is necessary to provide initial (and possibly terminal) conditions. It is also necessary to provide initial guess values for non-linear solvers. The following statements are used for those purposes:</para>
-<itemizedlist>
-  <listitem><para><xref linkend='initval'/></para></listitem>
-  <listitem><para><xref linkend='endval'/></para></listitem>
-  <listitem><para><xref linkend='histval'/></para></listitem>
-  <listitem><para><xref linkend='resid'/></para></listitem>
-  <listitem><para><xref linkend='initval_file'/></para></listitem>
-</itemizedlist>
-
-<para>In many contexts (determistic or stochastic), it is necessary to compute the steady state of a non-linear model: <xref linkend='initval'/> then specifies numerical initial values for the non-linear solver. The command <xref linkend='resid'/> can be used to compute the equation residuals for the given initial values.
-</para>
-<para>
-  Used in perfect foresight mode, the types of forward-loking models for which Dynare was designed require both initial and terminal conditions. Most often these initial and terminal conditions are static equilibria, but not necessarily. 
-</para>
-<para>
-  One typical application is to consider an economy at the equilibrium, trigger a shock in first period, and study the trajectory of return at the initial equilbrium. To do that, one needs <xref linkend='initval'/> and <xref linkend='shocks'/> (see <xref linkend="sec_shocks"/>.
-</para>
-<para>
-  Another one is to study, how an economy, starting from arbitrary initial conditions converges toward equilibrium. To do that, one needs <xref linkend='initval'/> and <xref linkend='endval'/>; 
-</para>
-<para>
-  For models with lags on more than one period, the command <xref linkend='histval'/> permits to specify different historical initial values for periods before the beginning of the simulation.
-</para>
-
-<refentry id="initval">
-  <refmeta>
-    <refentrytitle>initval</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>initval</refname>
-    <refpurpose>specifies numerical starting values for finding the steady state and/or initial values for simulations</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>initval</command><arg choice="plain">;</arg><sbr/>
-      <arg rep="repeat" choice="plain">
-	      <replaceable>VARIABLE_NAME</replaceable> = <replaceable>EXPRESSION</replaceable> ;
-        </arg><sbr/>
-        <command>end</command><arg choice="plain">;</arg><sbr/>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>The <command>initval</command> block serves two purposes: declaring the initial (and possibly terminal) conditions in a simulation exercise, and providing guess values for non-linear solvers.</para>
-
-  <refsect2><title>In a deterministic (<foreignphrase>i.e.</foreignphrase> perfect foresight) model</title>
-
-  <para>First, it provides the initial conditions for all the endogenous and exogenous variables at all the periods preceeding the first simulation period (unless some of these initial values are modified by <xref linkend="histval"/>).</para>
-
-  <para>Second, in the absence of an <xref linkend="endval"/> block, it sets the terminal conditions for all the periods succeeding the last simulation period.</para>
-
-  <para>Third, in the absence of an <xref linkend="endval"/> block, it provides initial guess values at all simulation dates for the non-linear solver implemented in <xref linkend="simul"/>.</para>
-
-  <para>For this last reason, it necessary to provide values for all the endogenous variables in an <command>initval</command> block (even though, theoretically, initial conditions are only necessary for lagged variables). If some exogenous variables are not mentionned in the <command>initval</command> block, a zero value is assumed.</para>
-
-  <para>Note that if the <command>initval</command> block is immediately followed by a <xref linkend="steady"/> command, its semantics is changed. The <xref linkend="steady"/> command will compute the steady state of the model for all the endogenous variables, assuming that exogenous variables are kept constant to the value declared in the <command>initval</command> block, and using the values declared for the endogenous as initial guess values for the non-linear solver. An <command>initval</command> block followed by <xref linkend="steady"/> is formally equivalent to an <command>initval</command> block with the same values for the exogenous, and with the associated steady state values for the endogenous.</para>
-
-  </refsect2>
-
-  <refsect2><title>In a stochastic model</title>
-
-  <para>The main purpose of <command>initval</command> is to provide initial guess values for the non-linear solver in the steady state computation. Note that if the <command>initval</command> block is not followed by <xref linkend="steady"/>, the steady state computation will still be triggered by subsequent commands (<xref linkend="stoch_simul"/>, <xref linkend="estimation"/>...).</para>
-
-  <para>It is not necessary to declare <literal>0</literal> as initial value for exogenous stochastic variables, since it is the only possible value.</para>
-
-  <para>This steady state will be used as the initial condition at all the periods preceeding the first simulation period for the two possible types of simulations in stochastic mode:</para>
-  <itemizedlist>
-    <listitem><para>in <xref linkend="stoch_simul"/>, if the <option>periods</option> options is specified</para></listitem>
-    <listitem><para>in <xref linkend="forecast"/> (in this case, note that it is still possible to modify some of these initial values with <xref linkend="histval"/>)</para></listitem>
-  </itemizedlist>
-
-  </refsect2>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-initval;
-c = 1.2;
-k = 12;
-x = 1;
-end;
-
-steady;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="endval">
-  <refmeta>
-    <refentrytitle>endval</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>endval</refname>
-    <refpurpose>specifies terminal values for deterministic simulations</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>endval</command><arg choice="plain">;</arg><sbr/>
-      <arg rep="repeat" choice="plain">
-	      <replaceable>VARIABLE_NAME</replaceable> = <replaceable>EXPRESSION</replaceable> ;
-        </arg><sbr/>
-        <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-
-  <para>The <command>endval</command> block makes only sense in a determistic model, and serves two purposes.</para>
-
-  <para>First, it sets the terminal conditions for all the periods succeeding the last simulation period.</para>
-
-  <para>Second, it provides initial guess values at all the simulation dates for the non-linear solver implemented in <xref linkend="simul"/>.</para>
-
-  <para>For this last reason, it necessary to provide values for all the endogenous variables in an <command>endval</command> block (even though, theoretically, initial conditions are only necessary for forward variables). If some exogenous variables are not mentionned in the <command>endval</command> block, a zero value is assumed.</para>
-
-  <para>Note that if the <command>endval</command> block is immediately followed by a <xref linkend="steady"/> command, its semantics is changed. The <xref linkend="steady"/> command will compute the steady state of the model for all the endogenous variables, assuming that exogenous variables are kept constant to the value declared in the <command>endval</command> block, and using the values declared for the endogenous as initial guess values for the non-linear solver. An <command>endval</command> block followed by <xref linkend="steady"/> is formally equivalent to an <command>endval</command> block with the same values for the exogenous, and with the associated steady state values for the endogenous.</para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-var c k;
-varexo x;
-...
-initval;
-c = 1.2;
-k = 12;
-x = 1;
-end;
-
-steady;
-
-endval;
-c = 2;
-k = 20;
-x = 2;
-end;
-
-steady;
-    </programlisting>
-  </informalexample>
-  <para>
-    The initial equilibrium is computed by <xref linkend='steady'/> for <literal>x=1</literal>, and the terminal one, for <literal>x=2</literal>.
-  </para>
-  </refsect1>
-</refentry>
-
-<refentry id="histval">
-  <refmeta>
-    <refentrytitle>histval</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>histval</refname>
-    <refpurpose>specifies historical values before the start of a simulation</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>histval</command><arg choice="plain">;</arg><sbr/>
-      <arg rep="repeat" choice="plain">
-	      <replaceable>VARIABLE_NAME</replaceable>(<replaceable>INTEGER</replaceable>) = <replaceable>EXPRESSION</replaceable> ;
-        </arg><sbr/>
-        <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    <replaceable>EXPRESSION</replaceable> is any valid expression returning a numerical value and can contain already initialized variable names.
-  </para>
-  <para>
-    In models with lags on more than one period, the optional <command>histval;</command> ... <command>end;</command> block permits to specify different historical initial values for different periods.
-  </para>
-  <para>
-    By convention in Dynare, period 1 is the first period of the simulation. Going backward in time, the first period before the start of the simulation is period 0, then period -1, and so on.
-  </para>
-  <para>
-    If your lagged variables are linked by identities, be careful to satisfy these identities when you set historical initial values.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-var x y;
-varexo e;
-
-model;
-x = y(-1)^alpha*y(-2)^(1-alpha)+e;
-...
-end;
-
-initval;
-x = 1;
-y = 1;
-e = 0.5;
-end;
-
-steady;
-
-histval;
-y(0) = 1.1;
-y(-1) = 0.9;
-end;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-
-</refentry>
-
-<refentry id="resid">
-  <refmeta>
-    <refentrytitle>resid</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>resid</refname>
-    <refpurpose>display the residual of the static equations</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>resid</command><arg choice="plain">;</arg><sbr/>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>This command will display the residuals of the static equations of the model, using the values given for the endogenous in the last <xref linkend="initval"/> or <xref linkend="endval"/> block (or the steady state file if you provided one).</para>
-  </refsect1>
-
-</refentry>
-
-
-<refentry id="initval_file">
-  <refmeta>
-    <refentrytitle>initval_file</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>initval_file</refname>
-    <refpurpose>use an external to specify a path for exogenous and endogenous variables in a deterministic simulation</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>initval_file</command><arg choice="plain">(<option>filename</option> = <replaceable>FILENAME</replaceable>)</arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>In a deterministic setup, this command is used to specify a path for all endogenous and exogenous variables. The length of these paths must be equal to the number of simulation periods, plus the number of leads and the number of lags of the model (for example, with 50 simulation periods, in a model with 2 lags and 1 lead, the paths must have a length of 53). Note that these paths cover two different things:
-  <itemizedlist>
-    <listitem><para>the constraints of the problem, which are given by the path for exogenous and the initial and terminal values for endogenous</para></listitem>
-    <listitem><para>the initial guess for the non-linear solver, which is given by the path for endogenous variables for the simulation periods (excluding initial and terminal conditions)</para></listitem>
-  </itemizedlist>
-  </para>
-  <para>The command accepts three file formats:
-  <itemizedlist>
-    <listitem><para>M-file (extension <filename class="extension">.m</filename>): for each endogenous and exogenous variable, the file must contain a row vector of the same name</para></listitem>
-    <listitem><para>MAT-file (extension <filename class="extension">.mat</filename>): same as for M-files</para></listitem>
-    <listitem><para>Excel file (extension <filename class="extension">.xls</filename>): for each endogenous and exogenous, the file must contain a column of the same name</para></listitem>
-  </itemizedlist>
-  </para>
-  <warning><para>The extension must be omitted in the command argument. Dynare will automatically figure out the extension and select the appropriate file type.</para></warning>
-  </refsect1>
-
-</refentry>
-
-</sect1>
-<sect1 id="sec_shocks"><title>Shocks on exogenous variables</title>
-<para>
-  In a deterministic context, when one wants to study the transition of one equilibrium position to another, it is equivalent to analyze the consequences of a permanent shock and this in done in Dynare through the proper use of <xref linkend='initval'/> and <xref linkend='endval'/>.
-</para>
-<para>
-  Another typical experiment is to study the effects of a temporary shock after which the system goes back to the original equilibrium (if the model is stable ...). A temporary shock is a temporary change of value of one or several exogenous variables in the model. Temporary shocks are specified with the command <xref linkend='shocks'/>.
-</para>
-<para>
-  In a stochastic framework, the exogenous variables take random values in each period. In Dynare, these random values follow a normal distribution with zero mean, but it belongs to the user to specify the variability of these shocks. The non-zero elements of the matrix of variance-covariance of the shocks can be entered with the <xref linkend='shocks'/> command. Or, the entire matrix can be direclty entered with <xref linkend='Sigma_e'/> (this use is however deprecated).
-</para>
-<para>
-  If the variance of an exogenous variable is set to zero, this variable will appear in the report on policy and transition functions, but isn't used in the computation of moments and of Impulse Response Functions. Setting a variance to zero is an easy way of removing an exogenous shock.
-</para>
-<itemizedlist>
-  <listitem><para><xref linkend='shocks'/></para></listitem>
-  <listitem><para><xref linkend='mshocks'/></para></listitem>
-  <listitem><para><xref linkend='Sigma_e'/> (deprecated)</para></listitem>
-</itemizedlist>
-
-<refentry id="shocks">
-  <refmeta>
-    <refentrytitle>shocks</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>shocks</refname>
-    <refpurpose>specifies shocks on deterministic or stochastic exogenous variables</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <refsect2><title>In deterministic context</title>
-    <cmdsynopsis>
-      <command>shocks</command><arg choice="plain">;</arg><sbr/>
-      <arg rep="repeat" choice="plain">
-        <arg choice="plain">var <replaceable>VARIABLE_NAME</replaceable>;</arg><sbr/>
-        <arg choice="plain">periods <replaceable>INTEGER</replaceable><arg>:<replaceable>INTEGER</replaceable></arg><arg rep="repeat"><arg>,</arg> <replaceable>INTEGER</replaceable><arg>:<replaceable>INTEGER</replaceable></arg></arg>;</arg><sbr/>
-        <arg choice="plain">values <group choice="plain"><arg choice="plain"><replaceable>DOUBLE</replaceable></arg><arg choice="plain">(<replaceable>EXPRESSION</replaceable>)</arg></group> <arg rep="repeat"><arg>,</arg> <group choice="plain"><arg choice="plain"><replaceable>DOUBLE</replaceable></arg><arg choice="plain">(<replaceable>EXPRESSION</replaceable>)</arg></group></arg>;</arg>
-        </arg><sbr/>
-        <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-    </refsect2>
-
-    <refsect2><title>In stochastic context</title>
-    <cmdsynopsis>
-      <command>shocks</command><arg choice="plain">;</arg><sbr/>
-      <arg rep="repeat" choice="plain">
-        <group choice="plain">
-          <arg choice="plain">var <replaceable>VARIABLE_NAME</replaceable>; stderr <replaceable>EXPRESSION</replaceable>;</arg><sbr/>
-          <arg choice="plain">var <replaceable>VARIABLE_NAME</replaceable> = <replaceable>EXPRESSION</replaceable>;</arg><sbr/>
-          <arg choice="plain">var <replaceable>VARIABLE_NAME</replaceable>, <replaceable>VARIABLE_NAME</replaceable> = <replaceable>EXPRESSION</replaceable>;</arg><sbr/>
-          <arg choice="plain">corr <replaceable>VARIABLE_NAME</replaceable>, <replaceable>VARIABLE_NAME</replaceable> = <replaceable>EXPRESSION</replaceable>;</arg>
-        </group>
-      </arg><sbr/>
-      <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-    </refsect2>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <refsect2><title>In deterministic context</title>
-  <para>
-    For deterministic simulations, the <command>shocks</command> block specifies temporary changes in the value of an exogenous variables. For permanent shocks, use an <xref linkend='endval'/> block.
-  </para>
-
-  <para>
-    It is possible to specify shocks which last several periods and which can
-    vary over time. The <command>periods</command> keyword accepts a list of
-    several dates or date ranges, which must be matched by as many shock values
-    in the <command>values</command> keyword. Note that a range in the
-    <command>periods</command> keyword must be matched by only one value in the
-    <command>values</command> keyword: this syntax means that the exogenous
-    will have a constant value over the range.
-  </para>
-
-  <para>
-    Note that shock values are not restricted to numerical constants: arbitrary
-    expressions are also allowed, but you have to enclose them inside
-    parentheses.
-  </para>
-
-  <refsect3><title>Example</title> 
-  <informalexample>
-    <programlisting>
-shocks;
-var e;
-periods 1;
-values 0.5;
-var u;
-periods 4:5;
-values 0;
-var v;
-periods 4:5 6 7:9;
-values 1 1.1 0.9;
-var w;
-periods 1 2;
-values (1+p) (exp(z));
-end;
-    </programlisting>
-  </informalexample>
-  </refsect3>
-  </refsect2>
-
-  <refsect2><title>In stochastic context</title>
-  <para>
-    For stochastic simulations, the <command>shocks</command> block specifies the non zero elements of the covariance matrix of the shocks of exogenous variables.
-  </para>
-  <para>
-    In an estimation context, it is also possible to specify variances and covariances on endogenous variables: in that case, these values are interpreted as the calibration of the measurement errors on these variables.
-  </para>
-
-  <refsect3><title>Example</title> 
-  <informalexample>
-    <programlisting>
-shocks;
-var e = 0.000081;
-var u; stderr 0.009;
-corr e, u = 0.8;
-var v, w = 2;
-end;
-    </programlisting>
-  </informalexample>
-  </refsect3>
-  <refsect3><title>See also</title>
-  <para><xref linkend="Sigma_e"/></para>
-  </refsect3>
-  </refsect2>
-
-  <refsect2><title>Mixing determininistic and stochastic shocks</title>
-  <para>It is possible to mix deterministic and stochastic shocks to build models where agents know from the start of the simulation about future exogenous changes. In that case <xref linkend="stoch_simul"/> will compute the rational expectation solution adding future information to the state space (nothing is shown in the output of <xref linkend="stoch_simul"/>) and <xref linkend="forecast"/> will compute a simulation conditional on initial  conditions and future information.
-  </para>
-
-  <refsect3><title>Example</title>
-  <informalexample>
-    <programlisting>
-varexo_det tau;
-varexo e;
-
-...
-
-shocks;
-var e; stderr 0.01;
-var tau;
-periods 1:9;
-values -0.15;
-end;
-
-stoch_simul(irf=0);
-
-forecast;
-    </programlisting>
-  </informalexample>
-  </refsect3>
-  </refsect2>
-
-  </refsect1>
-</refentry>
-
-<refentry id="mshocks">
-  <refmeta>
-    <refentrytitle>mshocks</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>mshocks</refname>
-    <refpurpose>specifies multiplicative deterministic shocks on exogenous variables</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>mshocks</command><arg choice="plain">;</arg><sbr/>
-      <arg rep="repeat">
-	      <arg choice="plain">var <replaceable>VARIABLE_NAME</replaceable>;</arg>
-	      <arg choice="plain">periods <replaceable>INTEGER</replaceable><arg>:<replaceable>INTEGER</replaceable></arg>
-        <arg rep="repeat"><arg>,</arg> <replaceable>INTEGER</replaceable><arg>:<replaceable>INTEGER</replaceable></arg></arg>;</arg>
-	      <arg choice="plain">values <replaceable>EXPRESSION</replaceable> <arg rep="repeat"><arg>,</arg> <replaceable>EXPRESSION</replaceable></arg>;</arg>
-        </arg><sbr/>
-        <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>The purpose of this command is similar to that of the <xref linkend="shocks"/> for deterministic shocks, except that the numeric values given will be interpreted in a multiplicative way. For example, if a value of <literal>1.05</literal> is given as shock value for some exogenous at some date, it means 5% above its steady state value (as given by the last <xref linkend="initval"/> or <xref linkend="endval"/> block).</para>
-
-  <para>This command is only meaningful in two situations:
-  <itemizedlist>
-    <listitem><para>on exogenous variables with a non-zero steady state, in a deterministic setup,</para></listitem>
-    <listitem><para>on deterministic exogenous variables with a non-zero steady state, in a stochastic setup.</para></listitem>
-  </itemizedlist>
-  </para>
-  </refsect1>
-</refentry>
-
-<refentry id="Sigma_e">
-  <refmeta>
-    <refentrytitle>Sigma_e</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>Sigma_e</refname>
-    <refpurpose>specifies directly the covariance matrix of the stochastic shocks</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>Sigma_e</command>
-      <arg choice="plain">	= [ <replaceable>EXPRESSION</replaceable> <arg rep="repeat"><arg>,</arg> <replaceable>EXPRESSION</replaceable></arg>
-      <arg rep="repeat">; <replaceable>EXPRESSION</replaceable> <arg rep="repeat"><arg>,</arg> <replaceable>EXPRESSION</replaceable></arg></arg> ];</arg>
-    </cmdsynopsis>
-    <warning>
-      <para>The matrix elements are actually written between square brackets (<literal>[]</literal>). Here, the initial <literal>[</literal> and final <literal>]</literal> don't have the meaning of <quote>optional element</quote> as elsewhere.</para>
-    </warning>
-  </refsynopsisdiv>
-
-
-  <refsect1><title>Description</title>
-
-  <para>
-    The matrix of variance-covariance of the shocks can be directly specified as a upper (or lower) triangular matrix. Dynare builds the corresponding symmetrix matrix. Each row of the triangular matrix, except the last one, must be terminated by a semi-colon <literal>;</literal>. For a given element, an arbitrary <replaceable>EXPRESSION</replaceable> is allowed (instead of a simple constant), but in that case you need to enclose the expression in parentheses. <emphasis>The order of the covariances in the matrix is the same as the one used in the <xref linkend="varexo"/> declaration.</emphasis>
-  </para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-varexo u, e;
-...
-Sigma_e = [ 0.81 (phi*0.9*0.009); 0.000081];
-    </programlisting>
-    <para>
-      where the variance of <varname>u</varname> is 0.81, the variance of <varname>e</varname>, 0.000081, and the correlation between <varname>e</varname> and <varname>u</varname> is <varname>phi</varname>.
-    </para>
-  </informalexample>
-  </refsect1>
-</refentry>
-</sect1>
-
-<sect1><title>Other general declarations</title>
-
-<itemizedlist>
-  <listitem><para><xref linkend='dsample'/></para></listitem>
-  <listitem><para><xref linkend='periods'/> (deprecated)</para></listitem>
-</itemizedlist>
-
-<refentry id="dsample">
-  <refmeta>
-    <refentrytitle>dsample</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>dsample</refname>
-    <refpurpose>reduces the number of periods considered in subsequent output commands</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>dsample</command>
-      <arg choice="plain"><replaceable>INTEGER</replaceable></arg>
-      <arg><replaceable>INTEGER</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-</refentry>
-
-<refentry id="periods">
-  <refmeta>
-    <refentrytitle>periods</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>periods</refname>
-    <refpurpose>specifies the number of simulation periods</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>periods</command> <arg choice="plain">
-      <replaceable>INTEGER</replaceable>;
-    </arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    This command is now deprecated (but will still work for older model files). It is not necessary when no simulation is performed and is replaced by an option <option>periods</option> in <xref linkend="simul"/> and <xref linkend="stoch_simul"/>.
-  </para>
-  <para>
-    Sets the number of periods in the simulation. The periods are numbered from <literal>1</literal> to <replaceable>INTEGER</replaceable>. In perfect foresight simulations, it is assumed that all future events are perfectly known at the beginning of period <literal>1</literal>.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-periods 100;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-</sect1>
-
-<sect1><title>Solving and simulating</title>
-<para>
-  Dynare has special commands for the computation of the static equilibrium of the model (<xref linkend='steady'/>), of the eigenvalues of the linearized model (<xref linkend='check'/>) for dynamics local analysis, of a deterministic simulation (<xref linkend='simul'/>) and for solving and/or simulating a stochastic model (<xref linkend='stoch_simul'/>).
-</para>
-<itemizedlist>
-  <listitem><para><xref linkend='steady'/></para></listitem>
-  <listitem><para><xref linkend='homotopy_setup'/></para></listitem>
-  <listitem><para><xref linkend='steady_state_model'/></para></listitem>
-  <listitem><para><xref linkend='check'/></para></listitem>
-  <listitem><para><xref linkend='model_info'/></para></listitem>
-  <listitem><para><xref linkend='print_bytecode_static_model_and_print_bytecode_dynamic_model'/></para></listitem>
-  <listitem><para><xref linkend='simul'/></para></listitem>
-  <listitem><para><xref linkend='stoch_simul'/></para></listitem>
-</itemizedlist>
-
-<refentry id="steady">
-  <refmeta>
-    <refentrytitle>steady</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>steady</refname>
-    <refpurpose>computes the steady state of a model</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>steady</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry id="solve_algo" xreflabel="solve_algo">
-      <term><option>solve_algo</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Determines the non-linear solver to use. Possible values for the option are:
-      <itemizedlist>
-        <listitem><para><literal>0</literal>: uses <literal>fsolve</literal> (under <trademark class="registered">MATLAB</trademark>, only available if you have the Optimization Toolbox; always available under Octave)</para></listitem>
-        <listitem><para><literal>1</literal>: uses Dynare's own nonlinear equation solver</para></listitem>
-        <listitem><para><literal>2</literal>: splits the model into recursive blocks and solves each block in turn</para></listitem>
-        <listitem><para><literal>3</literal>: Chris Sims' solver</para></listitem>
-        <listitem><para><literal>4</literal>: similar to value <literal>2</literal>, except that it deals differently with nearly singular Jacobian</para></listitem>
-        <listitem><para><literal>5</literal>: Newton algorithm with a sparse Gaussian elimination (SPE) (requires <xref linkend="bytecode"/> option)</para></listitem>
-        <listitem><para><literal>6</literal>: Newton algorithm with a sparse LU solver at each iteration (requires <xref linkend="bytecode"/> and/or <xref linkend="block"/> option)</para></listitem>
-        <listitem><para><literal>7</literal>: Newton algorithm with a Generalized Minimal Residual (GMRES) solver at each iteration (requires <xref linkend="bytecode"/> and/or <xref linkend="block"/> option; not available under Octave))</para></listitem>
-        <listitem><para><literal>8</literal>: Newton algorithm with a Stabilized Bi-Conjugate Gradient (BICGSTAB) solver at each iteration (requires <xref linkend="bytecode"/> and/or <xref linkend="block"/> option)</para></listitem>
-      </itemizedlist>
-      Default value is <literal>2</literal>.
-      </para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>homotopy_mode</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Use a homotopy (or divide-and-conquer) technique to solve for the steady state (see <xref linkend="homotopy_setup"/> for a short description of the technique). This option can take three possible values:
-      <itemizedlist>
-        <listitem><para><literal>1</literal>: in this mode, all the parameters are changed simultaneously, and the distance between the boudaries for each parameter is divided in as many intervals as there are steps (as defined by <option>homotopy_steps</option> option); the problem is solves as many times as there are steps</para></listitem>
-        <listitem><para><literal>2</literal>: same as mode <literal>1</literal>, except that only one parameter is changed at a time; the problem is solved as many times as steps times number of parameters</para></listitem>
-        <listitem><para><literal>3</literal>: Dynare tries first the most extreme values. If it fails to compute the steady state, the interval between initial and desired values is divided by two for all parameters. Every time that it is impossible to find a steady state, the previous interval is divided by two. When it succeeds to find a steady state, the previous interval is multiplied by two. In that last case <option>homotopy_steps</option> contains the maximum number of computations attempted before giving up.</para></listitem>
-      </itemizedlist>
-      </para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>homotopy_steps</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Defines the number of steps when performing a homotopy. See <option>homotopy_mode</option> option for more details.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Description</title>
-
-  <para>
-    Computes the equilibrium value of the endogenous variables for the value of the exogenous variables specified in the previous <xref linkend='initval'/> or <xref linkend='endval'/> block.
-  </para>
-  <para>
-    <command>steady</command> uses an iterative procedure and takes as initial guess the value of the endogenous variables set in the previous <xref linkend='initval'/> or <xref linkend='endval'/> block.
-  </para>
-  <para>
-    For complicated models, finding good numerical initial values for the endogenous variables is the trickiest part of finding the equilibrium of that model. Often, it is better to start with a smaller model and add new variables one by one.
-  </para>
-
-  <para>If you know how to compute the steady state for your model, you can provide a <trademark class="registered">MATLAB</trademark>/Octave function doing the computation instead of using <command>steady</command>. The function should be called with the name of the <filename class="extension">.mod</filename> file followed by <filename>_steadystate</filename>. See <filename>fs2000_steadystate.m</filename> in <filename>examples</filename> directory for an example.
-  </para>
-
-  </refsect1>
-
-  <refsect1><title>Output variables</title>
-  <para>
-    The steady state is available in <varname>oo_.steady_state</varname>. Endogenous variables are ordered in order of declaration used in <xref linkend="var"/> command as in <varname>M_.endo_names</varname>.  
-  </para>
-  </refsect1> 
-
-  <refsect1><title>Examples</title>
-  <para>
-    See <xref linkend='initval'/> and <xref linkend='endval'/>.
-  </para>
-  </refsect1>
-</refentry>     
-
-<refentry id="homotopy_setup">
-  <refmeta>
-    <refentrytitle>homotopy_setup</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>homotopy_setup</refname>
-    <refpurpose>declare initial and final values when using homotopy method</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>homotopy_setup</command><arg choice="plain">;</arg><sbr/>
-      <arg choice="plain" rep="repeat"><replaceable>VARIABLE_NAME</replaceable>, <replaceable>EXPRESSION</replaceable><arg>, <replaceable>EXPRESSION</replaceable></arg>;</arg><sbr/>
-      <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>The idea of homotopy (also called divide-and-conquer by some authors) is to subdivide the problem of finding the steady state into smaller problems. It assumes that you know how to compute the steady state for a given set of parameters, and it helps you finding the steady state for another set of parameters, by incrementally moving from one to another set of parameters.</para>
-
-  <para>The purpose of the <command>homotopy_setup</command> block is to declare the final (and possibly also the initial) values for the parameters or exogenous that will be changed during the homotopy. In the first syntax where only one value is specified for a given parameter/exogenous, then this value is interpreted as the final value, and the initial value is taken from the preceeding <xref linkend="initval"/> block. In the second syntax where two values are specified for a given parameter/exogenous, the first is the initial one, the second is the final one.</para>
-
-  <para>A necessary condition for a successful homotopy is that Dynare must be able to solve the steady state for the initial parameters/exogenous without additional help (using the guess values given in the <xref linkend="initval"/> block).</para>
-
-  <para> If the homotopy fails, a possible solution is to increase the number of steps (given in <option>homotopy_steps</option> option of <xref linkend="steady"/>).</para>
-  </refsect1>
-
-  <refsect1><title>Example</title> 
-  <informalexample>
-    <para>In the following example, Dynare will first compute the steady state for the initial values (<literal>gam=0.5</literal> and <literal>x=1</literal>), and then subdivide the problem into 50 smaller problems to find the steady state for the final values (<literal>gam=2</literal> and <literal>x=2</literal>).</para>
-    <programlisting>
-var c k;
-varexo x;
-
-parameters alph gam delt bet aa;
-alph=0.5;
-delt=0.02;
-aa=0.5;
-bet=0.05;
-
-model;
-c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
-c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
-end;
-
-initval;
-x = 1;
-k = ((delt+bet)/(aa*x*alph))^(1/(alph-1));
-c = aa*x*k^alph-delt*k;
-end;
-
-homotopy_setup;
-gam, 0.5, 2;
-x, 2;
-end;
-
-steady(homotopy_mode = 1, homotopy_steps = 50);
-    </programlisting>
-  </informalexample>
-  </refsect1>
-
-</refentry>
-
-<refentry id="steady_state_model">
-  <refmeta>
-    <refentrytitle>steady_state_model</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>steady_state_model</refname>
-    <refpurpose>declares the solution of the static model, when analytically known</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>steady_state_model</command>
-      <arg choice="plain">;</arg>
-      <sbr/>
-      <arg choice="plain" rep="repeat">
-        <group>
-          <arg choice="plain"><replaceable>VARIABLE_NAME</replaceable> = <replaceable>EXPRESSION</replaceable> ;</arg>
-          <arg choice="plain">[ <replaceable>VARIABLE_NAME</replaceable>, <arg choice="plain" rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg> ] = <replaceable>EXPRESSION</replaceable> ;</arg>
-        </group>
-      </arg>
-      <sbr/>
-      <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    When the analytical solution of the model is known, this command can be used to help Dynare find the steady state in a more efficient and reliable way, especially during estimation where the steady state has to be recomputed for every point in the parameter space.
-  </para>
-  <para>
-    Each line of this block consists of a variable (either an endogenous, a temporary variable or a parameter) which is assigned an expression (which can contain parameters, exogenous at the steady state, or any endogenous or temporary variable already declared above).
-  </para>
-  <para>
-    Internally, Dynare will create a steady state file called <filename><replaceable>FILENAME</replaceable>_steadystate.m</filename>, using the information provided in this block.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-var m P c e W R k d n l gy_obs gp_obs y dA;
-varexo e_a e_m;
-
-parameters alp bet gam mst rho psi del;
-
-...
-// parameter calibration, (dynamic) model declaration, shock calibration...
-...
-
-steady_state_model;
-  dA = exp(gam);
-  gst = 1/dA; // A temporary variable
-  m = mst;
-  
-  // Three other temporary variables
-  khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
-  xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
-  nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
-
-  n  = xist/(nust+xist);
-  P  = xist + nust;
-  k  = khst*n;
-
-  l  = psi*mst*n/( (1-psi)*(1-n) );
-  c  = mst/P;
-  d  = l - mst + 1;
-  y  = k^alp*n^(1-alp)*gst^alp;
-  R  = mst/bet;
-
-  // You can use MATLAB functions which return several arguments
-  [W, e] = my_function(l, n);
-  
-  gp_obs = m/dA;
-  gy_obs = dA;
-end;
-
-steady;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="check">
-  <refmeta>
-    <refentrytitle>check</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>check</refname>
-    <refpurpose>computes the eigenvalues of the (linearized) model</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>check</command>
-      <arg>(<option>solve_algo</option> = <replaceable>INTEGER</replaceable>)</arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>solve_algo</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>See <link linkend="solve_algo">there</link> for the possible values and their meaning</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Description</title>
-  <para>
-    Computes the eigenvalues of the model linearized around the values specified by the last <xref linkend='initval'/>, <xref linkend='endval'/> or <xref linkend='steady'/> statement. Generally, the eigenvalues are only meaningful if the linearization is done around a steady state of the model. It is a device for local analysis in the neighborhood of this steady state.
-  </para>
-  <para>
-    A necessary condition for the uniqueness of a stable equilibrium in the neighborhood of the steady state is that there are as many eigenvalues larger than one in modulus as there are forward looking variables in the system. An additional rank condition requires that the square submatrix of the right Schur vectors corresponding to the forward looking variables (jumpers) and to the explosive eigenvalues must have full rank.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Output variables</title>
-  <para>
-    <command>check</command> returns the eigenvalues in the global variable <varname>oo_.dr.eigval</varname>.
-  </para>
-  </refsect1>
-</refentry>
-
-<refentry id="model_info">
-  <refmeta>
-    <refentrytitle>model_info</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>model_info</refname>
-    <refpurpose>Display the block structure of the model</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>model_info</command>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>The <command>model_info</command> command provides information about:
-  <itemizedlist>
-    <listitem><para>the normalization of the model: an endogenous variable is attributed to each equation of the model;</para></listitem>
-    <listitem><para>the block structure of the model: for each block model_info indicates its type, the equations number and endogenous variables belonging to this block.</para></listitem>
-  </itemizedlist>
-  </para>
-
-  <para>There are five different types of blocks depending on the simulation method used:
-  <itemizedlist>
-    <listitem><para>EVALUATE FORWARD: in this case the block contains only equations where endogenous variable attributed to the equation appears currently on the left hand side and where no forward looking endogenous variables appear. y<subscript>j,t</subscript> = f<subscript>j</subscript>(y<subscript>t</subscript>, y<subscript>t-1</subscript>, ..., y<subscript>t-k</subscript>)</para></listitem>
-    <listitem><para>EVALUATE BACKWARD: the block contains only equations where endogenous variable attributed to the equation appears currently on the left hand side and where no backward looking endogenous variables appear. y<subscript>j,t</subscript> = f<subscript>j</subscript>(y<subscript>t</subscript>, y<subscript>t+1</subscript>, ..., y<subscript>t+k</subscript>)</para></listitem>
-    <listitem><para>SOLVE FORWARD <replaceable>x</replaceable>: the block contains only equations where endogenous variable attributed to the equation does not appear currently on the left hand side and where no forward looking endogenous variables appear. g<subscript>j</subscript>(y<subscript>j,t</subscript>, y<subscript>t</subscript>, y<subscript>t-1</subscript>, ..., y<subscript>t-k</subscript>) =0. <replaceable>x</replaceable> is equal to SIMPLE if the block has only one equation. If several equation appears in the block, <replaceable>x</replaceable> is equal to COMPLETE.</para></listitem>
-    <listitem><para>SOLVE FORWARD <replaceable>x</replaceable>: the block contains only equations where endogenous variable attributed to the equation does not appear currently on the left hand side and where no backward looking endogenous variables appear. g<subscript>j</subscript>(y<subscript>j,t</subscript>, y<subscript>t</subscript>, y<subscript>t+1</subscript>, ..., y<subscript>t+k</subscript>) =0. <replaceable>x</replaceable> is equal to SIMPLE if the block has only one equation. If several equation appears in the block, <replaceable>x</replaceable> is equal to COMPLETE.</para></listitem>
-    <listitem><para>SOLVE TWO BOUNDARIES <replaceable>x</replaceable>: the block contains equations depending on both forward and backward variables. g<subscript>j</subscript>(y<subscript>j,t</subscript>, y<subscript>t</subscript>, y<subscript>t-1</subscript>, ..., y<subscript>t-k</subscript> ,y<subscript>t</subscript>, y<subscript>t+1</subscript>, ..., y<subscript>t+k</subscript>) =0. <replaceable>x</replaceable> is equal to SIMPLE if the block has only one equation. If several equation appears in the block, <replaceable>x</replaceable> is equal to COMPLETE.</para></listitem>
-  </itemizedlist>
-  </para>
-  </refsect1>
-</refentry>
-
-<refentry id="print_bytecode_static_model_and_print_bytecode_dynamic_model">
-  <refmeta>
-    <refentrytitle>print_bytecode_static_model and print_bytecode_dynamic_model</refentrytitle>
-  </refmeta>
-  
-  <refnamediv>
-    <refname>print_bytecode_static_model and print_bytecode_dynamic_model</refname>
-    <refpurpose>Display the static and the dynamic model stored in te bytecode binary format file.</refpurpose>
-  </refnamediv>
-  
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>print_bytecode_static_model</command>
-      <arg choice="plain">;</arg><arg choice="plain"> and </arg>
-      <command>print_bytecode_dynamic_model</command>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-  
-  <refsect1><title>Description</title>
-  <para>The <command>print_bytecode_static_model</command> command print the equations and the Jacobian matrix of the static model stored in the bytecode binary format file. The <command>print_bytecode_dynamic_model</command> command do the same for a dnamic model.
-  </para>
-  </refsect1>
-</refentry>
-
-<refentry id="simul">
-  <refmeta>
-    <refentrytitle>simul</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>simul</refname>
-    <refpurpose>simulates a deterministic model</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>simul</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    Triggers the computation of a deterministic simulation of the model for the number of periods set in the option <option>periods</option>. <command>simul</command> uses a 
-  </para>
-  </refsect1>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>periods</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of periods of the simulation</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>stack_solve_algo</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Algorithm used for computing the solution. Possible values are:
-      <itemizedlist>
-        <listitem><para><literal>0</literal>: Newton method to solve simultaneously all the equations for every period, see <xref linkend="juillard_1996"/> (Default)</para></listitem>
-        <listitem><para><literal>1</literal>: use a Newton algorithm with a sparse LU solver at each iteration (requires <xref linkend="bytecode"/> and/or <xref linkend="block"/> option)</para></listitem>
-        <listitem><para><literal>2</literal>: use a Newton algorithm with a Generalized Minimal Residual (GMRES) solver at each iteration (requires <xref linkend="bytecode"/> and/or <xref linkend="block"/> option; not available under Octave)</para></listitem>
-        <listitem><para><literal>3</literal>: use a Newton algorithm with a Stabilized Bi-Conjugate Gradient (BICGSTAB) solver at each iteration (requires <xref linkend="bytecode"/> and/or <xref linkend="block"/> option) </para></listitem>
-        <listitem><para><literal>4</literal>: use a Newton algorithm with a optimal path length at each iteration (requires <xref linkend="bytecode"/> and/or <xref linkend="block"/> option)</para></listitem>
-        <listitem><para><literal>5</literal>: use a Newton algorithm with a sparse Gaussian elimination (SPE) solver at each iteration (requires <xref linkend="bytecode"/> option)</para></listitem>
-      </itemizedlist>
-      </para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>markowitz</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>Value of the Markowitz criterion, used to select the pivot. Only used when <option>stack_solve_algo</option> = 5. Default: <literal>0.5</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>minimal_solving_periods</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Specify the minimal number of periods where the model has to be solved, before using a constant set of operations for the remaining periods. Only used when <option>stack_solve_algo</option> = 5. Default: <literal>1</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>datafile</option> = <replaceable>FILENAME</replaceable></term>
-      <listitem><para>If the variables of the model are not constant over time, their initial values, stored in a text file, could be loaded, using that option, as initial values before a deteministic simulation.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Output variables</title>
-  <para>
-    The simulated endogenous variables are available in global matrix <varname>oo_.endo_simul</varname>. The variables are arranged row by row, in order of declaration (as in <varname>M_.endo_names</varname>). Note that this variable also contains initial and terminal conditions, so it has more columns than the value of <option>periods</option> option.
-  </para>
-  </refsect1>
-</refentry>
-
-
-<refentry id="stoch_simul">
-  <refmeta>
-    <refentrytitle>stoch_simul</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>stoch_simul</refname>
-    <refpurpose>computes the solution and simulates the model</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>stoch_simul</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><anchor id="ar" xreflabel="ar"/><option>ar</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Order of autocorrelation coefficients to compute and to print. Default: <literal>5</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>drop</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of points dropped at the beginning of simulation before computing the summary statistics. Default: <literal>100</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>hp_filter</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Uses HP filter with &lambda; = <replaceable>INTEGER</replaceable> before computing moments. Default: no filter</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>hp_ngrid</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of points in the grid for the discrete Inverse Fast Fourier Transform used in the HP filter computation. It may be necessary to increase it for highly autocorrelated processes. Default: <literal>512</literal></para></listitem>
-    </varlistentry>
-    <varlistentry id="irf" xreflabel="irf">
-      <term><option>irf</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of periods on which to compute the IRFs. Setting <option>irf</option>=0, suppresses the plotting of IRF's. Default: <literal>40</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>relative_irf</option></term>
-      <listitem><para>Requests the computation of normalized IRFs in percentage of the standard error of each shock</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>linear</option></term>
-      <listitem><para>Indicates that the original model is linear (put it rather in the <xref linkend="model"/> command)</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>nocorr</option></term>
-      <listitem><para>Don't print the correlation matrix (printing them is the default)</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>nofunctions</option></term>
-      <listitem><para>Don't print the coefficients of the approximated solution (printing them is the default)</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>nomoments</option></term>
-      <listitem><para>Don't print moments of the endogenous variables (printing them is the default)</para></listitem>
-    </varlistentry>
-    <varlistentry id="nograph" xreflabel="nograph">
-      <term><option>nograph</option></term>
-      <listitem><para>Doesn't do the graphs. Useful for loops</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>noprint</option></term>
-      <listitem><para>Don't print anything. Useful for loops</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>print</option></term>
-      <listitem><para>Print results (opposite of the above)</para></listitem>
-    </varlistentry>
-    <varlistentry id="order" xreflabel="order">
-      <term><option>order = <replaceable>INTEGER</replaceable></option></term>
-      <listitem><para>Order of Taylor approximation. Acceptable values are <literal>1</literal>, <literal>2</literal> and <literal>3</literal>. Note that for third order, <link linkend="k_order_solver"><option>k_order_solver</option></link> option is implied and only empirical moments are available (you must provide a value for <option>periods</option> option). Default: <literal>2</literal></para></listitem>
-    </varlistentry>
-    <varlistentry id="k_order_solver">
-      <term><option>k_order_solver</option></term>
-      <listitem><para>Use a k-order solver (implemented in C++) instead of the default Dynare solver. This option is not yet compatible with the <xref linkend="bytecode"/> option. Default: disabled for order 1 and 2, enabled otherwise</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>periods</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>If different from zero, empirical moments will be computed instead of theoretical moments. The value of the option specifies the number of periods to use in the simulations. Values of the <xref linkend='initval'/> block, possibly recomputed by <xref linkend='steady'/>, will be used as starting point for the simulation. The simulated endogenous variables are made available to the user in a vector for each variable and in the global matrix <varname>oo_.endo_simul</varname>. The variables in the <varname>oo_.endo_simul</varname> matrix, in their order of declaration (as in <varname>M_.endo_names</varname>) Default: <literal>0</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>qz_criterium</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>Value used to split stable from unstable eigenvalues in reordering the Generalized Schur decomposition used for solving 1<superscript>st</superscript> order problems. Default: <literal>1.000001</literal> (except when estimating with <xref linkend="lik_init"/> equal to <literal>1</literal>: the default is <literal>0.999999</literal> in that case)</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>replic</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of simulated series used to compute the IRFs. Default: <literal>1</literal> if <option>order</option>=<literal>1</literal>, and <literal>50</literal> otherwise</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>simul_algo</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Obsolete. Use only the default = 0</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>solve_algo</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>See <link linkend="solve_algo">there</link> for the possible values and their meaning</para></listitem>
-    </varlistentry>
-    <varlistentry id="aim_solver">
-      <term><option>aim_solver</option></term>
-      <listitem><para>Use the Anderson-Moore Algorithm (AIM) to compute the decision rules, instead of using Dynare's default method based on a generalized Schur decomposition. This option is only valid for first order approximation. See <ulink url="http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">AIM website</ulink> for more details on the algorithm.</para>
-      </listitem>
-    </varlistentry>
-    <varlistentry id="conditional_variance_decomposition">
-      <term><option>conditional_variance_decomposition</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>See below</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>conditional_variance_decomposition</option> = [<replaceable>INTEGER1</replaceable>:<replaceable>INTEGER2</replaceable>]</term>
-      <listitem><para>See below</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>conditional_variance_decomposition</option> = [<replaceable>INTEGER1</replaceable> <replaceable>INTEGER2</replaceable> ...]</term>
-      <listitem><para>Computes a conditional variance decomposition for the specified period(s). Conditional variances are given by var(y<subscript>t+k</subscript>|t). For period 1, the conditional variance decomposition provides the decomposition of the effects of shocks upon impact.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>pruning</option></term>
-      <listitem><para>Discard higher order terms when iteratively computing simulations of the solution, as in <xref linkend="kim-kim-schaumburg-sims_2008"/>.</para></listitem>
-    </varlistentry>
-    <varlistentry id="partial_information">
-      <term><option>partial_information</option></term>
-      <listitem><para>Computes the solution of the model under partial information, along the lines of <xref linkend="pearlman-currie-levine_1986"/>. Agents are supposed to observe only some variables of the economy. The set of observed variables is declared using the <xref linkend="varobs"/> statement. Note that if <xref linkend="varobs"/> is not present or contains all endogenous variables, then this is the full information case and this option has no effect.</para></listitem>
-    </varlistentry>
-  </variablelist>
-
-</refsect1>
-<refsect1><title>Description</title>
-<para>
-  <command>stoch_simul</command> computes a Taylor approximation of the decision and transition functions for the model, impulse response functions and various descriptive statistics (moments, variance decomposition, correlation and autocorrelation coefficients). For correlated shocks, the variance decomposition is computed as in the VAR literature through a Cholesky decomposition of the covariance matrix of the exogenous variables. When the shocks are correlated, the variance decomposition depends upon the order of the variables in the <xref linkend='varexo'/> command.
-</para>
-
-<para>The Taylor approximation is computed around the steady state. If you know how to compute the steady state for your model, you can provide a <trademark class="registered">MATLAB</trademark>/Octave function doing the computation instead of using the nonlinear solver. The function should be called with the name of the <filename class="extension">.mod</filename> file followed by <filename>_steadystate</filename>. See <filename>fs2000_steadystate.m</filename> in <filename>examples</filename> directory for an example.
-</para>
-
-<para>The IRFs are computed as the difference between the trajectory of a variable following a shock at the beginning of period 1 and its steady state value.
-</para>
-
-<para>
-  Variance decomposition, correlation, autocorrelation are only displayed for variables with positive variance. Impulse response functions are only plotted for variables with response larger than 10<superscript>-10</superscript>.
-</para>
-<para>
-  Variance decomposition is computed relative to the sum of the contribution of each shock. Normally, this is of course equal to aggregate variance, but if a model generates very large variances, it may happen that, due to numerical error, the two differ by a significant amount. Dynare issues a warning if the maximum relative difference between the sum of the contribution of each shock and aggregate variance is larger than 0.01 %.
-</para>
-<para>
-  Currently, the IRFs are only plotted for 12 variables. Select the ones you want to see, if your model contains more than 12 endogenous variables.
-</para>
-<para>
-  The covariance matrix of the shocks is specified either with the <xref linkend='shocks'/> command or with the <xref linkend='Sigma_e'/> command.
-</para>
-<para>
-  When a list of <replaceable>VARIABLE_NAME</replaceable> is specified, results are displayed only for these variables.
-</para>
-</refsect1>
-
-<refsect1 id="aux_vars">
-  <title>Auxiliary variables for leads and lags</title>
-  <para>Dynare will perform a transformation of the model so that there is only one lead and one lag on endogenous, and, in the case of a stochastic model, no lead/lag on exogenous.</para>
-  <para>This transformation is achieved by the creation of auxiliary variables, and corresponding equations. For example, if <literal>x(+2)</literal> exists in the model, Dynare will create one auxiliary variable <literal>AUX_ENDO_LEAD = x(+1)</literal>, and replace <literal>x(+2)</literal> by <literal>AUX_ENDO_LEAD(+1)</literal>.</para>
-  <para>A similar transformation is done for lags greater than 2 on endogenous (auxiliary variables will have a name beginning with <literal>AUX_ENDO_LAG</literal>), and for exogenous with leads and lags (auxiliary variables will have a name beginning with <literal>AUX_EXO_LEAG</literal> or <literal>AUX_EXO_LAG</literal> respectively).</para>
-  <para>Once created, all auxiliary variables are included in the set of endogenous variables. The output of decision rules (see below) is such that auxiliary variable names are replaced by the original variables they refer to.</para>
-  <para>The number of endogenous variables before the creation of auxiliary variables is stored in <varname>M_.orig_endo_nbr</varname>, and the number of endogenous variables after the creation of auxiliary variables is stored in <varname>M_.endo_nbr</varname>.</para>
-</refsect1>
-
-<refsect1><title>Decision rules</title>
-<para>
-  The approximated solution of a model takes the form of a set of decision
-  rules or transition equations expressing the current value of the endogenous
-  variables of the model as function of the previous state of the model and
-  shocks oberved at the beginning of the period. The decision rules are stored
-  in the structure <varname>oo_.dr</varname> which is described below.
-</para>
-
-<refsect2><title>Typology and ordering of variables</title>
-<para>
-  Dynare distinguishes four types of endogenous variables:
-</para>
-<variablelist>
-  <varlistentry>
-    <term>Purely backward (or purely predetermined) variables</term>
-    <listitem>
-      <para>
-        Those that appear only at current and past period in the model, but not
-        at future period (<foreignphrase>i.e.</foreignphrase> at
-        <literal>t</literal> and <literal>t-1</literal> but not
-        <literal>t+1</literal>). The number of such variables is equal to
-        <varname>oo_.dr.npred - oo_.dr.nboth</varname>.
-      </para>
-    </listitem>
-  </varlistentry>
-  <varlistentry>
-    <term>Purely forward variables</term>
-    <listitem>
-      <para>
-        Those that appear only at current and future period in the model, but
-        not at past period (<foreignphrase>i.e.</foreignphrase> at
-        <literal>t</literal> and <literal>t+1</literal> but not
-        <literal>t-1</literal>). The number of such variables is stored in
-        <varname>oo_.dr.nfwrd</varname>.
-      </para>
-    </listitem>
-  </varlistentry>
-  <varlistentry>
-    <term>Mixed variables</term>
-    <listitem>
-      <para>
-        Those that appear at current, past and future period in the model
-        (<foreignphrase>i.e.</foreignphrase> at <literal>t</literal>,
-        <literal>t+1</literal> and <literal>t-1</literal>). The number of such
-        variables is stored in <varname>oo_.dr.nboth</varname>.
-      </para>
-    </listitem>
-  </varlistentry>
-  <varlistentry>
-    <term>Static variables</term>
-    <listitem>
-      <para>
-        Those that appear only at current, not past and future period in the
-        model (<foreignphrase>i.e.</foreignphrase> only at
-        <literal>t</literal>, not at <literal>t+1</literal> or
-        <literal>t-1</literal>). The number of such variables is stored in
-        <varname>oo_.dr.nstatic</varname>.
-      </para>
-    </listitem>
-  </varlistentry>
-</variablelist>
-
-<para>
-  Note that all endogenous variables fall into one of these four categories,
-  since after the creation of <link linkend="aux_vars">auxiliary
-  variables</link>, all endogenous have at most one lead and one lag. We
-  therefore have the following identity: <varname>oo_.dr.npred + oo_.dr.nfwrd +
-  oo_.dr.nstatic = M_.endo_nbr</varname>.
-</para>
-
-<para>
-  Internally, Dynare uses two orderings of the endogenous variables: the order
-  of declaration (which is reflected in <varname>M_.endo_names</varname>), and
-  an order based on the four types described above, which we will call the
-  DR-order ("DR" stands for decision rules). Most of the time, the declaration
-  order is used, but for elements of the decision rules, the DR-order is used.
-</para>
-<para>
-  The DR-order is the following: static variables appear first, then purely
-  backward variables, then mixed variables, and finally purely forward
-  variables. Inside each category, variables are arranged according to the
-  declaration order.
-</para>
-<para>
-  Variable <varname>oo_.dr.order_var</varname> maps DR-order to declaration
-  order, and variable <varname>oo_.dr.inv_order_var</varname> contains the
-  inverse map. In other words, the k-th variable in the DR-order corresponds
-  to the endogenous variable numbered <varname>oo_.dr_order_var(k)</varname> in
-  declaration order. Conversely, k-th declared variable is numbered
-  <varname>oo_.dr.inv_order_var(k)</varname> in DR-order.
-</para>
-<para>
-  Finally, the state variables of the model are the purely backward variables
-  and the mixed variables. They are orderer in DR-order when they appear in
-  decision rules elements. There are <varname>oo_.dr.npred</varname> such
-  variables.
-</para>
-
-</refsect2>
-
-<refsect2><title>First order approximation</title>
-
-<para>
-  The approximation has the form:
-</para>
-<blockquote>
-  <para>
-    y<subscript>t</subscript> = ys + A yh<subscript>t-1</subscript> + B
-    u<subscript>t</subscript>
-  </para>
-</blockquote>
-<para>
-  where ys is the steady state value of y and
-  yh<subscript>t</subscript>=y<subscript>t</subscript>-ys.
-</para>
-
-<para>
-  The coefficients of the decision rules are stored as follows:
-  <itemizedlist>
-    <listitem>
-      <para>
-        ys is stored in <varname>oo_.dr.ys</varname>. The vector rows
-        correspond to all endogenous in the declaration order.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        A is stored in <varname>oo_.dr.ghx</varname>. The matrix rows
-        correspond to all endogenous in DR-order. The matrix columns correspond
-        to state variables in DR-order.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        B is stored <varname>oo_.dr.ghu</varname>. The matrix rows correspond
-        to all endogenous in DR-order. The matrix columns correspond to
-        exogenous variables in declaration order.
-      </para>
-    </listitem>
-  </itemizedlist>
-</para>
-
-</refsect2>
-
-<refsect2><title>Second order approximation</title>
-
-<para>
-  The approximation has the form:
-</para>
-<blockquote>
-  <para>
-    y<subscript>t</subscript> = ys + 0.5 &Delta;<superscript>2</superscript> +
-    A yh<subscript>t-1</subscript> + B u<subscript>t</subscript> + 0.5 C
-    (yh<subscript>t-1</subscript>&otimes;yh<subscript>t-1</subscript>) + 0.5 D
-    (u<subscript>t</subscript>&otimes;u<subscript>t</subscript>) + E
-    (yh<subscript>t-1</subscript>&otimes;u<subscript>t</subscript>)
-  </para>
-</blockquote>
-<para>
-  where ys is the steady state value of y,
-  yh<subscript>t</subscript>=y<subscript>t</subscript>-ys, and
-  &Delta;<superscript>2</superscript> is the shift effect of the variance of
-  future shocks.
-</para>
-
-<para>
-  The coefficients of the decision rules are stored in the variables described
-  for first order approximation, plus the following variables:
-  <itemizedlist>
-    <listitem>
-      <para>
-        &Delta;<superscript>2</superscript> is stored in
-        <varname>oo_.dr.ghs2</varname>. The vector rows correspond to all
-        endogenous in DR-order.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        C is stored in <varname>oo_.dr.ghxx</varname>. The matrix rows
-        correspond to all endogenous in DR-order. The matrix columns correspond
-        to the Kronecker product of the vector of state variables in DR-order.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        D is stored in <varname>oo_.dr.ghuu</varname>. The matrix rows
-        correspond to all endogenous in DR-order. The matrix columns correspond
-        to the Kronecker product of exogenous variables in declaration order.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        E is stored in <varname>oo_.dr.ghxu</varname>. The matrix rows
-        correspond to all endogenous in DR-order. The matrix columns correspond
-        to the Kronecker product of the vector of state variables (in DR-order)
-        by the vector of exogenous variables (in declaration order).
-      </para>
-    </listitem>
-  </itemizedlist>
-</para>
-
-</refsect2>
-
-<refsect2><title>Third order approximation</title>
-
-<para>
-  The approximation has the form:
-</para>
-<blockquote>
-  <para>
-    y<subscript>t</subscript> = ys + G<subscript>0</subscript> +
-    G<subscript>1</subscript> z<subscript>t</subscript> +
-    G<subscript>2</subscript> (z<subscript>t</subscript>&otimes;
-    z<subscript>t</subscript>) + G<subscript>3</subscript>
-    (z<subscript>t</subscript>&otimes; z<subscript>t</subscript> &otimes;
-    z<subscript>t</subscript>)
-  </para>
-</blockquote>
-<para>
-  where ys is the steady state value of y, and z<subscript>t</subscript> is a
-  vector consisting of the deviation from the steady state of the state
-  variables (in DR-order) at date t-1 followed by the exogenous variables at
-  date t (in declaration order). The vector z<subscript>t</subscript> is
-  therefore of size n<subscript>z</subscript> = <varname>oo_.dr.npred +
-  M_.exo_nbr</varname>.
-</para>
-
-<para>
-  The coefficients of the decision rules are stored as follows:
-  <itemizedlist>
-    <listitem>
-      <para>
-        ys is stored in <varname>oo_.dr.ys</varname>. The vector rows
-        correspond to all endogenous in the declaration order.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        G<subscript>0</subscript> is stored in <varname>oo_.dr.g_0</varname>. The
-        vector rows correspond to all endogenous in DR-order.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        G<subscript>1</subscript> is stored in <varname>oo_.dr.g_1</varname>. The
-        matrix rows correspond to all endogenous in DR-order. The matrix
-        columns correspond to state variables in DR-order, followed by
-        exogenous in declaration order.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        G<subscript>2</subscript> is stored in
-        <varname>oo_.dr.g_2</varname>. The matrix rows correspond to all
-        endogenous in DR-order. The matrix columns correspond to the Kronecker
-        product of state variables (in DR-order), followed by exogenous (in
-        declaration order). Note that the Kronecker product is stored in a
-        folded way, <foreignphrase>i.e.</foreignphrase> symmetric elements are
-        stored only once, which implies that the matrix has
-        n<subscript>z</subscript>(n<subscript>z</subscript>+1)/2 columns.  More
-        precisely, each column of this matrix corresponds to a pair
-        (i<subscript>1</subscript>, i<subscript>2</subscript>) where each index
-        represents an element of z<subscript>t</subscript> and is therefore
-        between 1 and n<subscript>z</subscript>. Only non-decreasing pairs are
-        stored, <foreignphrase>i.e.</foreignphrase> those for which
-        i<subscript>1</subscript> &le; i<subscript>2</subscript>. The columns
-        are arranged in the lexicographical order of non-decreasing pairs. Also
-        note that for those pairs where i<subscript>1</subscript> &ne;
-        i<subscript>2</subscript>, since the element is stored only once but
-        appears two times in the unfolded G<subscript>2</subscript> matrix, it
-        must be multiplied by 2 when computing the decision rules.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-        G<subscript>3</subscript> is stored in
-        <varname>oo_.dr.g_3</varname>. The matrix rows correspond to all
-        endogenous in DR-order. The matrix columns correspond to the third
-        Kronecker power of state variables (in DR-order), followed by exogenous
-        (in declaration order). Note that the third Kronecker power is stored
-        in a folded way, <foreignphrase>i.e.</foreignphrase> symmetric elements
-        are stored only once, which implies that the matrix has
-        n<subscript>z</subscript>(n<subscript>z</subscript>+1)(n<subscript>z</subscript>+2)/6
-        columns.  More precisely, each column of this matrix corresponds to a
-        tuple (i<subscript>1</subscript>, i<subscript>2</subscript>,
-        i<subscript>3</subscript>) where each index represents an element of
-        z<subscript>t</subscript> and is therefore between 1 and
-        n<subscript>z</subscript>. Only non-decreasing tuples are stored,
-        <foreignphrase>i.e.</foreignphrase> those for which
-        i<subscript>1</subscript> &le; i<subscript>2</subscript> &le;
-        i<subscript>3</subscript>. The columns are arranged in the
-        lexicographical order of non-decreasing tuples. Also note that for
-        tuples that have three distinct indices
-        (<foreignphrase>i.e.</foreignphrase> i<subscript>1</subscript> &ne;
-        i<subscript>2</subscript> and i<subscript>1</subscript> &ne;
-        i<subscript>3</subscript> and i<subscript>2</subscript> &ne;
-        i<subscript>3</subscript>), since these elements are stored only once
-        but appears six times in the unfolded G<subscript>3</subscript> matrix,
-        they must be multiplied by 6 when computing the decision
-        rules. Similarly, for those tuples that have two equal indices
-        (<foreignphrase>i.e.</foreignphrase> of the form (a,a,b) or (a,b,a) or
-        (b,a,a)), since these elements are stored only once but appears three
-        times in the unfolded G<subscript>3</subscript> matrix, they must be
-        multiplied by 3 when computing the decision rules.
-      </para>
-    </listitem>
-  </itemizedlist>
-</para>
-</refsect2>
-
-</refsect1>
-
-<refsect1><title>Other output variables</title>
-<para>
-  <command>stoch_simul</command> sets other fields in global variable <varname>oo_</varname>. The descriptive statistics are theoretical moments when no simulation is requested and otherwise represent the moments of the simulated variables. 
-  <itemizedlist>
-    <listitem><para>The mean of the endogenous variables is available in the vector <varname>oo_.mean</varname>. The variables are arranged in declaration order.
-    </para></listitem>
-    <listitem><para>The matrix of variance-covariance of the endogenous variables in the matrix <varname>oo_.var</varname>. The variables are arranged in declaration order.</para></listitem>
-    <listitem><para>The matrix of autocorrelation of the endogenous variables are made available in cell array <varname>oo_.autocorr</varname>. The element number of the matrix in the cell array corresponds to the order of autocorrelation. The option <option>ar</option> specifies the number of autocorrelation matrices available.
-    </para></listitem>
-    <listitem>
-      <para>
-        Simulated variables, when they have been computed, are available in
-        <trademark class="registered">MATLAB</trademark>/Octave vectors in the
-        global workspace with the same name as the endogenous variables. They
-        are also available in the <varname>oo_.endo_simul</varname> matrix. The
-        series are arranged by row, in declaration order of the variable
-        names.
-      </para>
-    </listitem>
-    <listitem>
-      <para>
-      Impulse responses, when they have been computed, are available in <varname>oo_.irfs</varname>, with the following naming convention: <varname><replaceable>VARIABLE_NAME</replaceable>_<replaceable>SHOCK_NAME</replaceable></varname>.</para>
-
-      <para>
-        (DEPRECATED) They are currently also available in <trademark
-        class="registered">MATLAB</trademark>/Octave vectors in the global
-        workspace, however they will disappear there in a future version.
-      </para>
-      <informalexample>
-        <para>Example:
-        <varname>oo_.irfs.gnp_ea</varname> contains the effect on <varname>gnp</varname> of a one standard deviation shock on <varname>ea</varname>.
-        </para>
-      </informalexample>
-    </listitem>
-  </itemizedlist>
-</para>
-</refsect1>
-
-<refsect1><title>Examples</title>
-<refsect2><title>Example 1</title>
-<informalexample>
-  <programlisting>
-shocks;
-var e;
-stderr 0.0348;
-end;
-
-stoch_simul;
-  </programlisting>
-  <para>
-    Performs the simulation of the 2<superscript>nd</superscript> order approximation of a model with a single stochastic shock <varname>e</varname>, with a standard error of 0.0348.
-  </para>
-</informalexample>
-</refsect2>
-
-<refsect2><title>Example 2</title>
-
-<informalexample>
-  <programlisting>
-stoch_simul(linear,irf=60) y k;
-  </programlisting>
-  <para>
-    Performs the simulation of a linear model and displays impulse response functions on 60 periods for variables <varname>y</varname> and <varname>k</varname>.
-  </para>
-</informalexample>
-</refsect2>
-</refsect1>
-</refentry>
-</sect1>
-
-<sect1><title>Estimation</title>
-<para>
-  Provided that you have observations on some endogenous variables, it is possible to use Dynare to estimate some or all parameters. Both maximum likelihood and Bayesian techniques are available.
-</para>
-
-<para>
-  Note that in order to avoid stochastic singularity, you must have at least as many shocks or measurement errors in your model as you have observed variables. 
-</para>
-<itemizedlist>
-  <listitem><para><xref linkend='varobs'/></para></listitem>
-  <listitem><para><xref linkend='observation_trends'/></para></listitem>
-  <listitem><para><xref linkend='estimated_params'/></para></listitem>
-  <listitem><para><xref linkend='estimated_params_init'/></para></listitem>
-  <listitem><para><xref linkend='estimated_params_bounds'/></para></listitem>
-  <listitem><para><xref linkend='estimation'/></para></listitem>
-  <listitem><para><xref linkend='model_comparison'/></para></listitem>
-  <listitem><para><xref linkend='shock_decomposition'/></para></listitem>
-  <listitem><para><xref linkend='unit_root_vars'/></para></listitem>
-</itemizedlist>
-
-<refentry id="varobs">
-  <refmeta>
-    <refentrytitle>varobs</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>varobs</refname>
-    <refpurpose>lists the observed variables</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>varobs</command>
-      <arg choice="plain" rep="repeat">
-	      <replaceable>VARIABLE_NAME</replaceable>
-      </arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    <command>varobs</command> lists the name of observed endogenous variables for the estimation procedure. These variables must be available in the data file (see <xref linkend='estimation'/>).
-  </para>
-  <para>
-    Alternatively, this command is also used in conjunction with the <xref linkend="partial_information"/> option of <xref linkend="stoch_simul"/>, for declaring the set of observed variables when solving the model under partial information.
-  </para>
-  <para>
-    Only one instance of <command>varobs</command> is allowed in a model file. If one needs to declare observed variables in a loop, the macroprocessor can be used as shown in the second example below.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Examples</title>
-  <refsect2><title>Simple example</title>
-  <informalexample>
-    <programlisting>
-varobs C y rr;
-    </programlisting>
-  </informalexample>
-  </refsect2>
-  <refsect2><title>In a loop</title>
-  <informalexample>
-    <programlisting>
-varobs
-@#for co in countries
-  GDP_@{co}
-@#endfor
-;
-    </programlisting>
-  </informalexample>
-  </refsect2>
-  </refsect1>
-
-</refentry>
-
-<refentry id="observation_trends">
-  <refmeta>
-    <refentrytitle>observation_trends</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>observation_trends</refname>
-    <refpurpose>specifies linear trends for observed variables</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>observation_trends</command><arg choice="plain">;</arg><sbr/>
-      <arg choice="plain" rep="repeat">
-	      <replaceable>VARIABLE_NAME</replaceable>(<replaceable>EXPRESSION</replaceable>);
-        </arg><sbr/>
-        <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    <command>observation_trends</command> specifies trends for observed variables as functions of model parameters. In most cases, variables shouldn't be centered when <command>observation_trends</command> is used. 
-  </para>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-observation_trends;
-Y (eta);
-P (mu/eta);
-end;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-
-</refentry>
-
-<refentry id="estimated_params">
-  <refmeta>
-    <refentrytitle>estimated_params</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>estimated_params</refname>
-    <refpurpose>specifies the estimated parameters and their prior</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <refsect2><title>Syntax I (Maximum likelihood estimation)</title>
-    <cmdsynopsis>
-      <command>estimated_params</command><arg choice="plain">;</arg><sbr/>
-      <arg choice="plain" rep="repeat">
-        <group choice="req">
-          <arg choice="plain">
-            <option>stderr</option> <replaceable>VARIABLE_NAME</replaceable>
-          </arg>
-          <arg choice="plain">
-            <option>corr</option> <replaceable>VARIABLE_NAME_1</replaceable>, <replaceable>VARIABLE_NAME_2</replaceable>
-          </arg>
-          <arg choice="plain">
-            <replaceable>PARAMETER_NAME</replaceable>
-          </arg>
-        </group>
-        ,
-        <arg choice="plain">
-          <replaceable>INITIAL_VALUE</replaceable>
-        </arg>
-        <arg>
-          , <replaceable>LOWER_BOUND</replaceable>
-          , <replaceable>UPPER_BOUND</replaceable>
-        </arg>
-        ;
-        </arg><sbr/>
-	      <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-    </refsect2>
-    <refsect2>
-      <title>Syntax II (Bayesian estimation)</title>
-      <cmdsynopsis>
-        <command>estimated_params</command><arg choice="plain">;</arg><sbr/>
-        <arg choice="plain" rep="repeat">
-          <group choice="req">
-            <arg choice="plain">
-	            <option>stderr</option> <replaceable>VARIABLE_NAME</replaceable>
-            </arg>
-            <arg choice="plain">
-	            <option>corr</option> <replaceable>VARIABLE_NAME_1</replaceable>, <replaceable>VARIABLE_NAME_2</replaceable>
-            </arg>
-            <arg choice="plain">
-	            <replaceable>PARAMETER_NAME</replaceable>
-	          </arg>
-          </group>
-	        <arg>
-	          , <replaceable>INITIAL_VALUE</replaceable>
-	          <arg>
-	            , <replaceable>LOWER_BOUND</replaceable>
-	            , <replaceable>UPPER_BOUND</replaceable>
-	          </arg>
-	        </arg>
-
-          <arg choice="plain">
-	          , <replaceable>PRIOR_SHAPE</replaceable>
-          </arg>
-          <arg choice="plain">
-	          , <replaceable>PRIOR_MEAN</replaceable>
-          </arg>
-          <arg choice="plain">
-	          , <replaceable>PRIOR_STANDARD_ERROR</replaceable>
-          </arg>
-          <arg>
-	          , <replaceable>PRIOR_3RD_PARAMETER</replaceable>
-            <arg>
-	            , <replaceable>PRIOR_4TH_PARAMETER</replaceable>
-              <arg>
-	              , <replaceable>SCALE_PARAMETER</replaceable>
-              </arg>
-            </arg>
-          </arg>
-          ;
-          </arg><sbr/>
-          <command>end</command><arg choice="plain">;</arg>
-
-      </cmdsynopsis>
-    </refsect2>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    The <command>estimated_params</command> block lists all parameters to be estimated and specifies bounds and priors as necessary.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Estimated parameter specification</title>
-  <para>
-    Each line corresponds to an estimated parameter and follows this syntax:
-    <variablelist>
-      <varlistentry>
-        <term><option>stderr</option> <replaceable>VARIABLE_NAME</replaceable></term>
-        <listitem><para>Indicates that the standard error of the exogenous variable <replaceable>VARIABLE_NAME</replaceable>, or of the observation error associated with endogenous observed variable <replaceable>VARIABLE_NAME</replaceable>, is to be estimated</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>corr</option> <replaceable>VARIABLE_NAME_1</replaceable>, <replaceable>VARIABLE_NAME_2</replaceable></term>
-        <listitem><para>Indicates that the correlation between the exogenous variables <replaceable>VARIABLE_NAME_1</replaceable> and <replaceable>VARIABLE_NAME_2</replaceable>, or the correlation of the observation errors associated with endogenous observed variables <replaceable>VARIABLE_NAME_1</replaceable> and <replaceable>VARIABLE_NAME_2</replaceable>, is to be estimated</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>PARAMETER_NAME</replaceable></term>
-        <listitem><para>The name of a model parameter to be estimated</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>INITIAL_VALUE</replaceable></term>
-        <listitem><para>Specifies a starting value for maximum likelihood estimation</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>LOWER_BOUND</replaceable></term>
-        <listitem><para>Specifies a lower bound for the parameter value in maximum likelihood estimation</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>UPPER_BOUND</replaceable></term>
-        <listitem><para>Specifies an upper bound for the parameter value in maximum likelihood estimation</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>PRIOR_SHAPE</replaceable></term>
-        <listitem><para>A keyword specifying the shape of the prior density.
-        The possible values are: <option>beta_pdf</option>,
-        <option>gamma_pdf</option>, <option>normal_pdf</option>,
-        <option>uniform_pdf</option>, <option>inv_gamma_pdf</option>,
-        <option>inv_gamma1_pdf</option>, <option>inv_gamma2_pdf</option>. Note
-        that <option>inv_gamma_pdf</option> is equivalent to
-        <option>inv_gamma1_pdf</option></para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>PRIOR_MEAN</replaceable></term>
-        <listitem><para>The mean of the prior distribution</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>PRIOR_STANDARD_ERROR</replaceable></term>
-        <listitem><para>The standard error of the prior distribution</para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>PRIOR_3RD_PARAMETER</replaceable></term>
-        <listitem><para>A third parameter of the prior used for generalized beta distribution, generalized gamma and for the uniform distribution. Default: <literal>0</literal></para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>PRIOR_4TH_PARAMETER</replaceable></term>
-        <listitem><para>A fourth parameter of the prior used for generalized beta distribution and for the uniform distribution. Default: <literal>1</literal></para></listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><replaceable>SCALE_PARAMETER</replaceable></term>
-        <listitem><para>The scale parameter to be used for the jump distribution of the Metropolis-Hasting algorithm</para></listitem>
-      </varlistentry>
-    </variablelist>
-
-    <note>
-      <para><replaceable>INITIAL_VALUE</replaceable>, <replaceable>LOWER_BOUND</replaceable>, <replaceable>UPPER_BOUND</replaceable>, <replaceable>PRIOR_MEAN</replaceable>, <replaceable>PRIOR_STANDARD_ERROR</replaceable>, <replaceable>PRIOR_3RD_PARAMETER</replaceable>, <replaceable>PRIOR_4TH_PARAMETER</replaceable> and <replaceable>SCALE_PARAMETER</replaceable> can be any valid <replaceable>EXPRESSION</replaceable>. Some of them can be empty, in which Dynare will select a default value depending on the context and the prior shape.</para>
-    </note>
-
-    <note><para>At minimum, one must specify the name of the parameter and an initial guess. That will trigger unconstrained maximum likelihood estimation.
-    </para></note>
-
-    <note><para>As one uses options more towards the end of the list, all previous options must be filled: for example, if you want to specify <replaceable>SCALE_PARAMETER</replaceable>, you must specify <replaceable>PRIOR_3RD_PARAMETER</replaceable> and <replaceable>PRIOR_4TH_PARAMETER</replaceable>. Use empty values, if these parameters don't apply. 
-    </para></note>
-  </para>
-</refsect1>
-
-<refsect1><title>Parameter transformation</title>
-<para>
-  Sometimes, it is desirable to estimate a transformation of a parameter appearing in the model, rather than the parameter itself. It is of course possible to replace the original parameter by a function of the estimated parameter everywhere is the model, but it is often unpractical.
-</para>
-
-<para>
-  In such a case, it is possible to declare the parameter to be estimated in the <xref linkend="parameters"/> statement and to define the transformation, using a pound sign (#) expression (see <xref linkend="model"/>).
-</para>
-</refsect1>
-
-<refsect1><title>Example</title>
-<informalexample>
-  <programlisting>
-parameters bet;
-
-model;
-# sig = 1/bet;
-c = sig*c(+1)*mpk;
-end;
-
-estimated_params;
-bet, normal_pdf, 1, 0.05;
-end;
-  </programlisting>
-</informalexample>
-</refsect1>
-
-
-
-</refentry>
-
-<refentry id="estimated_params_init">
-  <refmeta>
-    <refentrytitle>estimated_params_init</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>estimated_params_init</refname>
-    <refpurpose>specifies initial values for optimization</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>estimated_params_init</command><arg choice="plain">;</arg><sbr/>
-      <arg choice="plain" rep="repeat">
-        <group choice="req">
-          <arg choice="plain">
-            <option>stderr</option> <replaceable>VARIABLE_NAME</replaceable>
-          </arg>
-          <arg choice="plain">
-            <option>corr</option> <replaceable>VARIABLE_NAME_1</replaceable>, <replaceable>VARIABLE_NAME_2</replaceable>
-          </arg>
-          <arg choice="plain">
-            <replaceable>PARAMETER_NAME</replaceable>
-          </arg>
-        </group>
-        ,
-        <arg choice="plain">
-          <replaceable>INITIAL_VALUE</replaceable>
-        </arg>
-        ;
-        </arg><sbr/>
-	      <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>The <command>estimated_params_init</command> block declares numerical initial values for the optimizer when these ones are different from the prior mean.
-  </para>
-  </refsect1>
-
-  <refsect1><title>Estimated parameter initial value specification</title>
-  <para>See <xref linkend="estimated_params" /> for the meaning and syntax of the various components.</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="estimated_params_bounds">
-  <refmeta>
-    <refentrytitle>estimated_params_bounds</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>estimated_params_bounds</refname>
-    <refpurpose>specifies lower and upper bounds for the estimated parameters</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>estimated_params_bounds</command><arg choice="plain">;</arg><sbr/>
-      <arg choice="plain" rep="repeat">
-        <group choice="req">
-          <arg choice="plain">
-	          <option>stderr</option> <replaceable>VARIABLE_NAME</replaceable>
-          </arg>
-          <arg choice="plain">
-	          <option>corr</option> <replaceable>VARIABLE_NAME_1</replaceable>, <replaceable>VARIABLE_NAME_2</replaceable>
-          </arg>
-          <arg choice="plain">
-	          <replaceable>PARAMETER_NAME</replaceable>
-	        </arg>
-        </group>
-        ,
-	      <arg choice="plain">
-          <replaceable>LOWER_BOUND</replaceable>
-	      </arg>
-        ,
-	      <arg choice="plain">
-	        <replaceable>UPPER_BOUND</replaceable>
-	      </arg>
-        ;
-        </arg><sbr/>
-        <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>The <command>estimated_params_bounds</command> block declares lower and upper bounds for parameters in maximum likelihood estimation.</para>
-  </refsect1>
-
-  <refsect1><title>Estimated parameter bounds specification</title>
-  <para>See <xref linkend="estimated_params" /> for the meaning and syntax of the various components.</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="estimation">
-  <refmeta>
-    <refentrytitle>estimation</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>estimation</refname>
-    <refpurpose>computes estimation</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>estimation</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>datafile</option> = <replaceable>FILENAME</replaceable></term>
-      <listitem><para>The datafile (a <filename class="extension">.m</filename> file, a <filename class="extension">.mat</filename> file or a <filename class="extension">.xls</filename> file)</para></listitem>
-    </varlistentry>
-    <varlistentry id="xls_sheet" xreflabel="xls_sheet">
-      <term><option>xls_sheet</option> = <replaceable>NAME</replaceable></term>
-      <listitem><para>The name of the sheet with the data in an Excel file</para></listitem>
-    </varlistentry>
-    <varlistentry id="xls_range" xreflabel="xls_range">
-      <term><option>xls_range</option> = <replaceable>RANGE</replaceable></term>
-      <listitem><para>The range with the data in an Excel file</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>nobs</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>The number of observations to be used. Default: all observations in the file</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>nobs</option> = [<replaceable>INTEGER_1</replaceable>:<replaceable>INTEGER_2</replaceable>]</term>
-      <listitem><para>Runs a recursive estimation and forecast for samples of size ranging of <replaceable>INTEGER_1</replaceable> to <replaceable>INTEGER_2</replaceable>. Option <option>forecast</option> must also be specified</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>first_obs</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>The number of the first observation to be used. Default: <literal>1</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>prefilter</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>A value of <literal>1</literal> means that the estimation procedure will demean the data. Default: <literal>0</literal>, <foreignphrase>i.e.</foreignphrase> no prefiltering</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>presample</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>The number of observations to be skipped before evaluating the likelihood. Default: <literal>0</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>loglinear</option></term>
-      <listitem><para>Computes a log--linear approximation of the model instead of a linear approximation. The data must correspond to the definition of the variables used in the model. Default: computes a linear approximation</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>plot_priors</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Control the plotting of priors:
-      <itemizedlist>
-        <listitem><para><literal>0</literal>: no prior plot</para></listitem>
-        <listitem><para><literal>1</literal>: prior density for each estimated parameter is plotted. It is important to check that the actual shape of prior densities matches what you have in mind. Ill choosen values for the prior standard density can result in absurd prior densities.</para></listitem>
-      </itemizedlist>
-      Default value is <literal>1</literal>.
-      </para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>nograph</option></term>
-      <listitem><para>No graphs should be plotted</para></listitem>
-    </varlistentry>
-    <varlistentry id="lik_init" xreflabel="lik_init">
-      <term><option>lik_init</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Type of initialization of Kalman filter:
-      <itemizedlist>
-        <listitem><para><literal>1</literal>: for stationary models, the initial matrix of variance of the error of forecast is set equal to the unconditional variance of the state variables</para></listitem>
-        <listitem><para><literal>2</literal>: for nonstationary models: a wide prior is used with an initial matrix of variance of the error of forecast diagonal with 10 on the diagonal</para></listitem>
-        <listitem><para><literal>3</literal>: for nonstationary models: ...</para></listitem>
-      </itemizedlist>
-      Default value is <literal>1</literal>.
-      </para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>lik_algo</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>...</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>conf_sig</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>See <link linkend="conf_sig">there</link></para></listitem>
-    </varlistentry>
-    <varlistentry id="mh_replic" xreflabel="mh_replic">
-      <term><option>mh_replic</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of replications for Metropolis-Hastings algorithm. For the time being, <option>mh_replic</option> should be larger than <literal>1200</literal>. Default: <literal>20000</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>mh_nblocks</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of parallel chains for Metropolis-Hastings algorithm. Default: <literal>2</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>mh_drop</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>The fraction of initially generated parameter vectors to be dropped before using posterior simulations. Default: <literal>0.5</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>mh_jscale</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>The scale to be used for the jumping distribution in Metropolis-Hastings algorithm. The default value is rarely satisfactory. This option must be tuned to obtain, ideally, an acceptation rate of 25% in the Metropolis-Hastings algorithm. Default: <literal>0.2</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>mh_init_scale</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>The scale to be used for drawing the initial value of the Metropolis-Hastings chain. Default: 2*<option>mh_scale</option></para></listitem>
-    </varlistentry>
-    <varlistentry id="mh_recover" xreflabel="mh_recover">
-      <term><option>mh_recover</option></term>
-      <listitem><para>Attempts to recover a Metropolis-Hastings simulation that crashed prematurely. Shouldn't be used together with <xref linkend="load_mh_file"/></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>mh_mode</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>...</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>mode_file</option> = <replaceable>FILENAME</replaceable></term>
-      <listitem><para>Name of the file containing previous value for the mode. When computing the mode, Dynare stores the mode (<varname>xparam1</varname>) and the hessian (<varname>hh</varname>) in a file called <filename><replaceable>MODEL_FILENAME</replaceable>_mode.mat</filename></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>mode_compute</option> = <replaceable>INTEGER</replaceable> | <replaceable>FUNCTION_NAME</replaceable></term>
-      <listitem><para>Specifies the optimizer for the mode computation:
-      <itemizedlist>
-        <listitem><para><literal>0</literal>: the mode isn't computed. <option>mode_file</option> option must be specified</para></listitem>
-        <listitem><para><literal>1</literal>: uses <command>fmincon</command> optimization routine (not available under Octave)</para></listitem>
-        <listitem><para><literal>2</literal>: value no longer used</para></listitem>
-        <listitem><para><literal>3</literal>: uses <command>fminunc</command> optimization routine</para></listitem>
-        <listitem><para><literal>4</literal>: uses Chris Sims's <command>csminwel</command></para></listitem>
-        <listitem><para><literal>5</literal>: uses Marco Ratto's <command>newrat</command></para></listitem> 
-        <listitem><para><literal>6</literal>: uses a Monte-Carlo based optimization routine (see <ulink url="http://www.dynare.org/DynareWiki/MonteCarloOptimization">Dynare wiki</ulink> for more details)</para></listitem>
-        <listitem><para><literal>7</literal>: uses <command>fminsearch</command>, a simplex based optimization routine (available under Octave if the <ulink url="http://octave.sourceforge.net/optim/">optim</ulink> package from Octave-Forge is installed)</para></listitem>
-        <listitem><para>It is also possible to give a <replaceable>FUNCTION_NAME</replaceable> to this option, instead of an <replaceable>INTEGER</replaceable>. In that case, Dynare takes the return value of that function as the posterior mode.</para>
-        </listitem>
-      </itemizedlist>
-      Default value is <literal>4</literal>.
-      </para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>mode_check</option></term>
-      <listitem><para>Tells Dynare to plot the posterior density for values around the computed mode for each estimated parameter in turn. This is helpful to diagnose problems with the optimizer</para></listitem>
-    </varlistentry>
-    <varlistentry id="prior_trunc" xreflabel="prior_trunc">
-      <term><option>prior_trunc</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>Probability of extreme values of the prior density that is ignored when computing bounds for the parameters. Default: <literal>1e-32</literal></para></listitem>
-    </varlistentry>
-    <varlistentry id="load_mh_file" xreflabel="load_mh_file">
-      <term><option>load_mh_file</option></term>
-      <listitem><para>Tells Dynare to add to previous Metropolis-Hastings simulations instead of starting from scratch. Shouldn't be used together with <xref linkend="mh_recover"/></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>optim</option> = (<replaceable>fmincon options</replaceable>)</term>
-      <listitem><para>Can be used to set options for <command>fmincon</command>, the optimizing function of <trademark class="registered">MATLAB</trademark> Optimizaiton toolbox. Use <trademark class="registered">MATLAB</trademark>'s syntax for these options. Default: <literal>('display','iter','LargeScale','off','MaxFunEvals',100000,'TolFun',1e-8,'TolX',1e-6)</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>nodiagnostic</option></term>
-      <listitem><para>Doesn't compute the convergence diagnostics for Metropolis-Hastings. Default: diagnostics are computed and displayed</para></listitem>
-    </varlistentry>
-    <varlistentry id="bayesian_irf" xreflabel="bayesian_irf">
-      <term><option>bayesian_irf</option></term>
-      <listitem><para>Triggers the computation of the posterior distribution of IRFs. The length of the IRFs are controlled by the <option>irf</option> option</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>dsge_var</option></term>
-      <listitem><para>Triggers the estimation of a DSGE-VAR model, where the  weight of  the DSGE  prior of the  VAR model  will be
-      estimated.   The    prior   on   the   weight    of   the   DSGE
-      prior, <varname>dsge_prior_weight</varname>,  must be defined in
-      the <command>estimated_params</command> section. 
-      NB:           The          previous           method          of
-      declaring  <varname>dsge_prior_weight</varname>  as a  parameter
-      and then placing it in 
-      <command>estimated_params</command> is now deprecated and will be removed in a future release of Dynare.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>dsge_var</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>Triggers  the estimation  of  a DSGE-VAR  model,
-      where the weight of the DSGE prior of the VAR model is calibrated to the value passed. NB: The previous method of declaring <varname>dsge_prior_weight</varname> as a parameter and then calibrating it is now deprecated and will be removed in a future release of Dynare.</para></listitem>
-    </varlistentry>
-    <varlistentry id="dsge_varlag" xreflabel="dsge_varlag">
-      <term><option>dsge_varlag</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>The number of lags used to estimate a DSGE-VAR model. Default: <literal>4</literal>.</para></listitem>
-    </varlistentry>
-    <varlistentry id="moments_varendo" xreflabel="moments_varendo">
-      <term><option>moments_varendo</option></term>
-      <listitem><para>Triggers the computation of the posterior distribution of the theoretical moments of the endogenous variables</para></listitem>
-    </varlistentry>
-    <varlistentry id="filtered_vars" xreflabel="filtered_vars">
-      <term><option>filtered_vars</option></term>
-      <listitem><para>Triggers the computation of the posterior distribution of filtered endogenous variables and shocks</para></listitem>
-    </varlistentry>
-    <varlistentry id="smoother" xreflabel="smoother">
-      <term><option>smoother</option></term>
-      <listitem><para>Triggers the computation of the posterior distribution of smoothered endogenous variables and shocks</para></listitem>
-    </varlistentry>
-    <varlistentry id="forecast_opt" xreflabel="forecast">
-      <term><option>forecast</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Computes the posterior distribution of a forecast on <replaceable>INTEGER</replaceable> periods after the end of the sample used in estimation</para></listitem>
-    </varlistentry>
-    <varlistentry id="tex" xreflabel="tex">
-      <term><option>tex</option></term>
-      <listitem><para>Requests the printing of results and graphs in TeX tables and graphics that can be later directly included in LaTeX files (not yet implemented)</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>kalman_algo</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>...</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>kalman_tol</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>...</para></listitem>
-    </varlistentry>
-    <varlistentry id="filter_covariance" xreflabel="filter_covariance">
-      <term><option>filter_covariance</option></term>
-      <listitem><para>Saves the series of one step ahead error of forecast covariance matrices.</para></listitem>
-    </varlistentry>
-    <varlistentry id="filter_step_ahead" xreflabel="filter_step_ahead">
-      <term><option>filter_step_ahead</option> = [<replaceable>INTEGER_1</replaceable>:<replaceable>INTEGER_2</replaceable>]</term>
-      <listitem><para>Triggers the computation k-step ahead filtered values.</para></listitem>
-    </varlistentry>
-    <varlistentry id="filter_decomposition" xreflabel="filter_decomposition">
-      <term><option>filter_decomposition</option></term>
-      <listitem><para>Triggers the computation of the shock decomposition of the above k-step ahead filtered values.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>constant</option></term>
-      <listitem><para>...</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>noconstant</option></term>
-      <listitem><para>...</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>diffuse_filter</option></term>
-      <listitem><para>...</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>selected_variables_only</option></term>
-      <listitem><para>Only run the smoother on the variables listed just after the <command>estimation</command> command. Default: run the smoother on all the declared endogenous variables.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>cova_compute</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>When 0, the covariance matrix of estimated parameters is not computed after the computation of posterior mode (or maximum likelihood). This increases speed of computation in large models during development, when this information is not always necessary. Of course, it will break all successive computations that would require this covariance matrix. Default is 1.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>solve_algo</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>See <link linkend="solve_algo">there</link></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>order</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>See <link linkend="order">there</link></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>irf</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>See <link linkend="irf">there</link></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>aim_solver</option></term>
-      <listitem><para>See <link linkend="aim_solver">there</link></para></listitem>
-    </varlistentry>
-  </variablelist>
-
-
-  <note><para> If no <option>mh_jscale</option> parameter is used in estimated_params, the procedure uses <option>mh_jscale</option> for all parameters. If <option>mh_jscale</option> option isn't set, the procedure uses <literal>0.2</literal> for all parameters.
-  </para></note>
-</refsect1>
-
-<refsect1><title>Results</title>
-<itemizedlist spacing='compact'>
-  <listitem><para> results from posterior optimization (also for maximum likelihood)</para></listitem>
-  <listitem><para> marginal log density</para></listitem>
-  <listitem><para> mean and shortest confidence interval from posterior simulation</para></listitem>
-  <listitem><para>Metropolis-Hastings convergence graphs that still need to be documented</para></listitem>
-  <listitem><para> graphs with prior, posterior and mode</para></listitem>
-  <listitem><para> graphs of smoothed shocks, smoothed observation errors, smoothed and historical variables</para></listitem>
-</itemizedlist>
-</refsect1>
-
-<refsect1><title>Output</title>
-<para>After running <command>estimation</command>, the parameters and the variance matrix of the shocks are set to the mode for maximum likelihood estimation or posterior mode computation without Metropolis iterations.
-</para>
-<para>After <command>estimation</command> with Metropolis iterations (option <option>mh_replic</option> > 0 or option <option>load_mh_file</option> set) the parameters and the variance matrix of the shocks are set to the posterior mean.</para>
-
-<para>Depending on the options, <command>estimation</command> stores results in the following fields of structure <varname>oo_</varname>:
-<table orient="land"><title>Content of <varname>oo_</varname></title><tgroup cols='6'>
-<thead>
-  <row><entry>Field 1</entry><entry>Field 2</entry><entry>Field 3</entry><entry>Field 4</entry><entry>Field 5</entry><entry>Required options</entry></row>
-</thead>
-<tbody>
-  <row><entry><varname>Forecast</varname></entry><entry>See <xref linkend="ForecastsMoments"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><xref linkend="forecast_opt"/></entry></row>
-  <row><entry morerows='1'><varname>MarginalDensity</varname></entry><entry><varname>LaplaceApproximation</varname></entry><entry/><entry></entry><entry></entry><entry>Always provided</entry></row>
-  <row><entry><varname>ModifiedHarmonicMean</varname></entry><entry></entry><entry></entry><entry></entry><entry><para><xref linkend="mh_replic"/>&gt; 0 or <xref linkend="load_mh_file"/></para></entry></row>
-  <row><entry><varname>FilteredVariables</varname></entry><entry>See <xref linkend="MomentsNames"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><para><xref linkend="filtered_vars"/></para></entry></row>
-  <row><entry><varname>PosteriorIRF</varname></entry><entry><varname>Dsge</varname></entry><entry>See <xref linkend="MomentsNames"/></entry><entry><para>IRF name: name of endogenous variable '_' name of shock</para></entry><entry></entry><entry><xref linkend="bayesian_irf"/></entry></row>
-  <row><entry><varname>SmoothedMeasurementErrors</varname></entry><entry>See <xref linkend="MomentsNames"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><para><xref linkend="smoother"/></para></entry></row>
-  <row><entry><varname>SmoothedShocks</varname></entry><entry>See <xref linkend="MomentsNames"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><para><xref linkend="smoother"/></para></entry></row>
-  <row><entry><varname>SmoothedVariables</varname></entry><entry>See <xref linkend="MomentsNames"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><para><xref linkend="smoother"/></para></entry></row>
-  <row><entry><varname>PosteriorTheoreticalMoments</varname></entry><entry>See <xref linkend="TheoreticalMoments"/></entry><entry>See <xref linkend="EstimatedObjects"/></entry><entry>See <xref linkend="MomentsNames"/></entry><entry><replaceable>Variable name</replaceable></entry><entry><xref linkend="moments_varendo"/></entry></row>
-  <row><entry><varname>posterior_density</varname></entry><entry><replaceable>Parameter name</replaceable></entry><entry></entry><entry></entry><entry></entry><entry><para><xref linkend="mh_replic"/>&gt; 0 or <xref linkend="load_mh_file"/></para></entry></row>
-  <row><entry><varname>posterior_hpdinf</varname></entry><entry>See <xref linkend="EstimatedObjects"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><para><xref linkend="mh_replic"/>&gt; 0 or <xref linkend="load_mh_file"/></para></entry></row>
-  <row><entry><varname>posterior_hpdsup</varname></entry><entry>See <xref linkend="EstimatedObjects"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><para><xref linkend="mh_replic"/>&gt; 0 or <xref linkend="load_mh_file"/></para></entry></row>
-  <row><entry><varname>posterior_mean</varname></entry><entry>See <xref linkend="EstimatedObjects"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><para><xref linkend="mh_replic"/>&gt; 0 or <xref linkend="load_mh_file"/></para></entry></row>
-  <row><entry><varname>posterior_mode</varname></entry><entry>See <xref linkend="EstimatedObjects"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><para><xref linkend="mh_replic"/>&gt; 0 or <xref linkend="load_mh_file"/></para></entry></row>
-  <row><entry><varname>posterior_std</varname></entry><entry>See <xref linkend="EstimatedObjects"/></entry><entry><replaceable>Variable name</replaceable></entry><entry></entry><entry></entry><entry><para><xref linkend="mh_replic"/>&gt; 0 or <xref linkend="load_mh_file"/></para></entry></row>
-</tbody>
-</tgroup>
-</table>
-</para>
-
-<para><anchor id="ForecastsMoments" xreflabel="Moments of forecasts"/>
-<table><title>Moments of forecasts</title>
-<tgroup cols='2'>
-  <thead>
-    <row><entry>Field name</entry><entry>Description</entry></row>
-  </thead>
-  <tbody>
-    <row><entry><varname>HPDinf</varname></entry><entry>Lower bound of a 90% HPD interval<footnote id="see_conf_sig"><para>See option <xref linkend="conf_sig"/> to change the size of the HPD interval</para></footnote> of forecast  due to parameter uncertainty</entry></row> 
-    <row><entry><varname>HPDsup</varname></entry><entry>Lower bound of a 90% HPD interval <footnoteref linkend="see_conf_sig"/> due to parameter uncertainty</entry></row> 
-    <row><entry><varname>HPDTotalinf</varname></entry><entry>Lower bound of a 90% HPD interval of forecast <footnoteref linkend="see_conf_sig"/> due to parameter uncertainty and future shocks</entry></row> 
-    <row><entry><varname>HPDTotalsup</varname></entry><entry>Lower bound of a 90% HPD interval <footnoteref linkend="see_conf_sig"/> due to parameter uncertainty and future shocks</entry></row>
-    <row><entry><varname>Mean</varname></entry><entry>Mean of the posterior distribution of forecasts</entry></row> 
-    <row><entry><varname>Median</varname></entry><entry>Median of the posterior distribution of forecasts</entry></row>  
-    <row><entry><varname>Std</varname></entry> <entry>Standard deviation of the posterior distribution of forecasts</entry></row> 
-  </tbody>
-</tgroup>
-</table>
-</para>
-<para><anchor id="MomentsNames" xreflabel="Moments Names"/>
-<table><title>Moments Names</title>
-<tgroup cols='2'>
-  <thead>
-    <row><entry>Field name</entry><entry>Description</entry></row>
-  </thead>
-  <tbody>
-    <row><entry><varname>HPDinf</varname></entry><entry>Lower bound of a 90% HPD interval<footnote id="see_conf_sig1"><para>See option <xref linkend="conf_sig"/> to change the size of the HPD interval</para></footnote></entry></row> 
-    <row><entry><varname>HPDsup</varname></entry><entry>Upper bound of a 90% HPD interval <footnoteref linkend="see_conf_sig1"/> </entry></row> 
-    <row><entry><varname>Mean</varname></entry><entry>Mean of the posterior distribution</entry></row> 
-    <row><entry><varname>Median</varname></entry><entry>Median of the posterior distribution</entry></row>  
-    <row><entry><varname>Std</varname></entry> <entry>Standard deviation of the posterior distribution</entry></row> 
-  </tbody>
-</tgroup>
-</table>
-</para>
-<para><anchor id="TheoreticalMoments" xreflabel="Theoretical Moments"/>
-<table><title>Theoretical Moments</title>
-<tgroup cols='2'>
-  <thead>
-    <row><entry>Field name</entry><entry>Description</entry></row>
-  </thead>
-  <tbody>
-    <row><entry><varname>Autocorrelation</varname></entry><entry>Autocorrelation of endogenous variables<footnote><para>The autocorrlation coefficients are computed for the number of periods specified in option <xref linkend="ar"/>.</para></footnote></entry></row>
-    <row><entry><varname>Correlation</varname></entry><entry>Correlation between two endogenous variables</entry></row>
-    <row><entry><varname>Decomp</varname></entry><entry>Decomposition of variance<footnote><para>When the shocks are correlated, it is the decomposition of orthogonalized shocks via Cholesky decompostion according to the order of declaration of shocks (see <xref linkend="varexo"/>).</para></footnote> </entry></row>
-    <row><entry><varname>Expectation</varname></entry><entry>Expectation of endogenous variables</entry></row>
-    <row><entry><varname>Variance</varname></entry><entry>(co-)variance of endogenous variables</entry></row>
-  </tbody>
-</tgroup>
-</table>
-</para>
-
-<para><anchor id="EstimatedObjects" xreflabel="Estimated Objects"/>
-<table><title>Estimated objects</title>
-<tgroup cols='2'>
-  <thead>
-    <row><entry>Field name</entry><entry>Description</entry></row>
-  </thead>
-  <tbody>
-    <row><entry><varname>measurement_errors_corr</varname></entry><entry>Correlation between two measurement errors</entry></row>
-    <row><entry><varname>measurement_errors_std</varname></entry><entry>Standard deviation of measurement errors</entry></row>
-    <row><entry><varname>parameters</varname></entry><entry>Parameters</entry></row>
-    <row><entry><varname>shocks_corr</varname></entry><entry>Correlation between two structural shocks</entry></row>
-    <row><entry><varname>shocks_std</varname></entry><entry>Standard deviation of structural shocks</entry></row>
-  </tbody>
-</tgroup>
-</table>
-</para>
-
-<refsect2><title>Examples</title>
-<para>
-  <informalexample>
-    <programlisting>
-oo_.posterior_mode.parameters.alp
-oo_.posterior_mean.shocks_std.ex
-oo_.posterior_hpdsup.measurement_errors_corr.gdp_conso
-    </programlisting>
-  </informalexample>
-</para>
-</refsect2>
-
-</refsect1>
-
-<refsect1><title>Notes</title>
-<refsect2><title>Steady state computation</title>
-<para>If you know how to compute the steady state for your model, you can provide a <trademark class="registered">MATLAB</trademark>/Octave function doing the computation instead of using <command>steady</command>. The function should be called with the name of the <filename class="extension">.mod</filename> file followed by <filename>_steadystate</filename>. See <filename>fs2000_steadystate.m</filename> in <filename>examples</filename> directory for an example.
-</para>
-</refsect2>
-<refsect2><title>Running the smoother with calibrated parameters</title>
-<para>It is possible to compute smoothed value of the endogenous variables and the shocks with calibrated parameters, without estimation proper. For this usage, there should be no <command>estimated_params</command> block. Observed variables must be declared. A dataset must be specified in the <command>estimation</command> instruction. In addition, use the following options: <command>mode_compute=0,mh_replic=0,smoother</command>. Currently, there is no specific output for this usage of the <command>estimation</command> command. The results are made available in fields of <command>oo_</command> structure. An example is available in <filename>./tests/smoother/calibrated_model.mod</filename>.</para>
-</refsect2>
-</refsect1>
-</refentry>
-
-<refentry id="model_comparison">
-  <refmeta>
-    <refentrytitle>model_comparison</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>model_comparison</refname>
-    <refpurpose>Bayesian model comparison</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>model_comparison</command>
-      <arg>(<option>marginal_density</option> = <group choice="plain"><arg choice="plain">laplace</arg><arg choice="plain">modifiedharmonicmean</arg></group>)</arg>
-      <arg>
-        <replaceable>FILENAME</replaceable><arg>(<replaceable>DOUBLE</replaceable>)</arg>
-        <arg rep="repeat"><arg>,</arg> <replaceable>FILENAME</replaceable><arg>(<replaceable>DOUBLE</replaceable>)</arg></arg>
-      </arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>This function computes odds ratios and estimate a posterior density over a colletion of models. The priors over models can be specified as the <replaceable>DOUBLE</replaceable> values, otherwise a uniform prior is assumed.</para>
-  </refsect1>
-</refentry>
-
-<refentry id="shock_decomposition">
-  <refmeta>
-    <refentrytitle>shock_decomposition</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>shock_decomposition</refname>
-    <refpurpose>computes and displays shock decomposition according to the model for a given sample</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>shock_decomposition</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg> <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>parameter_set</option> = <option>prior_mode</option> | <option>prior_mean</option> | <option>posterior_mode</option> | 
-      <option>posterior_mean</option> | <option>posterior_median</option></term>
-      <listitem><para>Specify the parameter set to use for running the smoother. Default value: <option>posterior_mean</option> if Metropolis has been run, else <option>posterior_mode</option>.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>shocks</option> = (
-      <replaceable>VARIABLE_NAME</replaceable> [<replaceable>VARIABLE_NAME</replaceable> ...]
-      [ ; <replaceable>VARIABLE_NAME</replaceable> [<replaceable>VARIABLE_NAME</replaceable> ...] ...] )</term>
-      <listitem><para>...</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>labels</option> = ( <replaceable>VARIABLE_NAME</replaceable> [<replaceable>VARIABLE_NAME</replaceable> ...] )</term>
-      <listitem><para>...</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="unit_root_vars">
-  <refmeta>
-    <refentrytitle>unit_root_vars</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>unit_root_vars</refname>
-    <refpurpose>declares unit-root variables for estimation</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>unit_root_vars</command>
-      <arg choice="plain">
-	      <replaceable>VARIABLE_NAME</replaceable>
-      </arg>
-      <arg rep="repeat"><arg>,</arg>
-      <replaceable>VARIABLE_NAME</replaceable>
-      </arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    <command>unit_root_vars</command> is used to declare a list of unit-root endogenous variables of a model so that dynare won't check the steady state levels (defined in the steadystate file) file for these variables. The information given by this command is no more used for the initialization of the diffuse kalman filter (as described in <xref linkend="durbin-koopman_2001"/> and <xref linkend="koopman-durbin_2003"/>).
-  </para>
-
-  <para>When <command>unit_root_vars</command> is used the <xref linkend="lik_init"/> option of <xref linkend="estimation"/> has no effect.
-  </para>
-
-  <para>When there are nonstationary variables in a model, there is no unique deterministic steady state. The user must supply a <trademark class="registered">MATLAB</trademark>/Octave function that computes the steady state values of the stationary variables in the model and returns dummy values for the nonstationary ones. The function should be called with the name of the <filename>.mod</filename> file followed by <filename>_steadystate</filename>. See <filename>fs2000_steadystate.m</filename> in <filename>examples</filename> directory for an example.
-  </para>
-
-  <para>Note that the nonstationary variables in the model must be integrated processes(their first difference or k-difference must be stationary).</para>
-  </refsect1>
-</refentry>
-</sect1>
-
-<sect1><title>Forecasting</title>
-<para>On a calibrated model, forecasting is done using the <xref linkend="forecast"/> command. On an estimated command, use the <xref linkend="forecast_opt"/> option of <xref linkend="estimation"/> command.</para>
-
-<para>It is also possible to compute forecasts on a calibrated or estimated model for a given constrained path of the future endogenous variables. This is done, from the reduced form representation of the DSGE model, by finding the structural shocks that are needed to match the restricted paths. Use <xref linkend="conditional_forecast" />, <xref linkend="conditional_forecast_paths" /> and <xref linkend="plot_conditional_forecast" /> for that purpose.</para>
-
-<refentry id="forecast">
-  <refmeta>
-    <refentrytitle>forecast</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>forecast</refname>
-    <refpurpose>computes a simulation of a stochastic model from a given state</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>forecast</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg><replaceable>VARIABLE_NAME</replaceable></arg>
-      <arg rep="repeat"><arg>,</arg> <replaceable>VARIABLE_NAME</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>periods</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of periods of the forecast. Default: <literal>40</literal></para></listitem>
-    </varlistentry>
-    <varlistentry id="conf_sig" xreflabel="conf_sig">
-      <term><option>conf_sig</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>Level of significance for confidence interval. Default: <literal>0.90</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>nograph</option></term>
-      <listitem><para>Don't display graphics.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Description</title>
-  <para><command>forecast</command> computes a simulation of a stochastic model from an arbitrary initial point.</para>
-  <para>When the model also contains deterministic exogenous shocks, the simulation is computed conditionaly to the agents knowing the future values of the deterministic exogenous variables.</para>
-
-  <para><command>forecast</command> must be called after <xref linkend="stoch_simul"/>.</para>
-
-  <para><command>forecast</command> plots the trajectory of endogenous variables. When a list of variable names follows the command, only those variables are plotted. A 90% confidence interval is plotted around the mean trajectory. Use option <option>conf_sig</option> to change the level of the confidence interval.</para>
-  </refsect1>
-
-  <refsect1><title>Output variables</title>
-  <para>The following variables are set in structure <varname>oo_</varname>:
-  <itemizedlist spacing="compact">
-    <listitem><para><varname>oo_.forecast.Mean.<replaceable>VARIABLE_NAME</replaceable></varname>: mean forecast of endogenous variables</para></listitem>
-    <listitem><para><varname>oo_.forecast.HPDinf.<replaceable>VARIABLE_NAME</replaceable></varname>: lower bound of a confidence interval around the forecast</para></listitem>
-    <listitem><para><varname>oo_.forecast.HPDsup.<replaceable>VARIABLE_NAME</replaceable></varname>: upper bound of a confidence interval around the forecast</para></listitem>
-    <listitem><para><varname>oo_.forecast.Exogenous.<replaceable>VARIABLE_NAME</replaceable></varname>: trajectory of the deterministic exogenous variables</para></listitem>
-  </itemizedlist>
-  </para>
-  </refsect1>
-
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-varexo_det tau;
-varexo e;
-
-...
-
-shocks;
-var e; stderr 0.01;
-var tau;
-periods 1:9;
-values -0.15;
-end;
-
-stoch_simul(irf=0);
-
-forecast;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="conditional_forecast">
-  <refmeta>
-    <refentrytitle>conditional_forecast</refentrytitle>
-  </refmeta>
-  
-  <refnamediv>
-    <refname>conditional_forecast</refname>
-    <refpurpose>computes a simulation of a stochastic model conditionally to a specified future path for some endogenous variables.</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>conditional_forecast</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg choice="plain"><replaceable>VARIABLE_NAME</replaceable></arg>
-      <arg rep="repeat"><arg>,</arg> <replaceable>VARIABLE_NAME</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>parameter_set</option> = <option>prior_mode</option> | <option>prior_mean</option> | <option>posterior_mode</option> | 
-      <option>posterior_mean</option> | <option>posterior_median</option></term>
-      <listitem><para>Specify the parameter set to use for the forecasting. No default value,  mandatory option.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>controlled_varexo</option> = (<replaceable>VARIABLE_NAME</replaceable> [ [,] <replaceable>VARIABLE_NAME</replaceable> ... ] )</term>
-      <listitem><para>Specify the exogenous variables to use as control variables. No default value, mandatory option.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>periods</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of periods of the forecast. Default: <literal>40</literal>. 
-      <option>periods</option> cannot be less than the number of constrained periods. </para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>replic</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of simulations. Default: <literal>5000</literal>.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>conf_sig</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>Level of significance for confidence interval. Default: <literal>0.80</literal></para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Description</title>
-  <para><command>conditional_forecast</command> computes forecasts on an estimated model for a given constrained path of some 
-  future endogenous variables. This is done, from the reduced form representation of the DSGE model, by finding the structural shocks that 
-  are needed to match the restricted paths. This command has to be called after estimation.</para>
-
-  <para>Use <xref linkend="conditional_forecast_paths" /> to give the list of constrained endogenous, and their constrained future path. Option <option>controlled_varexo</option> is used to specify the structural shocks which will be matched to generate the constrained path.</para>
-
-  <para>Use <xref linkend="plot_conditional_forecast" /> to graph the results.</para>
-
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-var y a
-varexo e u;
-
-...
-
-estimation(...);
-
-conditional_forecast_paths;
-var y;
-periods 1:3, 4:5;
-values 2, 5;
-var a;
-periods 1:5;
-values 3;
-end;
-
-conditional_forecast(parameter_set = calibration, controlled_varexo = (e, u), replic = 3000);
-
-plot_conditional_forecast(periods = 10) e u;
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="conditional_forecast_paths">
-  <refmeta>
-    <refentrytitle>conditional_forecast_paths</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>conditional_forecast_paths</refname>
-    <refpurpose>in a conditional forecast, gives the list of constrained endogenous and their path</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>conditional_forecast_paths</command><arg choice="plain">;</arg><sbr/>
-      <arg rep="repeat">
-	      <arg choice="plain">var <replaceable>VARIABLE_NAME</replaceable>;</arg>
-	      <arg choice="plain">periods <replaceable>INTEGER</replaceable><arg>:<replaceable>INTEGER</replaceable></arg><arg rep="repeat"><arg>,</arg> <replaceable>INTEGER</replaceable><arg>:<replaceable>INTEGER</replaceable></arg></arg>;</arg>
-        <arg choice="plain">values <replaceable>EXPRESSION</replaceable> <arg rep="repeat"><arg>,</arg> <replaceable>EXPRESSION</replaceable></arg>;</arg>
-        </arg><sbr/>
-        <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>Describes the path of constrained endogenous, before calling <xref linkend="conditional_forecast"/>. The syntax is similar to deterministic shocks in <xref linkend="shocks"/>, see <xref linkend="conditional_forecast"/> for an example.</para>
-  </refsect1>
-</refentry>
-
-<refentry id="plot_conditional_forecast">
-  <refmeta>
-    <refentrytitle>plot_conditional_forecast</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>plot_conditional_forecast</refname>
-    <refpurpose>plots the conditional forecasts</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>plot_conditional_forecast</command>
-      <arg>(<option>periods</option> = <replaceable>INTEGER</replaceable>)</arg> <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>periods</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of periods to be plotted. Default: equal to <option>periods</option> in <command>conditional_forecast</command>. The number of periods 
-      declared in <command>plot_conditional_forecast</command> cannot be greater than the one declared in <command>conditional_forecast</command>.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Description</title>
-  <para>
-    To be used after <xref linkend="conditional_forecast"/>.
-  </para>
-  </refsect1>
-</refentry>
-</sect1>
-
-<sect1><title>Optimal policy</title>
-<para>Dynare has tools to compute optimal policies for quadratic objectives. You can either solve for optimal policy under commitment with <command>planner_objective</command> or for optimal simple rule with <xref linkend='osr'/>.
-</para>
-
-<itemizedlist>
-  <listitem><para><xref linkend='optim_weights'/></para></listitem>
-  <listitem><para><xref linkend='osr'/></para></listitem>
-  <listitem><para><xref linkend='osr_params'/></para></listitem>
-  <listitem><para><xref linkend='planner_objective'/></para></listitem>
-  <listitem><para><xref linkend='ramsey_policy'/></para></listitem>
-  <listitem><para><xref linkend='discretionary_policy'/></para></listitem>
-</itemizedlist>
-
-<refentry id="optim_weights">
-  <refmeta>
-    <refentrytitle>optim_weights</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>optim_weights</refname>
-    <refpurpose>specifies quadratic objectives for optimal policy problems</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>optim_weights</command><arg choice="plain">;</arg><sbr/>
-      <arg rep="repeat">
-	      <group choice="plain">
-          <arg choice="plain"><replaceable>VARIABLE_NAME</replaceable> <replaceable>EXPRESSION</replaceable>;</arg>
-          <arg choice="plain"><replaceable>VARIABLE_NAME</replaceable>, <replaceable>VARIABLE_NAME</replaceable> <replaceable>EXPRESSION</replaceable>;</arg>
-        </group>
-      </arg>
-      <command>end</command><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-
-  <refsect1><title>Description</title>
-  <para>
-    <command>optim_weights</command> secifies the nonzero elements of the quadratic weight matrices for the objectives in <xref linkend='osr'/>.
-  </para>
-  </refsect1>
-</refentry>
-
-<refentry id="osr">
-  <refmeta>
-    <refentrytitle>osr</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>osr</refname>
-    <refpurpose>computes optimal simple policy rules</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>osr</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <para>All options for <xref linkend="stoch_simul"/>.</para>
-  </refsect1>
-
-  <refsect1><title>Description</title>
-  <para>
-    <command>osr</command> computes optimal simple policy rules for linear--quadratic problems of the form:
-  </para>
-  <blockquote><para>
-    max<subscript>&gamma;</subscript> E(y'<subscript>t</subscript>Wy<subscript>t</subscript>)
-  </para>
-  <para>s.t.</para>
-  <para>
-    A<subscript>1</subscript>E<subscript>t</subscript>(y<subscript>t+1</subscript>)+A<subscript>2</subscript>y<subscript>t</subscript>+A<subscript>3</subscript>y<subscript>t-1</subscript>+Ce<subscript>t</subscript>=0
-  </para>
-  </blockquote>
-  <para>with:</para>
-  <itemizedlist>
-    <listitem><para>&gamma;: parameters to be optimized. They must be elements of matrices A<subscript>1</subscript>, A<subscript>2</subscript>, A<subscript>3</subscript>.</para></listitem>
-    <listitem><para>y: endogenous variables</para></listitem>
-    <listitem><para>e: exogenous stochastic shocks</para></listitem>
-  </itemizedlist>
-  <para>The parameters to be optimized must be listed with <xref linkend='osr_params'/>.
-  </para>
-  <para>The quadratic objectives must be listed with <xref linkend='optim_weights'/>.
-  </para>
-  <para>
-    This problem is solved using a numerical optimizer.
-  </para>
-  </refsect1>
-</refentry>
-
-<refentry id="osr_params">
-  <refmeta>
-    <refentrytitle>osr_params</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>osr_params</refname>
-    <refpurpose>declares the parameters to be optimized for optimal simple rules</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>osr_params</command>
-      <arg choice="plain"><replaceable>PARAMETER_NAME</replaceable></arg>
-      <arg rep="repeat"><replaceable>PARAMETER_NAME</replaceable></arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-
-  <refsect1><title>Description</title>
-  <para>
-    <command>osr_params</command> declares parameters to be optimized  by <xref linkend='osr'/>.
-  </para>
-  </refsect1>
-</refentry>
-
-<refentry id="planner_objective">
-  <refmeta>
-    <refentrytitle>planner_objective</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>planner_objective</refname>
-    <refpurpose>declares the policy maker objective, for use with <xref linkend="ramsey_policy"/> and <xref linkend="discretionary_policy"/></refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>planner_objective</command>
-      <arg choice="plain"><replaceable>MODEL_EXPRESSION</replaceable></arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="ramsey_policy">
-  <refmeta>
-    <refentrytitle>ramsey_policy</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>ramsey_policy</refname>
-    <refpurpose>computes the first order approximation of the policy that maximizes the policy maker objective function (see <xref linkend="planner_objective"/>) submitted to the constraints provided by the equilibrium path of the economy</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>ramsey_policy</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-
-  <para>All options for <xref linkend="stoch_simul"/>, plus:</para>
-  <variablelist>
-    <varlistentry>
-      <term><option>planner_discount</option> = <replaceable>DOUBLE</replaceable></term>
-      <listitem><para>Declares the discount factor of the central planner. Default: <literal>1.0</literal></para></listitem>
-    </varlistentry>
-  </variablelist>
-
-  <para>Note that only first order approximation is available (<foreignphrase>i.e.</foreignphrase> <literal>order=1</literal> must be specified).</para>
-  </refsect1>
-
-  <refsect1><title>Output variables</title>
-  <para>This command generates all the output variables of <xref linkend="stoch_simul"/>.</para>
-  <para>In addition, it stores the value of planner objective function under Ramsey policy in <varname>oo_.planner_objective_value</varname>.</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="discretionary_policy">
-  <refmeta>
-    <refentrytitle>discretionary_policy</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>discretionary_policy</refname>
-    <refpurpose>computes an approximation of the optimal policy under discretion</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>discretionary_policy</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg><arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-
-  <para>Same options than <xref linkend="ramsey_policy"/>.</para>
-
-  </refsect1>
-
-</refentry>
-
-</sect1>
-
-<sect1><title>Sensitivity and identification analysis</title>
-
-<refentry id="dynare_sensitivity">
-  <refmeta>
-    <refentrytitle>dynare_sensitivity</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>dynare_sensitivity</refname>
-    <refpurpose>interface to the global sensitivity analysis (GSA) toolbox</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>dynare_sensitivity</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>This function is an interface to the global sensitivity analysis (GSA) toolbox developed by the Joint Research Center (JRC) of the European Commission. The GSA toolbox needs to be downloaded separately from the <ulink url="http://eemc.jrc.ec.europa.eu/Software-DYNARE.htm">JRC web site</ulink>.</para>
-  </refsect1>
-
-  <refsect1><title>Options</title>
-  <para>Please refer to the documentation of the GSA toolbox on the official website.</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="identification">
-  <refmeta>
-    <refentrytitle>identification</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>identification</refname>
-    <refpurpose>triggers identification analysis</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>identification</command>
-      <arg>(<replaceable>OPTION</replaceable><arg rep="repeat">, <replaceable>OPTION</replaceable></arg>)</arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>ar</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Number of lags of computed autocorrelations (theoretical moments). Default: <literal>3</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>useautocorr</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>If equal to <literal>1</literal>, compute derivatives of autocorrelation. If equal to <literal>0</literal>, compute derivatives of autocovariances. Default: <literal>1</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>load_ident_files</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>If equal to <literal>1</literal>, allow Dynare to load previously 
-      computed analyzes. Default: <literal>0</literal></para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>prior_mc</option> = <replaceable>INTEGER</replaceable></term>
-      <listitem><para>Size of Monte Carlo sample. Default: <literal>2000</literal></para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-</refentry>
-
-</sect1>
-
-<sect1><title>Displaying and saving results</title>
-<para>
-  Dynare has comments to plot the results of a simulation and to save the results.
-</para>
-<itemizedlist>
-  <listitem><para><xref linkend='rplot'/></para></listitem>
-  <listitem><para><xref linkend='dynatype'/></para></listitem>
-  <listitem><para><xref linkend='dynasave'/></para></listitem>
-</itemizedlist>
-
-<refentry id="rplot">
-  <refmeta>
-    <refentrytitle>rplot</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>rplot</refname>
-    <refpurpose>plot variables</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>rplot</command>
-      <arg choice="plain"><replaceable>VARIABLE_NAME</replaceable></arg>
-      <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-  <refsect1><title>Description</title>
-  <para>
-    Plots the simulated path of one or several variables.
-  </para>
-  </refsect1>
-</refentry>
-
-<refentry id="dynatype">
-  <refmeta>
-    <refentrytitle>dynatype</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>dynatype</refname>
-    <refpurpose>print simulated variables</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>dynatype</command>
-      <arg choice="plain">(<replaceable>FILENAME</replaceable>)</arg>
-      <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    <command>dynatype</command> prints the listed variables in a text file named <replaceable>FILENAME</replaceable>. If no <replaceable>VARIABLE_NAME</replaceable> is listed, all endogenous variables are printed.
-  </para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="dynasave">
-  <refmeta>
-    <refentrytitle>dynasave</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>dynasave</refname>
-    <refpurpose>save simulated variables in a binary file</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>dynasave</command>
-      <arg choice="plain">(<replaceable>FILENAME</replaceable>)</arg>
-      <arg rep="repeat"><replaceable>VARIABLE_NAME</replaceable></arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>
-    <command>dynasave</command> saves the listed variables in a binary file named <replaceable>FILENAME</replaceable>. If no <replaceable>VARIABLE_NAME</replaceable> are listed, all endogenous variables are saved.
-  </para>
-  <para>
-    In <trademark class="registered">MATLAB</trademark>, variables saved with the <command>dynasave</command> command can be retrieved by the <trademark class="registered">MATLAB</trademark> command <command>load -mat <replaceable>FILENAME</replaceable></command>.
-  </para>
-  </refsect1>
-</refentry>
-</sect1>
-
-<sect1 id="macrolanguage"><title>Macro-processing language</title>
-<para>It is possible to use "macro" commands in the <filename class="extension">.mod</filename> file for doing the following tasks: source file inclusion, replicating blocks of equations through loops, conditional inclusion of code...</para>
-
-<para>Technically, this macro language is totally independent of the basic Dynare language, and is processed by a separate component of the Dynare pre-processor. The macro processor transforms a <filename class="extension">.mod</filename> file with macros into a <filename class="extension">.mod</filename> file without macros (doing expansions/inclusions), and then feeds it to the Dynare parser.
-</para>
-<itemizedlist>
-  <listitem><para><xref linkend='include'/></para></listitem>
-  <listitem><para><xref linkend='define'/></para></listitem>
-  <listitem><para><xref linkend='if_else_endif'/></para></listitem>
-  <listitem><para><xref linkend='for_endfor'/></para></listitem>
-  <listitem><para><xref linkend='echo'/></para></listitem>
-  <listitem><para><xref linkend='error'/></para></listitem>
-</itemizedlist>
-
-<refentry id="include">
-  <refmeta>
-    <refentrytitle>@#include</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>@#include</refname>
-    <refpurpose>includes another file</refpurpose>
-  </refnamediv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="define">
-  <refmeta>
-    <refentrytitle>@#define</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>@#define</refname>
-    <refpurpose>defines a macro-variable</refpurpose>
-  </refnamediv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="if_else_endif">
-  <refmeta>
-    <refentrytitle>@#if ... @#else ... @#endif</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>@#if ... @#else ... @#endif</refname>
-    <refpurpose>conditional inclusion of some part of the <filename class="extension">.mod</filename> file</refpurpose>
-  </refnamediv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="for_endfor">
-  <refmeta>
-    <refentrytitle>@#for ... @#endfor</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>@#for ... @#endfor</refname>
-    <refpurpose>loop for replications of portions of the <filename class="extension">.mod</filename> file</refpurpose>
-  </refnamediv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-</refentry>
-
-<refentry id="echo">
-  <refmeta>
-    <refentrytitle>@#echo</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>@#echo</refname>
-    <refpurpose>asks the preprocessor to display some message on standard output</refpurpose>
-  </refnamediv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="error">
-  <refmeta>
-    <refentrytitle>@#error</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>@#error</refname>
-    <refpurpose>asks the preprocessor to display some error message on standard output and to abort</refpurpose>
-  </refnamediv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-
-</refentry>
-
-</sect1>
-
-<sect1><title>Misc commands</title>
-
-<itemizedlist>
-  <listitem><para><xref linkend="save_params_and_steady_state"/></para></listitem>
-  <listitem><para><xref linkend="load_params_and_steady_state"/></para></listitem>
-  <listitem><para><xref linkend="bvar_density"/></para></listitem>
-  <listitem><para><xref linkend="bvar_forecast"/></para></listitem>
-</itemizedlist>
-
-<refentry id="save_params_and_steady_state">
-  <refmeta>
-    <refentrytitle>save_params_and_steady_state</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>save_params_and_steady_state</refname>
-    <refpurpose>saves the values of the parameters and of the computed steady-state in a file</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>save_params_and_steady_state</command>
-      <arg choice="plain"><replaceable>FILENAME</replaceable></arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1>
-    <title>Description</title>
-    <para>For all parameters, endogenous and exogenous variables, stores
-    their value in a text file, using a simple name/value associative table.</para>
-    <itemizedlist>
-      <listitem><para>for parameters, the value is taken from the last parameter
-      initialization</para></listitem>
-      <listitem><para>for exogenous, the value is taken from the last initval block</para></listitem>
-      <listitem><para>for endogenous, the value is taken from the last steady state computation
-      (or, if no steady state has been computed, from the last initval block)</para></listitem>
-    </itemizedlist>
-    <para>Note that no variable type is stored in the file, so that the values
-    can be reloaded (with <xref linkend="load_params_and_steady_state"/>) in a setup where
-    the variable types are different.</para>
-    <para>The typical usage of this function is to compute the steady-state of a
-    model by calibrating the steady-state value of some endogenous variables (which implies that some parameters must be endogeneized
-    during the steady-state computation).</para>
-    <para>You would then write a first <filename class="extension">.mod</filename> file which computes the steady state and saves the result of the
-    computation at the end of the file, using <command>save_params_and_steady_state</command>.</para>
-    <para>In a second file designed to perform the actual simulations, you would use <xref linkend="load_params_and_steady_state"/> just after
-    your variable declarations, in order to load the steady state previously computed (including the parameters which had been
-    endogeneized during the steady state computation).</para>
-    <para>The need for two separate <filename class="extension">.mod</filename> files arises from the fact that the variable declarations differ between the files for
-    steady state calibration and for simulation (the set of endogenous and parameters differ between the two); this leads
-    to different <xref linkend="var"/> and <xref linkend="parameters"/> statements.</para>
-    <para>Also note that you can take advantage of the <xref linkend="include"/> directive to share the model equations between the two files.</para>
-  </refsect1>
-</refentry>
-
-<refentry id="load_params_and_steady_state">
-  <refmeta>
-    <refentrytitle>load_params_and_steady_state</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>load_params_and_steady_state</refname>
-    <refpurpose>loads the values of the parameters and of the steady-state from a file</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>load_params_and_steady_state</command>
-      <arg choice="plain"><replaceable>FILENAME</replaceable></arg>
-      <arg choice="plain">;</arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1>
-    <title>Description</title>
-    <para>For all parameters, endogenous and exogenous variables, loads
-    their value from a file created with <command>save_params_and_steady_state</command>.</para>
-    <itemizedlist>
-      <listitem><para>for parameters, their value will be initialized as if they
-      had been calibrated in the <filename class="extension">.mod</filename> file</para></listitem>
-      <listitem><para>for endogenous and exogenous, their value will be initialized
-      as they would have been from an initval block</para></listitem>
-    </itemizedlist>
-    <para>This function is used in conjunction with <xref linkend="save_params_and_steady_state"/>;
-    see the documentation of that function for more information.</para>
-  </refsect1>
-</refentry>
-
-<refentry id="bvar_density">
-  <refmeta>
-    <refentrytitle>bvar_density</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>bvar_density</refname>
-    <refpurpose>computes the marginal density of an estimated BVAR model, using Minnesota priors</refpurpose>
-  </refnamediv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-
-</refentry>
-
-<refentry id="bvar_forecast">
-  <refmeta>
-    <refentrytitle>bvar_forecast</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>bvar_forecast</refname>
-    <refpurpose>computes in-sample or out-sample forecasts for an estimated BVAR model, using Minnesota priors</refpurpose>
-  </refnamediv>
-
-  <refsect1><title>Description</title>
-  <para>...</para>
-  </refsect1>
-
-</refentry>
-
-</sect1>
-
-</chapter>
-
-<chapter id="conffile"><title>The Configuration File</title>
-<para>The configuration file is used to provide Dynare with information not related to the model (and hence not placed in the model file). At the moment, it is only used when using Dynare to run parallel computations.</para>
-
-<para>On Linux and Mac OS X, the default location of the configuration file is <filename>$HOME/.dynare</filename>, while on Windows it is <filename>%APPDATA%\dynare.ini</filename> (typically <filename>C:\Documents and Settings\<replaceable>USERNAME</replaceable>\Application Data\dynare.ini</filename> under Windows XP, or <filename>C:\Users\<replaceable>USERNAME</replaceable>\AppData\dynare.ini</filename> under Windows Vista or Windows 7).</para>
-
-<para>The parsing of the configuration file is case-sensitive and it should take the following form, with each option/choice pair placed on a newline:</para>
-
-<informalexample>
-  <programlisting>
-[command0]
-option0 = choice0
-option1 = choice1
-
-[command1]
-option0 = choice0
-option1 = choice1
-  </programlisting>
-</informalexample>
-
-<para>The configuration file follows a few conventions (self-explanatory conventions such as <replaceable>USER_NAME</replaceable> have been excluded for concision):
-<itemizedlist>
-  <listitem><para><replaceable>COMPUTER_NAME</replaceable> indicates the valid name of a server (<foreignphrase>e.g.</foreignphrase> <literal>localhost</literal>, <literal>server.cepremap.org</literal>) or an IP address.</para></listitem>
-  <listitem><para><replaceable>DRIVE_NAME</replaceable> indicates a valid drive name in Windows, without the trailing colon (<foreignphrase>e.g.</foreignphrase> <literal>C</literal>).</para></listitem>
-  <listitem><para><replaceable>PATH</replaceable> indicates a valid path in the underlying operating system (<foreignphrase>e.g.</foreignphrase> <literal>/home/user/dynare/matlab/</literal>).</para></listitem>
-  <listitem><para><replaceable>PATH_AND_FILE</replaceable> indicates a valid path to a file in the underlying operating system (<foreignphrase>e.g.</foreignphrase> <literal>/usr/local/MATLAB/R2010b/bin/matlab</literal>).</para></listitem>
-  <listitem><para><replaceable>BOOLEAN</replaceable> is <literal>true</literal> or <literal>false</literal>.</para></listitem>
-</itemizedlist>
-</para>
-
-<sect1><title>Parallel Configuration</title>
-
-<refentry id="cluster">
-  <refmeta>
-    <refentrytitle>[cluster]</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>[cluster]</refname>
-    <refpurpose>specifies a computing cluster</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>[cluster]</command><sbr></sbr>
-      <arg choice="plain"><option>Name</option> = <replaceable>CLUSTER_NAME</replaceable></arg><sbr></sbr>
-      <arg choice="plain"><option>Members</option> = <replaceable>NODE_NAME</replaceable><arg choice="opt">(<replaceable>WEIGHT</replaceable>)</arg>
-      <arg choice="opt" rep="repeat"><replaceable>NODE_NAME</replaceable><arg choice="opt">(<replaceable>WEIGHT</replaceable>)</arg></arg></arg>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>When working in parallel, <command>[cluster]</command> is required to specify the group of computers that will be used. It is required even if you are only invoking multiple processes on one computer.</para>
-  </refsect1>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>Name</option> = <replaceable>CLUSTER_NAME</replaceable></term>
-      <listitem><para>The reference name of this cluster.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>Members</option> = <replaceable>NODE_NAME</replaceable>[(<replaceable>WEIGHT</replaceable>)] <replaceable>NODE_NAME</replaceable>[(<replaceable>WEIGHT</replaceable>)] ...</term>
-      <listitem><para>A list of nodes that comprise the cluster with an optional computing weight specified for that node. The computing weight indicates how much more powerful one node is with respect to the others (<foreignphrase>e.g.</foreignphrase> <literal>n1(2) n2(1) n3(3)</literal>, means that <literal>n1</literal> is two times more powerful than <literal>n2</literal> whereas <literal>n3</literal> is three times more powerful than <literal>n2</literal>). Each node is separated by at least one space and the weights are in parenthesis with no spaces separating them from their node.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-[cluster]
-Name = c1
-Members = n1 n2 n3
-
-[cluster]
-Name = c2
-Members = n1(4) n2 n3
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-
-<refentry id="node">
-  <refmeta>
-    <refentrytitle>[node]</refentrytitle>
-  </refmeta>
-
-  <refnamediv>
-    <refname>[node]</refname>
-    <refpurpose>specifies a computing node</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>[node]</command><sbr></sbr>
-      <arg choice="plain"><option>Name</option> = <replaceable>NODE_NAME</replaceable></arg>
-      <sbr></sbr>
-      <arg choice="plain"><option>CPUnbr</option> =
-      <group choice="plain">
-        <replaceable>INTEGER</replaceable>
-        <arg>[<replaceable>INTEGER</replaceable>:<replaceable>INTEGER</replaceable>]</arg>
-      </group>
-      </arg>
-      <sbr></sbr>
-      <arg choice="plain"><option>ComputerName</option> = <replaceable>COMPUTER_NAME</replaceable></arg>
-      <sbr></sbr>
-      <arg choice="opt"><option>UserName</option> = <replaceable>USER_NAME</replaceable></arg>
-      <sbr></sbr>
-      <arg choice="opt"><option>Password</option> = <replaceable>PASSWORD</replaceable></arg>
-      <sbr></sbr>
-      <arg choice="opt"><option>RemoteDrive</option> = <replaceable>DRIVE_NAME</replaceable></arg>
-      <sbr></sbr>
-      <arg choice="opt"><option>RemoteDirectory</option> = <replaceable>PATH</replaceable></arg>
-      <sbr></sbr>
-      <arg choice="opt"><option>DynarePath</option> = <replaceable>PATH</replaceable></arg>
-      <sbr></sbr>
-      <arg choice="opt"><option>MatlabOctavePath</option> = <replaceable>PATH_AND_FILE</replaceable></arg>
-      <sbr></sbr>
-      <arg choice="opt"><option>SingleCompThread</option> = <replaceable>BOOLEAN</replaceable></arg>
-      <sbr></sbr>
-      <arg choice="opt"><option>OperatingSystem</option> = <replaceable>OPERATING_SYSTEM</replaceable></arg>
-      <sbr></sbr>
-    </cmdsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1><title>Description</title>
-  <para>When working in parallel, <command>[node]</command> is required for every computer that will be used. The options that are required differ, depending on the underlying operating system and whether you are working locally or remotely.</para>
-  </refsect1>
-
-  <refsect1><title>Options</title>
-  <variablelist>
-    <varlistentry>
-      <term><option>Name</option> = <replaceable>NODE_NAME</replaceable></term>
-      <listitem><para>The reference name of this node.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>CPUnbr</option> = <replaceable>INTEGER</replaceable> | [<replaceable>INTEGER</replaceable>:<replaceable>INTEGER</replaceable>]</term>
-      <listitem><para>If just one integer is passed, the number of processors to use. If a range of integers is passed, the specific processors to use (processor counting is defined to begin at one as opposed to zero). Note that using specific processors is only possible under Windows; under Linux and Mac OS X, if a range is passed the same number of processors will be used but the range will be adjusted to begin at one.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>ComputerName</option> = <replaceable>COMPUTER_NAME</replaceable></term>
-      <listitem><para>The name or IP address of the node. If you want to run locally, use <literal>localhost</literal> (case-sensitive).</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>UserName</option> = <replaceable>USER_NAME</replaceable></term>
-      <listitem><para>The username used to log into a remote system. Required for remote runs on all platforms.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>Password</option> = <replaceable>PASSWORD</replaceable></term>
-      <listitem><para>The password used to log into the remote system. Required for remote runs originating from Windows.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>RemoteDrive</option> = <replaceable>DRIVE_NAME</replaceable></term>
-      <listitem><para>The drive to be used for remote computation. Required for remote runs originating from Windows.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>RemoteDirectory</option> = <replaceable>PATH</replaceable></term>
-      <listitem><para>The directory to be used for remote computation. Required for remote runs on all platforms.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>DynarePath</option> = <replaceable>PATH</replaceable></term>
-      <listitem><para>The path to the <filename>matlab</filename> subdirectory within the Dynare installation directory. The default is the empty string.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>MatlabOctavePath</option> = <replaceable>PATH_AND_FILE</replaceable></term>
-      <listitem><para>The path to the <trademark class="registered">MATLAB</trademark> or Octave executable. The default value is <literal>matlab</literal>.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>SingleCompThread</option> = <replaceable>BOOLEAN</replaceable></term>
-      <listitem><para>Whether or not to disable <trademark class="registered">MATLAB</trademark>'s native multithreading. The default value is <literal>true</literal>.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><option>OperatingSystem</option> = <replaceable>OPERATING_SYSTEM</replaceable></term>
-      <listitem><para>The operating system associated with a node. Only necessary when creating a cluster with nodes from different operating systems.  Possible values are <literal>unix</literal> or <literal>windows</literal>. There is no default value.</para></listitem>
-    </varlistentry>
-  </variablelist>
-  </refsect1>
-
-  <refsect1><title>Example</title>
-  <informalexample>
-    <programlisting>
-[node]
-Name = n1
-ComputerName = localhost
-CPUnbr = 1
-
-[node]
-Name = n2
-ComputerName = dynserv.cepremap.org
-CPUnbr = 5
-UserName = usern
-RemoteDirectory = /home/usern/Remote
-DynarePath = /home/usern/dynare/matlab
-MatlabOctavePath = matlab
-
-[node]
-Name = n3
-ComputerName = dynserv.dynare.org
-CPUnbr = [2:4]
-UserName = usern
-RemoteDirectory = /home/usern/Remote
-DynarePath = /home/usern/dynare/matlab
-MatlabOctavePath = matlab
-    </programlisting>
-  </informalexample>
-  </refsect1>
-</refentry>
-</sect1>
-
-</chapter>
-
-<chapter>
-  <title>Examples</title>
-  <para>Dynare comes with a database of example <filename class="extension">.mod</filename> files, which are designed to show a broad range of Dynare features, and are taken from academic papers for most of them. You should have these files in the <filename class="directory">examples</filename> subdirectory of your distribution.</para>
-  <para>Here is a short list of the examples included. For a more complete description, please refer to the comments inside the files themselves.</para>
-  <variablelist>
-    <varlistentry>
-      <term><filename>ramst.mod</filename></term>
-      <listitem><para>An elementary real business cycle (RBC) model, simulated in a deterministic setup.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><filename>example1.mod</filename></term>
-      <term><filename>example2.mod</filename></term>
-      <listitem><para>Two examples of a small RBC model in a stochastic setup, presented in <xref linkend="collard_2001"/> (see the file <filename>guide.pdf</filename> which comes with Dynare).</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><filename>fs2000.mod</filename></term>
-      <listitem><para>A cash in advance model, estimated by <xref linkend="schorfheide_2000"/>.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><filename>fs2000_nonstationary.mod</filename></term>
-      <listitem><para>The same model than <filename>fs2000.mod</filename>, but written in non-stationary form. Detrending of the equations is done by Dynare.</para></listitem>
-    </varlistentry>
-    <varlistentry>
-      <term><filename>bkk.mod</filename></term>
-      <listitem><para>Multi-country RBC model with time to build, presented in <xref linkend="backus-kehoe-kydland_1992"/>.</para></listitem>
-    </varlistentry>
-  </variablelist>
-</chapter>
-
-<bibliography>
-
-  <biblioentry id="boucekkine_1995" xreflabel="Boucekkine (1995)">
-    <biblioset relation="article">
-      <author>
-        <surname>Boucekkine</surname>
-        <firstname>Raouf</firstname>
-      </author>
-      <pubdate>1995</pubdate>
-      <title>An alternative methodology for solving nonlinear forward-looking models</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of Economic Dynamics and Control</title>
-      <volumenum>19</volumenum>
-      <pagenums>711-734</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="collard-juillard_2001a" xreflabel="Collard and Juillard (2001a)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Collard</surname>
-          <firstname>Fabrice</firstname>
-        </author>
-        <author>
-          <surname>Juillard</surname>
-          <firstname>Michel</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2001</pubdate>
-      <title>Accuracy of stochastic perturbation methods: The case of asset pricing models</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of Economic Dynamics and Control</title>
-      <volumenum>25</volumenum>
-      <pagenums>979-999</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="collard-juillard_2001b" xreflabel="Collard and Juillard (2001b)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Collard</surname>
-          <firstname>Fabrice</firstname>
-        </author>
-        <author>
-          <surname>Juillard</surname>
-          <firstname>Michel</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2001</pubdate>
-      <title>A Higher-Order Taylor Expansion Approach to Simulation of Stochastic Forward-Looking Models with an Application to a Non-Linear Phillips Curve</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Computational Economics</title>
-      <volumenum>17</volumenum>
-      <pagenums>125-139</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="durbin-koopman_2001" xreflabel="Durbin and Koopman (2001)">
-    <biblioset relation="book">
-      <authorgroup>
-        <author>
-          <surname>Durbin</surname>
-          <firstname>J.</firstname>
-        </author>
-        <author>
-          <surname>Koopman</surname>
-          <firstname>S.J.</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2001</pubdate>
-      <title>Time Series Analysis by State Space Methods</title>
-      <publishername>Oxford University Press</publishername>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="fair-taylor_1983" xreflabel="Fair and Taylor (1983)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Fair</surname>
-          <firstname>Ray</firstname>
-        </author>
-        <author>
-          <surname>Taylor</surname>
-          <firstname>John</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>1983</pubdate>
-      <title>Solution and Maximum Likelihood Estimation of Dynamic Nonlinear Rational Expectation Models</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Econometrica</title>
-      <volumenum>51</volumenum>
-      <pagenums>1169-1185</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="fernandez-villaverde-rubio-ramirez_2004" xreflabel="Fernandez-Villaverde and Rubio-Ramirez (2004)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Fernandez-Villaverde</surname>
-          <firstname>Jesus</firstname>
-        </author>
-        <author>
-          <surname>Rubio-Ramirez</surname>
-          <firstname>Juan</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2004</pubdate>
-      <title>Comparing Dynamic Equilibrium Economies to Data: A Bayesian Approach</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of Econometrics</title>
-      <volumenum>123</volumenum>
-      <pagenums>153-187</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="ireland_2004" xreflabel="Ireland (2004)">   
-    <biblioset relation="article">
-      <author>
-        <surname>Ireland</surname>
-        <firstname>Peter</firstname>
-      </author>
-      <pubdate>2004</pubdate>
-      <title>A Method for Taking Models to the Data</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of Economic Dynamics and Control</title>
-      <volumenum>28</volumenum>
-      <pagenums>1205-26</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="judd_1996" xreflabel="Judd (1996)">  
-    <biblioset relation="article">
-      <author>
-        <surname>Judd</surname>
-        <firstname>Kenneth</firstname>
-      </author>
-      <pubdate>1996</pubdate>    
-      <title>Approximation, Perturbation, and Projection Methods in Economic Analysis</title>
-    </biblioset>
-
-    <biblioset relation="book">
-      <authorgroup>
-        <author>
-          <surname>Amman</surname>
-          <firstname>Hans</firstname>
-        </author>
-        <author>
-          <surname>Kendrick</surname>
-          <firstname>David</firstname>
-        </author>
-        <author>
-          <surname>Rust</surname>
-          <firstname>John</firstname>
-        </author>
-      </authorgroup>
-      <title>Handbook of Computational Economics</title>
-      <pubdate>1996</pubdate>
-      <publishername>North Holland Press</publishername>
-      <pagenums>511-585</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="juillard_1996" xreflabel="Juillard (1996)">
-    <biblioset relation="article">
-      <author>
-        <surname>Juillard</surname>
-        <firstname>Michel</firstname>
-      </author>
-      <pubdate>1996</pubdate>
-      <title>Dynare: A program for the resolution and simulation of dynamic models with forward variables through the use of a relaxation algorithm</title>
-    </biblioset>
-    <biblioset relation="wpseries">
-      <orgname>CEPREMAP</orgname>
-      <title>Couverture Orange</title>
-      <volumenum>9602</volumenum>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="koopman-durbin_2003" xreflabel="Koopman and Durbin (2003)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Koopman</surname>
-          <firstname>S.J.</firstname>
-        </author>
-        <author>
-          <surname>Durbin</surname>
-          <firstname>J.</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2003</pubdate>
-      <title>Filtering and Smoothing of State Vector for Diffuse State Space Models</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of Time Series Analysis</title>
-      <volumenum>24</volumenum>
-      <issuenum>1</issuenum>
-      <pagenums>85-98</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="laffargue_1990" xreflabel="Laffargue (1990)">
-    <biblioset relation="article">
-      <author>
-        <surname>Laffargue</surname>
-        <firstname>Jean-Pierre</firstname>
-      </author>
-      <title>Résolution d'un modèle macroéconomique avec anticipations rationnelles</title>
-      <pubdate>1990</pubdate>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Annales d'Économie et Statistique</title>
-      <volumenum>17</volumenum>
-      <pagenums>97-119</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="lubik-schorfheide_2007" xreflabel="Lubik and Schorfheide (2007)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Lubik</surname>
-          <firstname>Thomas</firstname>
-        </author>
-        <author>
-          <surname>Schorfheide</surname>
-          <firstname>Frank</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2007</pubdate>
-      <title>Do Central Banks Respond to Exchange Rate Movements? A Structural Investigation</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of Monetary Economics</title>
-      <volumenum>54</volumenum>
-      <issuenum>4</issuenum>
-      <pagenums>1069-1087</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="bib_userguide" xreflabel="Mancini-Griffoli (2007)">
-    <author>
-      <surname>Mancini-Griffoli</surname>
-      <firstname>Tommaso</firstname>
-    </author>
-    <pubdate>2007</pubdate>
-    <title>Dynare User Guide</title>
-    <subtitle>An introduction to the solution and estimation of DSGE models</subtitle>
-  </biblioentry>
-
-  <biblioentry id="rabanal-rubio-ramirez_2003" xreflabel="Rabanal and Rubio-Ramirez (2003)"> 
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Rabanal</surname>
-          <firstname>Pau</firstname>
-        </author>
-        <author>
-          <surname>Rubio-Ramirez</surname>
-          <firstname>Juan</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2003</pubdate>
-      <title>Comparing New Keynesian Models of the Business Cycle: A Bayesian Approach</title>
-    </biblioset>
-    <biblioset relation="wpseries">
-      <orgname>Federal Reserve of Atlanta</orgname>
-      <title>Working Paper Series</title>
-      <volumenum>2003-30</volumenum>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="schorfheide_2000" xreflabel="Schorfheide (2000)"> 
-    <biblioset relation="article">
-      <author>
-        <surname>Schorfheide</surname>
-        <firstname>Frank</firstname>
-      </author>
-      <pubdate>2000</pubdate>
-      <title>Loss Function-based evaluation of DSGE models</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of Applied Econometrics</title>
-      <volumenum>15</volumenum>
-      <issuenum>6</issuenum>
-      <pagenums>645-670</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="schmitt-grohe-uribe_2002" xreflabel="Schmitt-Grohe and Uribe (2002)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Schmitt-Grohe</surname>
-          <firstname>Stephanie</firstname>
-        </author>
-        <author>
-          <surname>Uribe</surname>
-          <firstname>Martin</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2002</pubdate>
-      <title>Solving Dynamic General Equilibrium Models Using a Second-Order Approximation to the Policy Function</title>
-    </biblioset>
-    <biblioset relation="wpseries">
-      <title>NBER Technical Working Papers</title>
-      <volumenum>0282</volumenum>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="smets-wouters_2003" xreflabel="Smets and Wouters (2003)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Smets</surname>
-          <firstname>Frank</firstname>
-        </author>
-        <author>
-          <surname>Wouters</surname>
-          <firstname>Rafael</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2003</pubdate>
-      <title>An Estimated Dynamic Stochastic General Equilibrium Model of the Euro Area</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of the European Economic Association</title>
-      <volumenum>1</volumenum>
-      <issuenum>5</issuenum>
-      <pagenums>1123-1175</pagenums>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="collard_2001" xreflabel="Collard (2001)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Collard</surname>
-          <firstname>Fabrice</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2001</pubdate>
-      <title>Stochastic simulations with Dynare: A practical guide</title>
-    </biblioset>
-  </biblioentry>
-
-  <biblioentry id="backus-kehoe-kydland_1992" xreflabel="Backus, Kehoe and Kydland (1992)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Backus</surname>
-          <firstname>David K.</firstname>
-        </author>
-        <author>
-          <surname>Kehoe</surname>
-          <firstname>Patrick J.</firstname>
-        </author>
-        <author>
-          <surname>Kydland</surname>
-          <firstname>Finn E.</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>1992</pubdate>
-      <title>International Real Business Cycles</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of Political Economy</title>
-      <volumenum>100</volumenum>
-      <issuenum>4</issuenum>
-      <pagenums>745-775</pagenums>
-    </biblioset>
-
-  </biblioentry>
-
-  <biblioentry id="kim-kim-schaumburg-sims_2008" xreflabel="Kim, Kim, Schaumburg and Sims (2008)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Kim</surname>
-          <firstname>Jinill</firstname>
-        </author>
-        <author>
-          <surname>Kim</surname>
-          <firstname>Sunghyun</firstname>
-        </author>
-        <author>
-          <surname>Schaumburg</surname>
-          <firstname>Ernst</firstname>
-        </author>
-        <author>
-          <surname>Sims</surname>
-          <firstname>Christopher A.</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>2008</pubdate>
-      <title>Calculating and using second-order accurate solutions of discrete time dynamic equilibrium models</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Journal of Economic Dynamics and Control</title>
-      <volumenum>32</volumenum>
-      <issuenum>11</issuenum>
-      <pagenums>3397-3414</pagenums>
-    </biblioset>
-
-  </biblioentry>
-
-  <biblioentry id="pearlman-currie-levine_1986" xreflabel="Pearlman, Currie and Levine (1986)">
-    <biblioset relation="article">
-      <authorgroup>
-        <author>
-          <surname>Pearlman</surname>
-          <firstname>Joseph</firstname>
-        </author>
-        <author>
-          <surname>Currie</surname>
-          <firstname>David</firstname>
-        </author>
-        <author>
-          <surname>Levine</surname>
-          <firstname>Paul</firstname>
-        </author>
-      </authorgroup>
-      <pubdate>1986</pubdate>
-      <title>Rational expectations models with partial information</title>
-    </biblioset>
-    <biblioset relation="journal">
-      <title>Economic Modelling</title>
-      <volumenum>3</volumenum>
-      <issuenum>2</issuenum>
-      <pagenums>90-105</pagenums>
-    </biblioset>
-  </biblioentry>
-
-</bibliography>
-</book>
diff --git a/license.txt b/license.txt
index 33b7ea197c7c2f30ddec883180a1bf1b3b9e3ba5..edb4717af4e17f329194e40b8c537551e61b5c2a 100644
--- a/license.txt
+++ b/license.txt
@@ -109,7 +109,7 @@ License: GPL-3+
  along with Octave; see the file COPYING.  If not, see
  <http://www.gnu.org/licenses/>.
 
-Files: doc/manual.xml, doc/*.tex, doc/*.svg, doc/*.dia, doc/*.pdf, doc/*.bib
+Files: doc/dynare.texi, doc/*.tex, doc/*.svg, doc/*.dia, doc/*.pdf, doc/*.bib
 Copyright: 1996-2011, Dynare Team
 License: GFDL-1.3+
  Permission is granted to copy, distribute and/or modify this document
@@ -231,36 +231,6 @@ License:
  permitted in any medium without royalty provided the copyright notice
  and this notice are preserved.
 
-Files: m4/ax_check_docbook_xslt_min.m4, m4/ax_prog_xsltproc.m4
-Copyright: 2008-2009, Zmanda Inc. <http://www.zmanda.com/>
-           2008-2009, Dustin J. Mitchell <dustin@zmanda.com>
-License: GPL-2+ with special Autoconf exception
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
- .
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- Public License for more details.
- .
- You should have received a copy of the GNU General Public License along
- with this program. If not, see <http://www.gnu.org/licenses/>.
- .
- As a special exception, the respective Autoconf Macro's copyright owner
- gives unlimited permission to copy, distribute and modify the configure
- scripts that are the output of Autoconf when processing the Macro. You
- need not follow the terms of the GNU General Public License when using
- or distributing such scripts, even though portions of the text of the
- Macro appear in them. The GNU General Public License (GPL) does govern
- all other use of the material that constitutes the Autoconf Macro.
- .
- This special exception to the GPL applies to versions of the Autoconf
- Macro released by the Autoconf Archive. When you make and distribute a
- modified version of the Autoconf Macro, you may extend this special
- exception to the GPL to apply to your modified version as well.
-
 Files: m4/ax_compare_version.m4
 Copyright: 2008, Tim Toolan <toolan@ele.uri.edu>
 License:
diff --git a/m4/ax_check_docbook_xslt_min.m4 b/m4/ax_check_docbook_xslt_min.m4
deleted file mode 100644
index d598d273b2fcb34a31a8c0637e868057f6276e63..0000000000000000000000000000000000000000
--- a/m4/ax_check_docbook_xslt_min.m4
+++ /dev/null
@@ -1,108 +0,0 @@
-# ===========================================================================
-#    http://www.nongnu.org/autoconf-archive/ax_check_docbook_xslt_min.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_CHECK_DOCBOOK_XSLT_MIN(min-xslt-version)
-#
-# DESCRIPTION
-#
-#   Check that the 'current' version of docbook is at least version
-#   min-xslt-version. If the test is successful,
-#   $DOCBOOK_XSLT_CURRENT_VERSION will be set to the current docbook
-#   version; if not, it will be set to 'no'.
-#
-#   Example:
-#
-#    AX_CHECK_DOCBOOK_XSLT_MIN(1.72.0)
-#    if test "x$DOCBOOK_XSLT_CURRENT_VERSION" = "xno"; then
-#    ...
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Zmanda Inc. <http://www.zmanda.com/>
-#   Copyright (c) 2008 Dustin J. Mitchell <dustin@zmanda.com>
-#
-#   This program is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation; either version 2 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-
-AU_ALIAS([AC_CHECK_DOCBOOK_XSLT_MIN], [AX_CHECK_DOCBOOK_XSLT_MIN])
-AC_DEFUN([AX_CHECK_DOCBOOK_XSLT_MIN],
-[
-    AC_REQUIRE([AX_PROG_XSLTPROC])
-
-    AC_CACHE_CHECK([for current Docbook XSLT version], [ac_cv_docbook_xslt_current_version],
-    [
-        ac_cv_docbook_xslt_current_version=no
-
-        if test -n "$XSLTPROC"; then
-            cat >conftest.xsl <<EOF
-                <xsl:stylesheet
-                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                    xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
-                    version="1.0">
-                    <xsl:output method="text"/>
-                    <xsl:template match="fm:project/fm:Version">
-                        <xsl:value-of select="." />
-                    </xsl:template>
-                    <!-- do nothing with any other text -->
-                    <xsl:template match="text()"/>
-                </xsl:stylesheet>
-EOF
-            echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/current/VERSION' with input:" >&AS_MESSAGE_LOG_FD
-            echo "====" >&AS_MESSAGE_LOG_FD
-            cat conftest.xsl >&AS_MESSAGE_LOG_FD
-            echo "====" >&AS_MESSAGE_LOG_FD
-
-            ac_cv_docbook_xslt_current_version=`$XSLTPROC $XSLTPROC_FLAGS conftest.xsl http://docbook.sourceforge.net/release/xsl/current/VERSION 2>&AS_MESSAGE_LOG_FD`
-
-            if test "$?" != 0; then
-                ac_cv_docbook_xslt_current_version='no'
-            fi
-
-            rm conftest.xsl
-        fi
-    ])
-
-    DOCBOOK_XSLT_CURRENT_VERSION="$ac_cv_docbook_xslt_current_version"
-    AC_MSG_CHECKING([whether Docbook XSLT version is $1 or newer])
-
-    if test x"$DOCBOOK_XSLT_CURRENT_VERSION" = x"no"; then
-        AC_MSG_RESULT([no])
-    else
-        AX_COMPARE_VERSION([$DOCBOOK_XSLT_CURRENT_VERSION], [lt], [$1], [
-            # version is less than required, so mark it as "no"
-            DOCBOOK_XSLT_CURRENT_VERSION=no
-        ])
-
-        if test x"$DOCBOOK_XSLT_CURRENT_VERSION" = x"no"; then
-            AC_MSG_RESULT([no])
-        else
-            AC_MSG_RESULT([yes ($DOCBOOK_XSLT_CURRENT_VERSION)])
-        fi
-    fi
-])
diff --git a/m4/ax_prog_xsltproc.m4 b/m4/ax_prog_xsltproc.m4
deleted file mode 100644
index 393bd57895a85f5cfd3f0b9fec56ed05db6db5ee..0000000000000000000000000000000000000000
--- a/m4/ax_prog_xsltproc.m4
+++ /dev/null
@@ -1,95 +0,0 @@
-# ===========================================================================
-#        http://www.nongnu.org/autoconf-archive/ax_prog_xsltproc.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_PROG_XSLTPROC([default-flags])
-#
-# DESCRIPTION
-#
-#   Find an xsltproc executable.
-#
-#   Input:
-#
-#   "default-flags" is the default $XSLTPROC_FLAGS, which will be overridden
-#   if the user specifies --with-xsltproc-flags.
-#
-#   Output:
-#
-#   $XSLTPROC contains the path to xsltproc, or is empty if none was found
-#   or the user specified --without-xsltproc. $XSLTPROC_FLAGS contains the
-#   flags to use with xsltproc.
-#
-# LICENSE
-#
-#   Copyright (c) 2008,2009 Zmanda Inc. <http://www.zmanda.com/>
-#   Copyright (c) 2008,2009 Dustin J. Mitchell <dustin@zmanda.com>
-#
-#   This program is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation; either version 2 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-
-AU_ALIAS([AC_PROG_XSLTPROC], [AX_PROG_XSLTPROC])
-AC_DEFUN([AX_PROG_XSLTPROC],
-[
-XSLTPROC_FLAGS="$1"
-AC_SUBST(XSLTPROC_FLAGS)
-
-# The (lack of) whitespace and overquoting here are all necessary for
-# proper formatting.
-AC_ARG_WITH(xsltproc,
-AS_HELP_STRING([--with-xsltproc[[[[[=PATH]]]]]],
-               [Use the xsltproc binary in in PATH.]),
-    [ ac_with_xsltproc=$withval; ],
-    [ ac_with_xsltproc=maybe; ])
-
-AC_ARG_WITH(xsltproc-flags,
-AS_HELP_STRING([  --with-xsltproc-flags=FLAGS],
-               [Flags to pass to xsltproc (default $1)]),
-    [ if test "x$withval" == "xno"; then
-	XSLTPROC_FLAGS=''
-    else
-	if test "x$withval" != "xyes"; then
-	    XSLTPROC_FLAGS="$withval"
-	fi
-    fi
-	])
-
-# search for xsltproc if it wasn't specified
-if test "$ac_with_xsltproc" = "yes" -o "$ac_with_xsltproc" = "maybe"; then
-    AC_PATH_PROGS(XSLTPROC,xsltproc)
-else
-    if test "$ac_with_xsltproc" != "no"; then
-        if test -x "$ac_with_xsltproc"; then
-            XSLTPROC="$ac_with_xsltproc";
-        else
-            AC_MSG_WARN([Specified xsltproc of $ac_with_xsltproc isn't])
-            AC_MSG_WARN([executable; searching for an alternative.])
-            AC_PATH_PROGS(XSLTPROC,xsltproc)
-        fi
-    fi
-fi
-])
diff --git a/windows/dynare.nsi b/windows/dynare.nsi
index d314893773ff7d8f4e9d823207fcfd4686b16532..90595d59b842daaa1020e4e118aea92abdc6b5a9 100644
--- a/windows/dynare.nsi
+++ b/windows/dynare.nsi
@@ -120,10 +120,10 @@ SectionEnd
 
 Section "Documentation and examples (Dynare and Dynare++)"
  SetOutPath $INSTDIR\doc
- File ..\doc\manual.pdf ..\doc\guide.pdf ..\doc\userguide\UserGuide.pdf ..\doc\bvar-a-la-sims.pdf ..\doc\dr.pdf ..\doc\macroprocessor\macroprocessor.pdf ..\doc\preprocessor\preprocessor.pdf ..\doc\parallel\parallel.pdf ..\doc\gsa\gsa.pdf
+ File ..\doc\dynare.pdf ..\doc\guide.pdf ..\doc\userguide\UserGuide.pdf ..\doc\bvar-a-la-sims.pdf ..\doc\dr.pdf ..\doc\macroprocessor\macroprocessor.pdf ..\doc\preprocessor\preprocessor.pdf ..\doc\parallel\parallel.pdf ..\doc\gsa\gsa.pdf
 
- SetOutPath $INSTDIR\doc\manual-html
- File ..\doc\manual-html\*.html
+ SetOutPath $INSTDIR\doc\dynare.html
+ File ..\doc\dynare.html\*.html ..\doc\dynare.html\*.png
 
  SetOutPath $INSTDIR\doc\dynare++
  File ..\dynare++\doc\dynare++-tutorial.pdf ..\dynare++\doc\dynare++-ramsey.pdf ..\dynare++\sylv\sylvester.pdf ..\dynare++\tl\cc\tl.pdf ..\dynare++\integ\cc\integ.pdf ..\dynare++\kord\kord.pdf