Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • giovanma/dynare
  • giorgiomas/dynare
  • Vermandel/dynare
  • Dynare/dynare
  • normann/dynare
  • MichelJuillard/dynare
  • wmutschl/dynare
  • FerhatMihoubi/dynare
  • sebastien/dynare
  • lnsongxf/dynare
  • rattoma/dynare
  • CIMERS/dynare
  • FredericKarame/dynare
  • SumuduK/dynare
  • MinjeJeon/dynare
  • camilomrch/dynare
  • DoraK/dynare
  • avtishin/dynare
  • selma/dynare
  • claudio_olguin/dynare
  • jeffjiang07/dynare
  • EthanSystem/dynare
  • stepan-a/dynare
  • wjgatt/dynare
  • JohannesPfeifer/dynare
  • gboehl/dynare
  • chskcau/dynare-doc-fixes
27 results
Show changes
Showing
with 1055 additions and 12385 deletions
...@@ -79,7 +79,7 @@ p.footer { ...@@ -79,7 +79,7 @@ p.footer {
</ul> </ul>
</div> </div>
<h2>AIM Solver Subsystem<a name="1"></a></h2> <h2>AIM Solver Subsystem<a name="1"></a></h2>
<p>The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains Matlab functions necessary for using <p>The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains MATLAB functions necessary for using
Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see <a href="http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html</a> ). Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see <a href="http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html</a> ).
</p> </p>
<p>It cosists of:</p> <p>It cosists of:</p>
...@@ -92,7 +92,7 @@ p.footer { ...@@ -92,7 +92,7 @@ p.footer {
</div> </div>
<div> <div>
<ul> <ul>
<li>A subset of Matlab routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned <li>A subset of MATLAB routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned
by dynAIMsolver1 whose names start with SP.. of which <b>SPAmalg.m</b> is the main driver: by dynAIMsolver1 whose names start with SP.. of which <b>SPAmalg.m</b> is the main driver:
</li> </li>
</ul> </ul>
...@@ -215,7 +215,7 @@ p.footer { ...@@ -215,7 +215,7 @@ p.footer {
can produce ~ one order closer results to the Dynare solutiion can produce ~ one order closer results to the Dynare solutiion
then when if plain jacobia_ is passed, then when if plain jacobia_ is passed,
i.e. diff &lt; e-14 for aa and diff &lt; *e-13 for jacobia_ if Q' is used.</pre><p>GP July 2008</p> i.e. diff &lt; e-14 for aa and diff &lt; *e-13 for jacobia_ if Q' is used.</pre><p>GP July 2008</p>
<p>part of DYNARE, copyright Dynare Team (1996-2008) Gnu Public License.</p> <p>part of Dynare, copyright Dynare Team (1996-2008) Gnu Public License.</p>
<p class="footer"><br> <p class="footer"><br>
Published with MATLAB&reg; 7.1<br></p> Published with MATLAB&reg; 7.1<br></p>
</div> </div>
...@@ -225,7 +225,7 @@ p.footer { ...@@ -225,7 +225,7 @@ p.footer {
%% AIM Solver Subsystem %% AIM Solver Subsystem
% The AIM subsystem in the AIM subdirectory of the main Dynare matlab % The AIM subsystem in the AIM subdirectory of the main Dynare matlab
% directory contains Matlab functions necessary for using % directory contains MATLAB functions necessary for using
% Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html ). % Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html ).
% %
% It cosists of: % It cosists of:
...@@ -236,7 +236,7 @@ p.footer { ...@@ -236,7 +236,7 @@ p.footer {
% gu=dr.hgu from the AIM outputs. ("1" in the title is for 1st order % gu=dr.hgu from the AIM outputs. ("1" in the title is for 1st order
% solver). % solver).
% %
% * A subset of Matlab routines from Gary Anderson's own AIM package needed to compute % * A subset of MATLAB routines from Gary Anderson's own AIM package needed to compute
% and solve system passed on and returned by dynAIMsolver1 whose names start with SP.. % and solve system passed on and returned by dynAIMsolver1 whose names start with SP..
% of which *SPAmalg.m* is the main driver: % of which *SPAmalg.m* is the main driver:
% %
...@@ -394,10 +394,10 @@ p.footer { ...@@ -394,10 +394,10 @@ p.footer {
% %
% GP July 2008 % GP July 2008
% %
% part of DYNARE, copyright Dynare Team (1996-2008) % part of Dynare, copyright Dynare Team (1996-2008)
% Gnu Public License. % Gnu Public License.
##### SOURCE END ##### ##### SOURCE END #####
--> -->
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -111,7 +111,7 @@ demia/Economics/Dynare%20DSGE/V4/doc/AIM/Dynare%20AIM%20use%20Doc.html#11= ...@@ -111,7 +111,7 @@ demia/Economics/Dynare%20DSGE/V4/doc/AIM/Dynare%20AIM%20use%20Doc.html#11=
<H2>AIM Solver Subsystem<A name=3D1></A></H2> <H2>AIM Solver Subsystem<A name=3D1></A></H2>
<P>The AIM subsystem in the AIM subdirectory of the main Dynare matlab = <P>The AIM subsystem in the AIM subdirectory of the main Dynare matlab =
directory=20 directory=20
contains Matlab functions necessary for using Gary Anderson's AIM 1st = contains MATLAB functions necessary for using Gary Anderson's AIM 1st =
order=20 order=20
solver as an alternative to Dynare's default mjdgges solver (see <A=20 solver as an alternative to Dynare's default mjdgges solver (see <A=20
href=3D"http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">http:/= href=3D"http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">http:/=
...@@ -129,7 +129,7 @@ AIM outputs.=20 ...@@ -129,7 +129,7 @@ AIM outputs.=20
("1" in the title is for 1st order solver). </LI></UL></DIV> ("1" in the title is for 1st order solver). </LI></UL></DIV>
<DIV> <DIV>
<UL> <UL>
<LI>A subset of Matlab routines from Gary Anderson's own AIM package = <LI>A subset of MATLAB routines from Gary Anderson's own AIM package =
needed to=20 needed to=20
compute and solve system passed on and returned by dynAIMsolver1 whose = compute and solve system passed on and returned by dynAIMsolver1 whose =
names=20 names=20
...@@ -328,7 +328,7 @@ forward looking models, passing into dynAIMsolver aa =3D{Q'|1}*jacobia_ ...@@ -328,7 +328,7 @@ forward looking models, passing into dynAIMsolver aa =3D{Q'|1}*jacobia_
i.e. diff &lt; e-14 for aa and diff &lt; *e-13 for jacobia_ if Q' = i.e. diff &lt; e-14 for aa and diff &lt; *e-13 for jacobia_ if Q' =
is used.</PRE> is used.</PRE>
<P>GP July 2008</P> <P>GP July 2008</P>
<P>part of DYNARE, copyright Dynare Team (1996-2008) Gnu Public = <P>part of Dynare, copyright Dynare Team (1996-2008) Gnu Public =
License.</P> License.</P>
<P class=3Dfooter><BR>Published with MATLAB=C2=AE 7.1<BR></P></DIV><!--=0A= <P class=3Dfooter><BR>Published with MATLAB=C2=AE 7.1<BR></P></DIV><!--=0A=
##### SOURCE BEGIN #####=0A= ##### SOURCE BEGIN #####=0A=
...@@ -336,7 +336,7 @@ License.</P> ...@@ -336,7 +336,7 @@ License.</P>
%% AIM Solver Subsystem %% AIM Solver Subsystem
% The AIM subsystem in the AIM subdirectory of the main Dynare matlab % The AIM subsystem in the AIM subdirectory of the main Dynare matlab
% directory contains Matlab functions necessary for using % directory contains MATLAB functions necessary for using
% Gary Anderson's AIM 1st order solver as an alternative to Dynare's = % Gary Anderson's AIM 1st order solver as an alternative to Dynare's =
default mjdgges solver (see = default mjdgges solver (see =
http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html ).=20 http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html ).=20
...@@ -351,7 +351,7 @@ subsystem.=20 ...@@ -351,7 +351,7 @@ subsystem.=20
% gu=3Ddr.hgu from the AIM outputs. ("1" in the title is for 1st order % gu=3Ddr.hgu from the AIM outputs. ("1" in the title is for 1st order
% solver). % solver).
% %
% * A subset of Matlab routines from Gary Anderson's own AIM package = % * A subset of MATLAB routines from Gary Anderson's own AIM package =
needed to compute needed to compute
% and solve system passed on and returned by dynAIMsolver1 whose names = % and solve system passed on and returned by dynAIMsolver1 whose names =
start with SP..=20 start with SP..=20
...@@ -544,7 +544,7 @@ used. =20 ...@@ -544,7 +544,7 @@ used. =20
% %
% GP July 2008 =20 % GP July 2008 =20
% %
% part of DYNARE, copyright Dynare Team (1996-2008) % part of Dynare, copyright Dynare Team (1996-2008)
% Gnu Public License. % Gnu Public License.
=0A= =0A=
##### SOURCE END #####=0A= ##### SOURCE END #####=0A=
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
\subsection*{AIM Solver Subsystem} \subsection*{AIM Solver Subsystem}
\begin{par} \begin{par}
The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains Matlab functions necessary for using Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see \begin{verbatim}http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html\end{verbatim} ). The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains MATLAB functions necessary for using Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see \begin{verbatim}http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html\end{verbatim} ).
\end{par} \vspace{1em} \end{par} \vspace{1em}
\begin{par} \begin{par}
It cosists of: It cosists of:
...@@ -41,7 +41,7 @@ It cosists of: ...@@ -41,7 +41,7 @@ It cosists of:
\end{itemize} \end{itemize}
\begin{itemize} \begin{itemize}
\setlength{\itemsep}{-1ex} \setlength{\itemsep}{-1ex}
\item A subset of Matlab routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned by dynAIMsolver1 whose names start with SP.. of which \textbf{SPAmalg.m} is the main driver: \item A subset of MATLAB routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned by dynAIMsolver1 whose names start with SP.. of which \textbf{SPAmalg.m} is the main driver:
\end{itemize} \end{itemize}
\begin{itemize} \begin{itemize}
\setlength{\itemsep}{-1ex} \setlength{\itemsep}{-1ex}
...@@ -235,7 +235,7 @@ Dynare use: ...@@ -235,7 +235,7 @@ Dynare use:
GP July 2008 GP July 2008
\end{par} \vspace{1em} \end{par} \vspace{1em}
\begin{par} \begin{par}
part of DYNARE, copyright Dynare Team (1996-2008) Gnu Public License. part of Dynare, copyright Dynare Team (1996-2008) Gnu Public License.
\end{par} \vspace{1em} \end{par} \vspace{1em}
......
SUBDIRS = preprocessor macroprocessor userguide parallel internals gsa dseries-and-reporting
info_TEXINFOS = dynare.texi
if HAVE_TEXI2HTML
if HAVE_LATEX2HTML
html-local: dynare.html
dynare.html: 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
if HAVE_BIBTEX
PDF_TARGETS += dr.pdf
endif
endif
pdf-local: $(PDF_TARGETS)
EXTRA_DIST = guide.tex guide.bbl bibmad.sty bvar-a-la-sims.tex dr.tex dr.bib dynare.plots
guide.pdf: guide.tex guide.bbl bibmad.sty
$(PDFLATEX) guide
$(PDFLATEX) guide
bvar-a-la-sims.pdf: bvar-a-la-sims.tex
$(PDFLATEX) bvar-a-la-sims
$(PDFLATEX) bvar-a-la-sims
dr.pdf: dr.tex
$(PDFLATEX) dr
$(BIBTEX) dr
$(PDFLATEX) dr
$(PDFLATEX) dr
clean-local:
# Do not delete guide.bbl which is not autogenerated
rm -f *~ *.pdf *.log *.aux *.out *.blg dr.bbl
\message{harvard bibliography,}
\def\@hiteml[#1]#2#3#4{\item[]\if@filesw%
{ \def\protect##1{\string ##1\space}\immediate%
\write\@auxout{\string\harvardcite{#4}{#2}{#1}{#3}}}\fi%
\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces}
\def\@hitem#1#2#3{\item[]\if@filesw%
{ \def\protect##1{\string ##1\space}\immediate%
\write\@auxout{\string\harvardcite{#3}{#1}{#1}{#2}}}\fi%
\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces}
\def\harvarditem{\@ifnextchar [{\@hiteml}{\@hitem}}
\def\harvardcite#1#2#3#4{
\global\@namedef{bhf@#1}{#2}
\global\@namedef{bha@#1}{#3}
\global\@namedef{bhy@#1}{#4}\global\@namedef{b@#1}{\csname bhf@#1\endcsname}
}
\def\citeasnoun{\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
\def\cite{\@ifnextchar [{\@tempswatrue\@citexasnoun}
{\@tempswafalse\@citexasnoun[]}
}
\def\citeyear{\@ifnextchar [{\@tempswatrue\@citexyear}
{\@tempswafalse\@citexyear[]}
}
\def\citename{\@ifnextchar [{\@tempswatrue\@citexname}
{\@tempswafalse\@citexname[]}
}
% \def\@enamedef#1{\expandafter\edef\csname #1\endcsname}
% Previous line should be replaced by the following to prevent
% problems with the NFSS. Solution by Bernd Raichle.
\def\@enamedef#1{\expandafter\def\csname #1\expandafter\endcsname\expandafter}
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
\def\@citea{}\@cite{\@for\@citeb:=#2\do
{\@citea\def\@citea{\@hisep\penalty\@m\ }\@ifundefined
{b@\@citeb}{{\bf ?}\@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
{{\csname b@\@citeb\endcsname\@hysep\csname bhy@\@citeb\endcsname}%
\global\@enamedef{b@\@citeb}{\csname bha@\@citeb\endcsname}}%
}}{#1}}
\def\@citexasnoun[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
\@citeasnoun{{\@ifundefined%
{b@#2}%
{[{\bf ?}\@warning{Citation `#2' on page \thepage \space undefined}}%
{{\csname b@#2\endcsname\ [\csname bhy@#2\endcsname}%
\global\@namedef{b@#2}{\csname bha@#2\endcsname}}%
}}{#1}}
\def\@citexname[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
\@citename{{\@ifundefined%
{b@#2}%
{{\bf ?}\@warning{Citation `#2' on page \thepage \space undefined}}%
{{\csname bhf@#2\endcsname}}%
}}{#1}}
\def\@citexyear[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
\def\@citeayear{}\@cite{\@for\@citebyear:=#2\do
{\@citeayear\def\@citeayear{\@hisep\penalty\@m\ }\@ifundefined
{b@\@citebyear}{{\bf ?}\@warning
{Citation `\@citebyear' on page \thepage \space undefined}}%
{{\csname bhy@\@citebyear\endcsname}%
}%
}}{#1}}
\gdef\hysep@agsm{\ }\gdef\hisep@agsm{,}%
\gdef\hysep@dcu{, }\gdef\hisep@dcu{;}%
\let\@hysep\hysep@agsm \let\@hisep\hisep@agsm
\def\citationstyle#1{%
\global\@namedef{@hysep}{\csname hysep@#1\endcsname}%
\global\@namedef{@hisep}{\csname hisep@#1\endcsname}}
%DEFAULT DEFINITIONS
\def\@cite#1#2{({#1\if@tempswa , #2\fi})}
\def\@citeasnoun#1#2{{#1\if@tempswa , #2\fi]}}
\def\@citename#1#2{{#1\if@tempswa \ (#2)\fi}}
% CHANGE \end{document} - to handle double definitions
\def\enddocument{\@checkend{document}\clearpage\begingroup
\if@filesw \immediate\closeout\@mainaux
\def\global\@namedef##1##2{}\def\newlabel{\@testdef r}%
\def\bibcite{\@testdef b}%
\def\harvardcite{\@testbibh}\@tempswafalse \makeatletter\input \jobname.aux
\if@tempswa \@warning{Label(s) may have changed. Rerun to get
cross-references right}\fi\fi\endgroup\deadcycles\z@\@@end}
\def\@testbibh #1#2#3{
\def\@tempa{#2}\expandafter
\ifx \csname bhf@#1\endcsname \@tempa
\def\@tempa{#3}\expandafter
\ifx \csname bha@#1\endcsname \@tempa
\else \@tempswatrue
\fi
\else
\@tempswatrue
\fi
}
%
\ No newline at end of file
...@@ -11,29 +11,29 @@ ...@@ -11,29 +11,29 @@
\begin{document} \begin{document}
\title{BVAR models ``\`a la Sims'' in Dynare\thanks{Copyright \copyright~2007--2011 S\'ebastien \title{BVAR models ``\`a la Sims'' in Dynare\thanks{Copyright \copyright~2007--2015 S\'ebastien
Villemot. Permission is granted to copy, distribute and/or modify Villemot; \copyright~2016--2017 S\'ebastien
Villemot and Johannes Pfeifer. Permission is granted to copy, distribute and/or modify
this document under the terms of the GNU Free Documentation this document under the terms of the GNU Free Documentation
License, Version 1.3 or any later version published by the Free License, Version 1.3 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover Software Foundation; with no Invariant Sections, no Front-Cover
Texts, and no Back-Cover Texts. A copy of the license can be found Texts, and no Back-Cover Texts. A copy of the license can be found
at: \url{http://www.gnu.org/licenses/fdl.txt} at: \url{https://www.gnu.org/licenses/fdl.txt}
\newline \newline
\indent Many thanks to Christopher Sims for providing his BVAR \indent Many thanks to Christopher Sims for providing his BVAR
MATLAB\textregistered~routines, to St\'ephane Adjemian and Michel Juillard MATLAB\textsuperscript{\textregistered}~routines, to St\'ephane Adjemian and Michel Juillard
for their helpful support, and to Marek Jaroci\'nski for reporting a bug. for their helpful support, and to Marek Jaroci\'nski for reporting a bug.
}} }}
\author{S\'ebastien Villemot\thanks{Paris School of Economics and \author{S\'ebastien Villemot\thanks{Paris School of Economics and
CEPREMAP. E-mail: CEPREMAP.} \and Johannes Pfeifer\thanks{University of the Bundeswehr Munich. E-mail: \href{mailto:johannes.pfeifer@unibw.de}{\texttt{johannes.pfeifer@unibw.de}}.}}
\href{mailto:sebastien@dynare.org}{\texttt{sebastien@dynare.org}}.}} \date{First version: September 2007 \hspace{1cm} This version: May 2017}
\date{First version: September 2007 \hspace{1cm} This version: August 2012}
\maketitle \maketitle
\begin{abstract} \begin{abstract}
Dynare incorporates routines for Bayesian VAR models estimation, using a Dynare incorporates routines for Bayesian VAR models estimation, using a
flavor of the so-called ``Minnesota priors,''. These routines can be used flavor of the so-called ``Minnesota priors.'' These routines can be used
alone or in parallel with a DSGE estimation. This document describes their alone or in parallel with a DSGE estimation. This document describes their
implementation and usage. implementation and usage.
\end{abstract} \end{abstract}
...@@ -169,7 +169,7 @@ $$\left[ ...@@ -169,7 +169,7 @@ $$\left[
$$\left[ $$\left[
\begin{array}{cc} \begin{array}{cc}
0 & 0 \\ 0 & 0 \\
0 & 0 0 & 0
\end{array} \end{array}
\right] \right]
= =
...@@ -435,10 +435,11 @@ p(Y^+ | X^+) & = & \frac{\int (2\pi)^{-\frac{T^+\cdot ny}{2}} f(\Phi,\Sigma | \d ...@@ -435,10 +435,11 @@ p(Y^+ | X^+) & = & \frac{\int (2\pi)^{-\frac{T^+\cdot ny}{2}} f(\Phi,\Sigma | \d
\section{Dynare commands} \section{Dynare commands}
\label{dynare-commands} \label{dynare-commands}
Dynare incorporates two commands related to BVAR models \`a la Sims: Dynare incorporates three commands related to BVAR models \`a la Sims:
\begin{itemize} \begin{itemize}
\item \texttt{bvar\_density} for computing marginal density, \item \texttt{bvar\_density} for computing marginal density,
\item \texttt{bvar\_forecast} for forecasting (and RMSE computation). \item \texttt{bvar\_forecast} for forecasting (and RMSE computation),
\item \texttt{bvar\_irf} for computing Impulse Response Functions.
\end{itemize} \end{itemize}
\subsection{Common options} \subsection{Common options}
...@@ -499,16 +500,18 @@ The syntax for computing the marginal density is: ...@@ -499,16 +500,18 @@ The syntax for computing the marginal density is:
The options are those described above. The options are those described above.
The command will actually compute the marginal density for several models: first for the model with one lag, then with two lags, and so on up to \textit{max\_number\_of\_lags} lags. The command will actually compute the marginal density for several models: first for the model with one lag, then with two lags, and so on up to \textit{max\_number\_of\_lags} lags. Results will be stored in a \textit{max\_number\_of\_lags} by 1 vector \texttt{oo\_.bvar.log\_marginal\_data\_density}. The command will also store the prior and posterior information into \textit{max\_number\_of\_lags} by 1 cell arrays \texttt{oo\_.bvar.prior} and \texttt{oo\_.bvar.posterior}.
\subsection{Forecasting} \subsection{Forecasting}
The syntax for computing (out-of-sample) forecasts is: The syntax for computing (out-of-sample) forecasts is:
\medskip \medskip
\texttt{bvar\_forecast(}\textit{options\_list}\texttt{) }\textit{max\_number\_of\_lags}\texttt{;} \texttt{bvar\_forecast(}\textit{options\_list}\texttt{) }\textit{number\_of\_lags}\texttt{;}
\medskip \medskip
In contrast to the \texttt{bvar\_density}, you need to specify the actual lag length used, not the maximum lag length. Typically, the actual lag length should be based on the results from the \texttt{bvar\_density} command.
The options are those describe above, plus a few ones: The options are those describe above, plus a few ones:
\begin{itemize} \begin{itemize}
\item \texttt{forecast}: the number of periods over which to compute forecasts after the end of the sample (no default) \item \texttt{forecast}: the number of periods over which to compute forecasts after the end of the sample (no default)
...@@ -539,6 +542,42 @@ Most results are stored for future use: ...@@ -539,6 +542,42 @@ Most results are stored for future use:
\item if RMSE has been computed, results are in \texttt{oo\_.bvar.forecast.rmse}. \item if RMSE has been computed, results are in \texttt{oo\_.bvar.forecast.rmse}.
\end{itemize} \end{itemize}
\subsection{Impulse Response Functions}
The syntax for computing impulse response functions is:
\medskip
\texttt{bvar\_irf(}\textit{number\_of\_lags},\textit{identification\_scheme}\texttt{);}
\medskip
The \textit{identification\_scheme} option has two potential values
\begin{itemize}
\item \texttt{'Cholesky'}: uses a lower triangular factorization of the covariance matrix (default),
\item \texttt{'SquareRoot'}: uses the Matrix square root of the covariance matrix (\verb+sqrtm+ matlab's routine).
\end{itemize}
Keep in mind that the first factorization of the covariance matrix is sensible to the ordering of the variables (as declared in the mod file with \verb+var+). This is not the case of the second factorization, but its structural interpretation is, at best, unclear (the Matrix square root of a covariance matrix, $\Sigma$, is the unique symmetric matrix $A$ such that $\Sigma = AA$).\newline
If you want to change the length of the IRFs plotted by the command, you can put\\
\medskip
\texttt{options\_.irf=40;}\\
\medskip
before the \texttt{bvar\_irf}-command. Similarly, to change the coverage of the highest posterior density intervals to e.g. 60\% you can put the command\\
\medskip
\texttt{options\_.bvar.conf\_sig=0.6;}\\
\medskip
there.\newline
The mean, median, variance, and confidence intervals for IRFs are saved in \texttt{oo\_.bvar.irf}
\section{Examples} \section{Examples}
This section presents two short examples of BVAR estimations. These examples and the associated datafile (\texttt{bvar\_sample.m}) can be found in the \texttt{tests/bvar\_a\_la\_sims} directory of the Dynare v4 subversion tree. This section presents two short examples of BVAR estimations. These examples and the associated datafile (\texttt{bvar\_sample.m}) can be found in the \texttt{tests/bvar\_a\_la\_sims} directory of the Dynare v4 subversion tree.
...@@ -555,6 +594,8 @@ bvar_density(datafile = bvar_sample, first_obs = 20, bvar_prior_flat, ...@@ -555,6 +594,8 @@ bvar_density(datafile = bvar_sample, first_obs = 20, bvar_prior_flat,
bvar_prior_train = 10) 8; bvar_prior_train = 10) 8;
bvar_forecast(forecast = 10, bvar_replic = 10000, nobs = 200) 8; bvar_forecast(forecast = 10, bvar_replic = 10000, nobs = 200) 8;
bvar_irf(8,'Cholesky');
\end{verbatim} \end{verbatim}
Note that you must declare twice the variables used in the estimation: first with a \texttt{var} statement, then with a \texttt{varobs} statement. This is necessary to have a syntactically correct \texttt{mod} file. Note that you must declare twice the variables used in the estimation: first with a \texttt{var} statement, then with a \texttt{varobs} statement. This is necessary to have a syntactically correct \texttt{mod} file.
......
% Encoding: UTF-8
@techreport{adjemian/al:2011,
author = {Adjemian, St\'ephane and Bastani, Houtan and Juillard, Michel and Mihoubi, Ferhat and Perendia, George and Ratto, Marco and Villemot, S\'ebastien}, @TechReport{adjemian/al:2011,
title = {Dynare: Reference Manual, Version 4}, author = {Adjemian, St\'ephane and Bastani, Houtan and Juillard, Michel and Karam\'e, Fr\'ederic and Maih, Junior and Mihoubi, Ferhat and Mutschler, Willi and Perendia, George and Pfeifer, Johannes and Ratto, Marco and Villemot, S\'ebastien},
institution = {CEPREMAP}, institution = {CEPREMAP},
year = {2011}, title = {Dynare: Reference Manual Version 4},
type = {Dynare Working Papers}, year = {2011},
number = {1} number = {1},
type = {Dynare Working Papers},
} }
@Article{blanchard/kahn:1980,
@article{blanchard/kahn:1980, author = {Blanchard, Olivier Jean and Kahn, Charles M.},
author = {Blanchard, Olivier Jean and Kahn, Charles M.}, journal = {Econometrica},
title = {The Solution of Linear Difference Models under Rational Expectations}, title = {The Solution of Linear Difference Models under Rational Expectations},
journal = {Econometrica}, year = {1980},
year = 1980, month = {7},
volume = {48}, number = {5},
number = {5}, pages = {1305-11},
pages = {1305-11}, volume = {48},
month = {July}, abstract = {Many have questioned the empirical relevance of the Calvo-Yun model. This paper adds a term structure to three widely studied macroeconomic models (Calvo-Yun, hybrid and Svensson). We back out from observations on the yield curve the underlying macroeconomic model that most closely matches the level, slope and curvature of the yield curve. With each model we trace the response of the yield curve to macroeconomic shocks. We assess the fit of each model against the observed behaviour of interest rates and find limited support for the Calvo-Yun model in terms of fit with the observed yield curve, we find some support for the hybrid model but the Svensson model performs best.},
keywords = { Macromodels Yield curve Persistence}, doi = {10.2307/1912186},
abstract = {Many have questioned the empirical relevance of the Calvo-Yun model. This paper adds a term structure to three widely studied macroeconomic models (Calvo-Yun, hybrid and Svensson). We back out from observations on the yield curve the underlying macroeconomic model that most closely matches the level, slope and curvature of the yield curve. With each model we trace the response of the yield curve to macroeconomic shocks. We assess the fit of each model against the observed behaviour of interest rates and find limited support for the Calvo-Yun model in terms of fit with the observed yield curve, we find some support for the hybrid model but the Svensson model performs best.}, keywords = {Macromodels Yield curve Persistence},
url = {http://ideas.repec.org/a/ecm/emetrp/v48y1980i5p1305-11.html}
} }
@Article{klein:2000,
@article{klein:2000, author = {Klein, Paul},
author = {Klein, Paul}, journal = {Journal of Economic Dynamics and Control},
title = {Using the generalized Schur form to solve a multivariate linear rational expectations model}, title = {Using the generalized {Schur} form to solve a multivariate linear rational expectations model},
journal = {Journal of Economic Dynamics and Control}, year = {2000},
year = 2000, month = {September},
volume = {24}, number = {10},
number = {10}, pages = {1405-1423},
pages = {1405-1423}, volume = {24},
month = {September}, doi = {10.1016/s0165-1889(99)00045-7},
keywords = {},
abstract = {},
url = {http://ideas.repec.org/a/eee/dyncon/v24y2000i10p1405-1423.html}
} }
@Article{schmitt-grohe/uribe:2004,
@article{schmitt-grohe/uribe:2004, author = {Schmitt-Groh\'{e}, Stephanie and Ur\'{i}be, Martin},
author = {Schmitt-Groh\'{e}, Stephanie and Ur\'{i}be, Martin}, journal = {Journal of Economic Dynamics and Control},
title = {Solving dynamic general equilibrium models using a second-order approximation to the policy function}, title = {Solving dynamic general equilibrium models using a second-order approximation to the policy function},
journal = {Journal of Economic Dynamics and Control}, year = {2004},
year = 2004, month = {January},
volume = {28}, number = {4},
number = {4}, pages = {755-775},
pages = {755-775}, volume = {28},
month = {January}, doi = {10.1016/s0165-1889(03)00043-5},
keywords = {},
url = {http://ideas.repec.org/a/eee/dyncon/v28y2004i4p755-775.html}
} }
@Article{sims:2001,
@article{sims:2001, author = {Sims, Christopher A},
author = {Sims, Christopher A}, journal = {Computational Economics},
title = {Solving Linear Rational Expectations Models}, title = {Solving Linear Rational Expectations Models},
journal = {Computational Economics}, year = {2002},
year = 2002, month = {October},
volume = {20}, number = {1-2},
number = {1-2}, pages = {1-20},
pages = {1-20}, volume = {20},
month = {October}, doi = {10.1023/A:1020517101123},
keywords = {},
abstract = {},
url = {http://ideas.repec.org/a/kap/compec/v20y2002i1-2p1-20.html}
} }
@InCollection{uhlig:1999,
@incollection{uhlig:1999, author = {Uhlig, Harald},
author = {Uhlig, Harald}, booktitle = {Computational Methods for the Study of Dynamic Economies},
title = {A toolkit for analysing nonlinear dynamic stochastic models easily}, publisher = {Oxford University Press},
booktitle = {Computational Methods for the Study of Dynamic Economics}, address = {Oxford},
publisher = {Oxford University Press}, title = {A toolkit for analysing nonlinear dynamic stochastic models easily},
year = {1999}, year = {1999},
editor = {Marimon, Ramon and Scott, Androw}, editor = {Marimon, Ramon and Scott, Andrew},
pages = {30-61} pages = {30-61},
} }
@techreport{kamenik:2003, @techreport{kamenik:2004,
author = {Kamenik, Ondra}, author = {Kamenik, Ondra},
title = {Solution of Specialized Sylvester Equation}, title = {Solution of Specialized Sylvester Equation},
institution = {Manuscript}, institution = {Manuscript},
year = {2003} year = {2004}
} }
@Article{collard/juillard:2001:compecon,
@article{collard/juillard:2001:compecon, author = {Collard, Fabrice and Juillard, Michel},
author = {Collard, Fabrice and Juillard, Michel}, journal = {Computational Economics},
title = {A Higher-Order Taylor Expansion Approach to Simulation of Stochastic Forward-Looking Models with an Application to a Nonlinear Phillips Curve Model}, title = {A Higher-Order {Taylor} Expansion Approach to Simulation of Stochastic Forward-Looking Models with an Application to a Nonlinear {Phillips} Curve Model},
journal = {Computational Economics}, year = {2001},
year = {2001}, month = {6},
volume = {17}, number = {2-3},
number = {2-3}, pages = {125-139},
pages = {125-39}, volume = {17},
month = {June}, doi = {10.1023/A:1011624124377},
keywords = {},
url = {http://ideas.repec.org/a/kap/compec/v17y2001i2-3p125-39.html}
} }
@Book{golub/van-loan:1996,
@book{golub/van-loan:1996, author = {Golub, Gene H. and Van Loan, Charles F.},
author = {Golub, Gene H. and Van Loan, Charles F.}, publisher = {The John Hopkins University Press},
title = {Matrix Computations}, title = {Matrix Computations},
publisher = {The John Hopkins University Press}, year = {2013},
year = {1996}, address = {Baltimore},
edition = {third} edition = {4},
} }
@Comment{jabref-meta: databaseType:bibtex;}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\usepackage{amssymb} \usepackage{amssymb}
\usepackage{amsmath} \usepackage{amsmath}
\usepackage{hyperref} \usepackage{hyperref}
\hypersetup{breaklinks=true,pagecolor=white,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue} \hypersetup{breaklinks=true,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue}
\usepackage{natbib} \usepackage{natbib}
\usepackage{fullpage} \usepackage{fullpage}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
License, Version 1.3 or any later version published by the Free License, Version 1.3 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover Software Foundation; with no Invariant Sections, no Front-Cover
Texts, and no Back-Cover Texts. A copy of the license can be found Texts, and no Back-Cover Texts. A copy of the license can be found
at: \url{http://www.gnu.org/licenses/fdl.txt} at: \url{https://www.gnu.org/licenses/fdl.txt}
\newline \newline
The author acknowledges funding through the Seventh Framework Programme The author acknowledges funding through the Seventh Framework Programme
for Research (FP7) of the European Commission's Socio-economic Sciences and for Research (FP7) of the European Commission's Socio-economic Sciences and
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
computing the first order approximated solution of a nonlinear rational computing the first order approximated solution of a nonlinear rational
expectations model. The core of the algorithm is a generalized Schur expectations model. The core of the algorithm is a generalized Schur
decomposition (also known as the QZ decomposition), as advocated by several decomposition (also known as the QZ decomposition), as advocated by several
authors in the litterature. The contribution of the present paper is to focus authors in the literature. The contribution of the present paper is to focus
on implementation details that make the algorithm more generic and more on implementation details that make the algorithm more generic and more
efficient, especially for large models. efficient, especially for large models.
...@@ -62,12 +62,8 @@ detail the algorithm implemented in Dynare for computing the first order ...@@ -62,12 +62,8 @@ detail the algorithm implemented in Dynare for computing the first order
approximated solution of nonlinear rational expectations models.\footnote{This approximated solution of nonlinear rational expectations models.\footnote{This
algorithm is available using the \texttt{stoch\_simul} command of Dynare. The algorithm is available using the \texttt{stoch\_simul} command of Dynare. The
original implementation of this algorithm was done by Michel Juillard, using original implementation of this algorithm was done by Michel Juillard, using
MATLAB, and is available in the \texttt{matlab/dr1.m} file which is MATLAB, and is available in the \texttt{matlab/dyn\_first\_order\_solver.m} file which is
distributed with Dynare. Another implementation was done by the author, in distributed with Dynare.}
C++, in the \texttt{DecisionRules} class, in the
\texttt{mex/sources/estimation} directory of the source tree. The notations
used in the present paper are closer to the C++ implementation than to the
MATLAB implementation.}
This algorithm is based on a generalized Schur decomposition---also known as This algorithm is based on a generalized Schur decomposition---also known as
the QZ decomposition---and is therefore essentially a variation on the the QZ decomposition---and is therefore essentially a variation on the
...@@ -653,7 +649,7 @@ equation is: ...@@ -653,7 +649,7 @@ equation is:
\end{equation*} \end{equation*}
In the general case, this equation is a specialized Sylvester equation, which In the general case, this equation is a specialized Sylvester equation, which
can be solved using the algorithm proposed by can be solved using the algorithm proposed by
\citet{kamenik:2003}\footnote{This paper is distributed with Dynare, in the \citet{kamenik:2004}\footnote{This paper is distributed with Dynare, in the
\texttt{sylvester.pdf} file under the documentation directory.}. \texttt{sylvester.pdf} file under the documentation directory.}.
\bibliographystyle{elsarticle-harv} \bibliographystyle{elsarticle-harv}
......
if HAVE_PDFLATEX
if HAVE_BEAMER
pdf-local: dseriesReporting.pdf
endif
endif
SRC = dseriesReporting.tex
EXTRA_DIST = $(SRC)
dseriesReporting.pdf: $(SRC)
$(PDFLATEX) dseriesReporting
$(PDFLATEX) dseriesReporting
clean-local:
rm -f dseriesReporting.pdf *.toc *.aux *.log *.nav *.snm *.vrb *.out *~
This diff is collapsed.
if HAVE_PDFLATEX
if HAVE_BIBTEX
pdf-local: gsa.pdf
endif
endif
SRC = gsa.tex marco.bib
EXTRA_DIST = $(SRC)
gsa.pdf: $(SRC)
$(PDFLATEX) gsa
$(BIBTEX) gsa
$(PDFLATEX) gsa
$(PDFLATEX) gsa
clean-local:
rm -f *.pdf *.log *.aux *.toc *.lof *.blg *.bbl *.out *~
This diff is collapsed.
@ARTICLE{Ratto_CompEcon_2008, % Encoding: UTF-8
author = {Ratto, M.},
title = {Analysing DSGE Models with Global Sensitivity Analysis}, @Article{Ratto_CompEcon_2008,
journal = {Computational Economics}, author = {Ratto, Marco},
year = {2008}, journal = {Computational Economics},
volume = {31}, title = {Analysing {DSGE} models with global sensitivity analysis},
pages = {115--139}, year = {2008},
pages = {115--139},
volume = {31},
doi = {10.1007/s10614-007-9110-6},
} }
@ARTICLE{Iskrev2010, @Article{Iskrev2010,
author = {Nikolay Iskrev}, author = {Nikolay Iskrev},
title = {Local Identification in {DSGE} Models},
journal = {Journal of Monetary Economics}, journal = {Journal of Monetary Economics},
year = {2010}, title = {Local Identification in {DSGE} Models},
volume = {57}, year = {2010},
pages = {189-202} number = {2},
pages = {189-202},
volume = {57},
doi = {10.1016/j.jmoneco.2009.12.007},
} }
@UNPUBLISHED{Iskrev2011, @UNPUBLISHED{Iskrev2011,
...@@ -23,3 +28,5 @@ ...@@ -23,3 +28,5 @@
note = {mimeo}, note = {mimeo},
year = {2011} year = {2011}
} }
@Comment{jabref-meta: databaseType:bibtex;}
\ifx\undefined\bysame
\newcommand{\bysame}{\leavevmode\hbox to\leftmargin{\hrulefill\,\,}}
\fi
\begin{thebibliography}{xx}
\harvarditem[Collard and Juillard]{Collard and Juillard}{2001}{COLL/JUIL/01a}
{ Collard, F. and M.~Juillard}, Accuracy of stochastic perturbation methods:
The case of asset pricing models, {\it Journal of Economic Dynamics and
Control}, 2001, {\it 25}, 979--999.
\harvarditem[Schmitt-Grohe and Uribe]{Schmitt-Grohe and Uribe}{2002}{SGU/02}
{ Schmitt-Grohe, S. and M.~Uribe}, {\it Solving Dynamic General Equilibrium
Models Using a Second-Order Approximation to the Policy Function}, technical
working paper, Rutgers Univsersity 2002.
\end{thebibliography}
\documentclass[11pt,a4paper]{article} \documentclass[11pt,a4paper]{article}
\usepackage{bibmad,graphicx,latexsym,amssymb,times} \usepackage{graphicx,latexsym,amssymb,times}
\usepackage[cp850]{inputenc} \usepackage[utf8]{inputenc}
\begin{document} \begin{document}
\title{Stochastic simulations with {\sc Dynare}. \\ A practical guide.} \title{Stochastic simulations with {\sc Dynare}. \\ A practical guide.}
\author{Fabrice Collard (GREMAQ, University of Toulouse)\\Adapted for Dynare 4.1\\ by Michel Juillard and S\'ebastien Villemot (CEPREMAP)} \author{Fabrice Collard (GREMAQ, University of Toulouse)\\Adapted for Dynare 4.x\\ by Michel Juillard and S\'ebastien Villemot (CEPREMAP)}
\date{First draft: February 2001\hspace{10mm}This draft: December 2009.} \date{First draft: February 2001\hspace{10mm}This draft: December 2009.}
\maketitle \maketitle
This document describes a model involving both endogenous and exogenous state variable. We first describe the theoretical model, before showing how the perturbation method is implemented in {\sc Dynare}. This document describes a model involving both endogenous and exogenous state variable. We first describe the theoretical model, before showing how the perturbation method is implemented in {\sc Dynare}.
\section{A theoretical model} \section{A theoretical model}
We consider an economy that consists of a large number of dynastic households and a large number of firms. Firms are producing a homogeneous final product that can be either consumed or invested by means of capital and labor services. Firms own their capital stock and hire labor supplied by the households. Households own the firms. In each and every period three perfectly competitive markets open --- the markets for consumption goods, labor services, and financial capital in the form of firms' shares. We consider an economy that consists of a large number of dynastic households and a large number of firms. Firms are producing a homogeneous final product that can be either consumed or invested by means of capital and labor services. Firms own their capital stock and hire labor supplied by the households. Households own the firms. In each and every period three perfectly competitive markets open --- the markets for consumption goods, labor services, and financial capital in the form of firms' shares.
Household preferences are characterized by the lifetime utility function: Household preferences are characterized by the lifetime utility function:
\begin{equation} \begin{equation}
E_t\sum_{\tau=t}^{\infty}{\beta^\star}^{\tau-t} \left(\log(c_t)-\theta\frac{h_t^{1+\psi}}{1+\psi}\right) E_t\sum_{\tau=t}^{\infty}{\beta^\star}^{\tau-t} \left(\log(c_t)-\theta\frac{h_t^{1+\psi}}{1+\psi}\right)
\label{eq:ut} \label{eq:ut}
\end{equation} \end{equation}
\noindent where $0<\beta^\star<1$ is a constant discount factor, $c_t$ is consumption in period \noindent where $0<\beta^\star<1$ is a constant discount factor, $c_t$ is consumption in period
$t$, $h_t$ is the fraction of total available time devoted to productive activity in period $t$, $\theta>0$ and $\psi\geqslant 0$. We assume that there exists a central planner that determines hours, consumption and capital accumulation maximizing the household's utility function subject to the following budget constraint $t$, $h_t$ is the fraction of total available time devoted to productive activity in period $t$, $\theta>0$ and $\psi\geqslant 0$. We assume that there exists a central planner that determines hours, consumption and capital accumulation maximizing the household's utility function subject to the following budget constraint
\begin{equation} \begin{equation}
c_t+i_t=y_t c_t+i_t=y_t
\label{eq:bud} \label{eq:bud}
...@@ -44,7 +44,7 @@ a_t\\b_t ...@@ -44,7 +44,7 @@ a_t\\b_t
\left( \left(
\begin{array}{cc} \begin{array}{cc}
\rho&\tau\\ \rho&\tau\\
\tau&\rho\\ \tau&\rho\\
\end{array} \end{array}
\right)\left( \right)\left(
\begin{array}{c} \begin{array}{c}
...@@ -57,7 +57,7 @@ a_{t-1}\\b_{t-1} ...@@ -57,7 +57,7 @@ a_{t-1}\\b_{t-1}
\end{array} \end{array}
\right) \label{eq:process} \right) \label{eq:process}
\end{equation} \end{equation}
where $|\rho+\tau|<1$ and $|\rho-\tau|<1 $ for sake of stationarity and where $|\rho+\tau|<1$ and $|\rho-\tau|<1 $ for sake of stationarity and
\begin{eqnarray*} \begin{eqnarray*}
E(\varepsilon_t)&=& 0,\\ E(\varepsilon_t)&=& 0,\\
E(\nu_t)&=& 0,\\ E(\nu_t)&=& 0,\\
...@@ -65,7 +65,7 @@ E(\varepsilon_t\varepsilon_s)&=&\left\{ ...@@ -65,7 +65,7 @@ E(\varepsilon_t\varepsilon_s)&=&\left\{
\begin{array}{lcl} \begin{array}{lcl}
\sigma^2_\varepsilon & \mbox{ if } & t=s \\ \sigma^2_\varepsilon & \mbox{ if } & t=s \\
0 & \mbox{ if } & t\neq s \\ 0 & \mbox{ if } & t\neq s \\
\end{array}\right. \mbox{, }\\ \end{array}\right. \mbox{, }\\
E(\nu_t\nu_s)&=&\left\{ E(\nu_t\nu_s)&=&\left\{
\begin{array}{lcl} \begin{array}{lcl}
\sigma^2_\nu & \mbox{ if } & t=s \\ \sigma^2_\nu & \mbox{ if } & t=s \\
...@@ -75,24 +75,24 @@ E(\varepsilon_t\nu_s)&=&\left\{ ...@@ -75,24 +75,24 @@ E(\varepsilon_t\nu_s)&=&\left\{
\begin{array}{lcl} \begin{array}{lcl}
\varphi\sigma_\varepsilon\sigma_\nu & \mbox{ if } & t=s \\ \varphi\sigma_\varepsilon\sigma_\nu & \mbox{ if } & t=s \\
0 & \mbox{ if } & t\neq s \\ 0 & \mbox{ if } & t\neq s \\
\end{array}\right. \mbox{. } \end{array}\right. \mbox{. }
\end{eqnarray*} \end{eqnarray*}
\section{Dynamic Equilibrium} \section{Dynamic Equilibrium}
The dynamic equilibrium of this economy follows from the first order conditions for optimality: The dynamic equilibrium of this economy follows from the first order conditions for optimality:
\begin{eqnarray*} \begin{eqnarray*}
&&c_t \theta h_t^{1+\psi}=(1-\alpha) y_t \\ &&c_t \theta h_t^{1+\psi}=(1-\alpha) y_t \\
&&\beta E_t\left[\left(\frac{\exp(b_t) c_t}{\exp(b_{t+1})c_{t+1}}\right)\left(\exp(b_{t+1})\alpha \frac{y_{t+1}}{k_{t+1}}+1-\delta\right)\right]=1\\ &&\beta E_t\left[\left(\frac{\exp(b_t) c_t}{\exp(b_{t+1})c_{t+1}}\right)\left(\exp(b_{t+1})\alpha \frac{y_{t+1}}{k_{t+1}}+1-\delta\right)\right]=1\\
&&y_t=\exp(a_t) k_t^\alpha h_t^{1-\alpha} \\ &&y_t=\exp(a_t) k_t^\alpha h_t^{1-\alpha} \\
&&k_{t+1}=\exp(b_t)(y_t-c_t)+(1-\delta)k_t \\ &&k_{t+1}=\exp(b_t)(y_t-c_t)+(1-\delta)k_t \\
&&a_t=\rho a_{t-1}+\tau b_{t-1}+\varepsilon_t \\ &&a_t=\rho a_{t-1}+\tau b_{t-1}+\varepsilon_t \\
&&b_t=\tau a_{t-1}+\rho b_{t-1}+\nu_t &&b_t=\tau a_{t-1}+\rho b_{t-1}+\nu_t
\end{eqnarray*} \end{eqnarray*}
\section{The {\sc dynare} code} \section{The {\sc dynare} code}
The {\sc dynare} code is straightforward to write, as the equilibrium is written in the natural way. The whole code is reported at the end of the section. Before that we proceed step by step. The {\sc dynare} code is straightforward to write, as the equilibrium is written in the natural way. The whole code is reported at the end of the section. Before that we proceed step by step.
\paragraph{Preamble} \paragraph{Preamble}
The preamble consists of the some declarations to setup the endogenous and exogenous variables, the parameters and assign values to these parameters. The preamble consists of the some declarations to setup the endogenous and exogenous variables, the parameters and assign values to these parameters.
\begin{enumerate} \begin{enumerate}
\item {\tt var y, c, k, h, a, b;} specifies the endogenous variables in the model since we have output ({\tt y}), consumption ({\tt c}), capital ({\tt k}), hours ({\tt h}) and the two shocks ({\tt a, b}). \item {\tt var y, c, k, h, a, b;} specifies the endogenous variables in the model since we have output ({\tt y}), consumption ({\tt c}), capital ({\tt k}), hours ({\tt h}) and the two shocks ({\tt a, b}).
\item {\tt varexo e, u;} specifies the exogenous variables in the model --- namely the innovations of the shocks, since we have the innovation of the non--incorporated shock ({\tt e}), and the innovation of the incorporated shock ({\tt u}). \item {\tt varexo e, u;} specifies the exogenous variables in the model --- namely the innovations of the shocks, since we have the innovation of the non--incorporated shock ({\tt e}), and the innovation of the incorporated shock ({\tt u}).
...@@ -133,9 +133,9 @@ theta = 2.95; ...@@ -133,9 +133,9 @@ theta = 2.95;
\end{enumerate} \end{enumerate}
\paragraph{Declaration of the model:} \paragraph{Declaration of the model:}
This step is done in a straightforward way. It starts with the instruction {\tt model;} and ends with {\tt end;}, in between all equilibrium conditions are written exactly the way we write it ``by hand''. However, there is a simple rule that should be kept in mind when the model is written. Let us consider a variable $x$: This step is done in a straightforward way. It starts with the instruction {\tt model;} and ends with {\tt end;}, in between all equilibrium conditions are written exactly the way we write it ``by hand''. However, there is a simple rule that should be kept in mind when the model is written. Let us consider a variable $x$:
\begin{itemize} \begin{itemize}
\item If $x$ is decided in period $t$ then we simply write ${\tt x}$. \item If $x$ is decided in period $t$ then we simply write ${\tt x}$.
\item When the variable is decided in $t-1$, such as the capital stock in our simple model, we write ${\tt x(-1)}$. \item Finally, when a variable is decided in the next period, $t+1$, such as consumption in the Euler equation, we write ${\tt x(+1)}$. \item When the variable is decided in $t-1$, such as the capital stock in our simple model, we write ${\tt x(-1)}$. \item Finally, when a variable is decided in the next period, $t+1$, such as consumption in the Euler equation, we write ${\tt x(+1)}$.
\end{itemize} \end{itemize}
Hence the required code to declare our model in {\sc Dynare} will be: Hence the required code to declare our model in {\sc Dynare} will be:
...@@ -164,7 +164,7 @@ end; ...@@ -164,7 +164,7 @@ end;
\end{verbatim} \end{verbatim}
so that the level of consumption is actually given by ${\tt exp(c)}$. so that the level of consumption is actually given by ${\tt exp(c)}$.
\paragraph{Solving the model} \paragraph{Solving the model}
\begin{enumerate} \begin{enumerate}
\item Now we need to provide numerical initial conditions for the computation of the deterministic steady state. This is done with the sequence between {\tt initval;} and {\tt end;}. Each variable, endogenous or exogenous, should be initialized. In our example, we give the exact values of the deterministic equilibrium in absence of shocks. This takes the form \item Now we need to provide numerical initial conditions for the computation of the deterministic steady state. This is done with the sequence between {\tt initval;} and {\tt end;}. Each variable, endogenous or exogenous, should be initialized. In our example, we give the exact values of the deterministic equilibrium in absence of shocks. This takes the form
\begin{verbatim} \begin{verbatim}
initval; initval;
...@@ -206,12 +206,12 @@ Number of periods on which to compute the IRFs (default = 40) ...@@ -206,12 +206,12 @@ Number of periods on which to compute the IRFs (default = 40)
\item {\tt nofunctions}: \item {\tt nofunctions}:
Doesn't print the coefficients of the approximated solution Doesn't print the coefficients of the approximated solution
\item {\tt nomoments}: \item {\tt nomoments}:
Doesn't print moments of the endogenous variables Doesn't print moments of the endogenous variables
\item {\tt order} = [1,2,3]: \item {\tt order} = [1,2,3]:
Order of Taylor approximation (default = 2) Order of Taylor approximation (default = 2)
\item {\tt replic} = Integer: \item {\tt replic} = Integer:
Number of simulated series used to compute the IRFs (default = 1, if order = 1, and 50 otherwise) Number of simulated series used to compute the IRFs (default = 1, if order = 1, and 50 otherwise)
\end{itemize} \end{itemize}
In our first example, we use simply: In our first example, we use simply:
\begin{verbatim} \begin{verbatim}
...@@ -324,8 +324,8 @@ end; ...@@ -324,8 +324,8 @@ end;
stoch_simul(periods=2000, drop=200); stoch_simul(periods=2000, drop=200);
\end{verbatim} \end{verbatim}
\bibliographystyle{Usmad} %\bibliographystyle{Usmad}
\bibliography{/papers/biblio/michel} %\bibliography{/papers/biblio/michel}
\end{document} \end{document}
......
EXTRA_DIST = dynare-internals.org
if ENABLE_ORG_EXPORT
html-local:
emacs --batch --visit=dynare-internals.org --funcall org-export-as-html-batch
endif
clean-local:
rm -rf *.html ltxpng
...@@ -2,7 +2,6 @@ function build_internal_documentation() ...@@ -2,7 +2,6 @@ function build_internal_documentation()
% The name of the function should be explicit... % The name of the function should be explicit...
datafiles = []; datafiles = [];
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'initialize_dataset'}];
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'descriptive_statistics'}]; datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'descriptive_statistics'}];
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_stdv'}]; datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_stdv'}];
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_cova'}]; datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_cova'}];
...@@ -81,4 +80,4 @@ if rows(miscfiles) ...@@ -81,4 +80,4 @@ if rows(miscfiles)
fprintf(fid,'\n\n\n'); fprintf(fid,'\n\n\n');
end end
end end
fclose(fid); fclose(fid);
\ No newline at end of file
This diff is collapsed.
if HAVE_PDFLATEX
if HAVE_BEAMER
pdf-local: macroprocessor.pdf
endif
endif
SRC = macroprocessor.tex new-design.pdf
EXTRA_DIST = $(SRC)
macroprocessor.pdf: $(SRC)
$(PDFLATEX) macroprocessor
$(PDFLATEX) macroprocessor
clean-local:
rm -f macroprocessor.pdf *.toc *.aux *.log *.nav *.snm *.vrb *.out *~