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
Select Git revision

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
Select Git revision
Show changes
Commits on Source (295)
Showing with 1480 additions and 205 deletions
......@@ -60,6 +60,7 @@ checksum
/doc/dynare.info
/doc/dynare.info-1
/doc/dynare.info-2
/doc/dynare.info-3
/doc/dynare.cp
/doc/dynare.fn
/doc/dynare.fns
......@@ -212,3 +213,6 @@ tests/julia/rbc/rbc*.jl
# Octave variables saved when Octave crashes
octave-workspace
# VERSION generated file
VERSION
\ No newline at end of file
variables:
GIT_SUBMODULE_STRATEGY: normal
TERM: linux
build_binaries:
stage: build
script:
- autoreconf -si
- './configure --with-matlab=$(dirname $(dirname $(readlink -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | sed -En "/ans\ =/!d;n;n;s/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/;p")'
- make -j $(nproc) LN_S="cp -p"
artifacts:
paths:
- matlab/preprocessor*/*
- mex/octave/
- mex/matlab/
- dynare++/src/dynare++
expire_in: 1 week
build_doc:
stage: build
script:
- autoreconf -si
- ./configure --disable-matlab --disable-octave
- make -j $(nproc) info pdf html
artifacts:
paths:
- doc/dynare.info*
- doc/dynare.html
- doc/dynare.pdf
testsuite_matlab:
stage: test
script:
- autoreconf -si
- './configure --disable-octave --with-matlab=$(dirname $(dirname $(readlink -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | sed -En "/ans\ =/!d;n;n;s/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/;p")'
- make -j $(($(nproc) * 3 / 4)) -C tests check-matlab
artifacts:
paths:
- tests/*.m.log
- tests/*.m.trs
- tests/*/*.m.log
- tests/*/*.m.trs
- tests/*/*/*.m.log
- tests/*/*/*.m.trs
- tests/run_test_matlab_output.txt
when: always
dependencies:
- build_binaries
.testsuite_octave_template:
stage: test
variables:
OPENBLAS_NUM_THREADS: 1
script:
- autoreconf -si
- ./configure --disable-matlab
- make -j $(nproc) -C tests check-octave
artifacts:
paths:
- tests/*.o.log
- tests/*.o.trs
- tests/*/*.o.log
- tests/*/*.o.trs
- tests/*/*/*.o.log
- tests/*/*/*.o.trs
- tests/run_test_octave_output.txt
when: always
dependencies:
- build_binaries
testsuite_octave_auto:
extends: .testsuite_octave_template
only:
- tags
- schedules
testsuite_octave_manual:
extends: .testsuite_octave_template
except:
- tags
- schedules
when: manual
[submodule "contrib/ms-sbvar/utilities_dw"]
path = contrib/ms-sbvar/utilities_dw
url = http://www.dynare.org/git/frbatlanta/utilities_dw.git
url = https://git.dynare.org/contrib/utilities_dw.git
[submodule "contrib/ms-sbvar/switch_dw"]
path = contrib/ms-sbvar/switch_dw
url = http://www.dynare.org/git/frbatlanta/switch_dw.git
url = https://git.dynare.org/contrib/switch_dw.git
[submodule "contrib/ms-sbvar/TZcode"]
path = contrib/ms-sbvar/TZcode
url = http://www.dynare.org/git/frbatlanta/TZcode.git
[submodule "contrib/dmm"]
path = contrib/dmm
url = http://www.dynare.org/git/dmm.git
url = https://git.dynare.org/contrib/TZcode.git
[submodule "matlab/utilities/tests"]
path = matlab/utilities/tests
url = https://github.com/DynareTeam/m-unit-tests.git
url = https://git.dynare.org/Dynare/m-unit-tests.git
[submodule "matlab/particles"]
path = matlab/particles
url = https://github.com/DynareTeam/particles.git
url = https://git.dynare.org/Dynare/particles.git
[submodule "matlab/modules/dates"]
path = matlab/modules/dates
url = https://github.com/DynareTeam/dates.git
url = https://git.dynare.org/Dynare/dates.git
branch = old-oop-style
[submodule "matlab/modules/dseries"]
path = matlab/modules/dseries
url = https://github.com/DynareTeam/dseries.git
url = https://git.dynare.org/Dynare/dseries.git
branch = old-oop-style
[submodule "matlab/modules/reporting"]
path = matlab/modules/reporting
url = https://github.com/DynareTeam/reporting.git
\ No newline at end of file
url = https://git.dynare.org/Dynare/reporting.git
\ No newline at end of file
......@@ -10,13 +10,13 @@ If something is not clear, don't hesitate to ask if you can't find the answer on
Please note that the repositories under the purview of this page are:
* [Dynare](https://github.com/DynareTeam/dynare)
* [Particles](https://github.com/DynareTeam/particles)
* [Dates](https://github.com/DynareTeam/dates)
* [Dseries](https://github.com/DynareTeam/dseries)
* [Reporting](https://github.com/DynareTeam/reporting)
* [Testsuite](https://github.com/DynareTeam/testsuite)
* [M-unit-tests](https://github.com/DynareTeam/m-unit-tests)
* [Dynare](https://git.dynare.org/Dynare/dynare)
* [Particles](https://git.dynare.org/Dynare/particles)
* [Dates](https://git.dynare.org/Dynare/dates)
* [Dseries](https://git.dynare.org/Dynare/dseries)
* [Reporting](https://git.dynare.org/Dynare/reporting)
* [Testsuite](https://git.dynare.org/Dynare/testsuite)
* [M-unit-tests](https://git.dynare.org/Dynare/m-unit-tests)
## Making your Intentions Known
......@@ -26,7 +26,7 @@ Before making changes to the codebase, it'd be helpful if you communicated your
You can report bugs in both the stable and unstable versions of Dynare. Before reporting a bug in the stable version of Dynare, please check the [Known Bugs](http://www.dynare.org/DynareWiki/KnownBugs) page to ensure it has not already been encountered/fixed. If reporting a bug in the unstable version of Dynare, please ensure the bug exists in the latest [unstable Dynare snapshot](http://www.dynare.org/download/dynare-unstable).
To report a bug in Dynare, simply open a GitHub issue in the repository where the bug resides. For example, to report a bug in Dynare itself, go to the [Dynare repository issue page](https://github.com/DynareTeam/dynare/issues) and click on "New Issue."
To report a bug in Dynare, simply open a GitHub issue in the repository where the bug resides. For example, to report a bug in Dynare itself, go to the [Dynare repository issue page](https://git.dynare.org/Dynare/dynare/issues) and click on "New Issue."
The minimal information to add is a subject and a description of the steps needed to reproduce the bug. However, the most helpful description would also provide the code to reproduce the bug (often times a `.mod` file). The most helpful `.mod` file is a minimal, quick-running example that reproduces the bug, but we'll take anything that will help us squash a bug.
......@@ -45,7 +45,7 @@ So, now you've reported the bug or asked for an enhancemnt by creating a GitHub
Now, if you want to go the extra mile, you'll volunteer to contribute code to fix the GitHub issue you created above. Once we've agreed that you'll do it, please do the following:
1. Clone the Dynare repository:
* `git clone https://github.com/DynareTeam/dynare.git`
* `git clone https://git.dynare.org/Dynare/dynare.git`
1. [Fork the Dynare repository](https://help.github.com/articles/fork-a-repo)
1. Change into the `dynare` folder and add the forked repository as a remote:
* `cd dynare`
......
......@@ -39,13 +39,14 @@ dist-hook:
rm -rf `find $(distdir)/matlab $(distdir)/examples -name *~`
rm -rf $(distdir)/matlab/preprocessor* $(distdir)/matlab/dynare_version.m
$(MKDIR_P) $(distdir)/mex/matlab $(distdir)/mex/octave
rm -rf `find $(distdir)/contrib -name '.git*'`
rm -rf `find $(distdir) -name '.git*'`
install-exec-local:
$(MKDIR_P) $(DESTDIR)$(pkglibdir)/contrib/ms-sbvar/TZcode
cp -r contrib/ms-sbvar/TZcode/MatlabFiles $(DESTDIR)$(pkglibdir)/contrib/ms-sbvar/TZcode
cp -r examples $(DESTDIR)$(pkglibdir)
cp -r matlab $(DESTDIR)$(pkglibdir)
find $(DESTDIR)$(pkglibdir) -name LICENSE.md -delete
rm -rf $(DESTDIR)$(pkglibdir)/matlab/preprocessor*
{ \
if [ -z "`file preprocessor/dynare_m | grep x86.64`" ]; then \
......
Announcement for Dynare 4.5.7 (on 2019-02-06)
=============================================
We are pleased to announce the release of Dynare 4.5.7.
This is a bugfix release.
The Windows packages are already available for download at:
http://www.dynare.org/download/dynare-stable
The Mac and GNU/Linux packages (for Debian and Ubuntu LTS) should follow soon.
This release is compatible with MATLAB versions 7.5 (R2007b) to 9.4 (R2018b)
and with GNU Octave versions 4.4.1.
Here is a list of the problems identified in version 4.5.6 and that have been
fixed in version 4.5.7:
- The mex-file conducting the QZ decomposition erroneously applied
the `qz_criterium` to the square absolute value of eigenvalues
instead of the absolute value itself (as done in mjdgges.m and the
AIM solver).
- In pathological cases, `mode_compute=5` (`newrat`) might enter an
infinite loop.
- `discretionary_policy` might erroneously state that the derivatives
of the objective function are non-zero if there are NaN present.
- Dynare++, when conducting the QZ decomposition, erroneously applied
the `qz_criterium` to the square absolute value of eigenvalues
instead of the absolute value itself.
- Dynare++: IRFs were incorrectly computed.
- `dynare_sensitivity` did not display the figures of
`irf_calibration`, it only stored them on the disk.
- Scatter plots generated by `dynare_sensitivity` did not correctly
display LaTeX names.
- Parameter updating via steady state files did not correctly work in
case of using [static]/[dynamic] equation tags.
- Memory leaks in `k_order_pert` (used by higher order stochastic
simulations) could lead to crashes.
- Predetermined variables were not properly set when used in model
local variables.
- Posterior moment computation did not correctly update the
covariance matrix of exogenous shocks during posterior sampling.
- Dynare was crashing with a cryptic message if a non estimated
parameter was initialized in the `estimated_params_init` block.
- The `forecast` command crashed if the model was declared as linear
and contained deterministic exogenous variables.
- Block decomposition is broken when used in conjunction with
`varexo_det`.
- The model was not correctly specified when `identification` was run
without another stochastic command in the `.mod` file
(e.g. `estimation`, `stoch_simul`, etc.).
- Realtime annualized shock decompositions added the wrong steady state
value.
- `mh_recover` option crashed when using slice sampler.
- x-axis values in plots of moment restrictions were wrong for
autocovariances.
Announcement for Dynare 4.5.6 (on 2018-07-25)
=============================================
We are pleased to announce the release of Dynare 4.5.6.
This is a bugfix release.
The Windows packages are already available for download at:
http://www.dynare.org/download/dynare-stable
The Mac and GNU/Linux packages (for Debian and Ubuntu LTS) should follow soon.
This release is compatible with MATLAB versions 7.5 (R2007b) to 9.4 (R2018a)
and with GNU Octave versions 4.4.
Here is a list of the problems identified in version 4.5.5 and that have been
fixed in version 4.5.6:
- TaRB sampler: incorrect last posterior was returned if the last draw was
rejected.
- Fixed online particle filter by drawing initial conditions in the prior
distribution.
- Fixed evaluation of the likelihood in non linear / particle filters.
- Added missing documented `montecarlo` option in Gaussian Filter and
Nonlinear Kalman Filter.
- Added back a flag to deal with errors on Cholesky decomposition in the
Conditional Particle Filter.
- Macroprocessor `length()` operator was returning 1 when applied to a
string. Macroprocessor now raises an error when `length()` operator is
called on an integer and return the number of characters when applied to a
string.
- `mode_compute=8`: the error code during mode-finding was not correctly
handled, resulting in crashes.
- Identification was not correctly displaying a message for collinear parameters
if there was no unidentified parameter present.
Announcement for Dynare 4.5.5 (on 2018-06-08)
=============================================
We are pleased to announce the release of Dynare 4.5.5.
This is a bugfix release.
The Windows packages are already available for download at:
http://www.dynare.org/download/dynare-stable
The Mac and GNU/Linux packages (for Debian and Ubuntu LTS) should follow soon.
This release is compatible with MATLAB versions 7.5 (R2007b) to 9.4 (R2018a)
and with GNU Octave versions 4.2.
Here is a list of the problems identified in version 4.5.4 and that have been
fixed in version 4.5.5:
- Identification was crashing during prior sampling if `ar` was initially too
low.
- The `align` method on `dseries` did not return a functional second `dseries`
output.
- Predetermined variables were not properly set when used in model local
variables.
- `perfect_foresight_solver` with option `stack_solve_algo=7` was not working
correctly when an exogenous variable has a lag greater than 1.
- `identification` with `prior_mc` option would crash if the number of moments
with non-zero derivative is smaller than the number of parameters.
- Calling several times `normcdf` or `normpdf` with the same arguments in a
model with block decomposition (but not bytecode) was leading to incorrect
results.
Announcement for Dynare 4.5.4 (on 2018-01-29)
=============================================
We are pleased to announce the release of Dynare 4.5.4.
This is a bugfix release.
The Windows packages are already available for download at:
http://www.dynare.org/download/dynare-stable
The Mac and GNU/Linux packages (for Debian and Ubuntu LTS) should follow soon.
This release is compatible with MATLAB versions 7.5 (R2007b) to 9.3 (R2017b)
and with GNU Octave versions 4.2.
Here is a list of the problems identified in version 4.5.3 and that have been
fixed in version 4.5.4:
- The `type` option of `plot_shock_decomposition` was always set to `qoq` regardless of what is specified.
- Bug in GSA when no parameter was detected below pvalue threshold.
- Various bug fixes in shock decompositions.
- Bug in reading in macro arrays passed on `dynare` command line via the `-D` option.
- Estimation with missing values was crashing if the `prefilter` option was used.
- Added a workaround for a difference in behaviour between Octave and Matlab regarding the creation
of function handles for functions that do not exist in the path. With Octave 4.2.1, steady state
files did not work if no auxiliary variables were created.
- The `stoch_simul` command was crashing with a cryptic message if option `order=3` was used without
setting `k_order_solver`.
- In cases where the prior bounds are infinite and the mode is estimated at exactly 0, no `mode_check`
graphs were displayed.
- Parallel execution of MCMC was broken in models without auxiliary variables.
- Reading data with column names from Excel might crash.
- The multivariate Kalman smoother was crashing in case of missing data in the observations and
`Finf` became singular.
- The `plot_shock_decomposition` command ignored various user-defined options like `fig_name`,
`use_shock_groups` or `interactive` and instead used the default options.
- Nested `@#ifdef` and `@#ifndef` statements don't work in the macroprocessor.
Announcement for Dynare 4.5.3 (on 2017-10-19)
=============================================
We are pleased to announce the release of Dynare 4.5.3.
This is a bugfix release. It comes less than 24 hours after the previous release,
because version 4.5.2 was affected by a critical bug for MATLAB older than R2016b.
The Windows packages are already available for download at:
http://www.dynare.org/download/dynare-stable
The Mac and GNU/Linux packages (for Debian and Ubuntu LTS) should follow soon.
This release is compatible with MATLAB versions 7.5 (R2007b) to 9.3 (R2017b)
and with GNU Octave versions 4.2.
Here is a list of the problems identified in version 4.5.2 and that have been
fixed in version 4.5.3:
- `isfile` routine was failing with matlab older than R2016b. This bug did not
affect Octave.
Announcement for Dynare 4.5.2 (on 2017-10-19)
=============================================
We are pleased to announce the release of Dynare 4.5.2.
This is a bugfix release.
The Windows packages are already available for download at:
http://www.dynare.org/download/dynare-stable
The Mac and GNU/Linux packages (for Debian and Ubuntu LTS) should follow soon.
This release is compatible with MATLAB versions 7.5 (R2007b) to 9.3 (R2017b)
and with GNU Octave versions 4.2.
Here is a list of the problems identified in version 4.5.1 and that have been
fixed in version 4.5.2:
- Fixed bug in perfect foresight solver:
+ If expected shocks were declared after the terminal period, as specified
by the `periods` option, Dynare was crashing.
+ Models declared with the `linear` option were crashing if exogenous
variables were present with a lead or lag.
- After ML or Bayesian estimation when the smoother option or `mh_replic=0`
were not specified, not all smoothed measurement errors were displayed.
- Fixed error in reference manual about the `conditional_forecasts` command.
- Fixed smoother behaviour, provide informative error instead of crashing when
model cannot be solved.
- The `nopathchange` preprocessor option was always triggered, regardless of
whether it was passed or not.
- When `ramsey_policy` is used, allow state variables to be set in `histval`
block.
- `histval` erroneously accepted leads, leading to cryptic crashes.
- The prior MC draws from previous runs were not deleted, potentially
resulting in loading stale files.
- `estim_params_` was being declared `global` more than once.
- Fixed crashes happening when simulating linear models with order>1.
- Make empirical moments independent of `simul_replic`, as stated in the
reference manual, by outputting moments computed with the first simulated
sample.
- The `prior_function` required a preceding `estimation`-command to properly
set up the prior.
- If the mode for a parameter was at exactly 0, `mode_check` was crashing.
- Fixed `get_posterior_parameters`-routine which should not do more than
getting parameters. As a consequense, the `shock_decomposition`-command
did not correctly set the `parameter_set` for use in subsequent function
calls if shocks are correlated or measurement error is present.
- Fixed bug in Ramsey problem with constraints both on a policy instrument and
another variable. Note that the constraint on a variable that is not an
instrument of the Ramsey problem must be written with an equation tag in the
model block.
- Fixed bug in Ramsey problem with constraints on policy instrument.
- Fixed crash with optimizer 5 when not used with DSGE model at order 1.
- Fixed mex file used for third order approximation (was crashing on
Matlab/Windows 7).
Announcement for Dynare 4.5.1 (on 2017-08-24)
=============================================
We are pleased to announce the release of Dynare 4.5.1.
This is a bugfix release.
The Windows packages are already available for download at:
http://www.dynare.org/download/dynare-stable
The Mac and GNU/Linux packages (for Debian and Ubuntu LTS) should follow soon.
This release is compatible with MATLAB versions 7.5 (R2007b) to 9.2 (R2017a)
and with GNU Octave versions 4.2.
Here is a list of the problems identified in version 4.5.0 and that have been
fixed in version 4.5.1:
- Fixed out of memory issue with simpsa optimization algorithm.
- Added missing plots for measurement errors with `generate_trace_plot`
command.
- Posterior moments after MCMC for very big models were not correctly computed
and their plotting might crash Dynare.
- Results of the posterior conditional variance decomposition after MCMC were
not correctly computed.
- Options `use_shock_groups` and `colormap` of the `shock_decomposition`
command were not working.
- Added a clean error message if sensitivity toolbox is used with recursive
estimation.
- Computation of posterior filtered variables was crashing in models with only
one variable.
- Fixed various typos and errors in the reference manual.
Announcement for Dynare 4.5.0 (on 2017-06-11)
=============================================
We are pleased to announce the release of Dynare 4.5.0.
This major release adds new features and fixes various bugs.
The Windows packages are already available for download at:
http://www.dynare.org/download/dynare-stable
The Mac and Debian/Ubuntu packages should follow soon.
All users are strongly encouraged to upgrade.
This release is compatible with MATLAB versions ranging from 7.5 (R2007b) to
9.2 (R2017a) and with GNU Octave version 4.2.
Here is the list of major user-visible changes:
- Ramsey policy
+ Added command `ramsey_model` that builds the expanded model with
FOC conditions for the planner's problem but doesn't perform any
computation. Usefull to compute Ramsey policy in a perfect
foresight model,
+ `ramsey_policy` accepts multipliers in its variable list and
displays results for them.
- Perfect foresight models
+ New commands `perfect_foresight_setup` (for preparing the
simulation) and `perfect_foresight_solver` (for computing it). The
old `simul` command still exist and is now an alias for
`perfect_foresight_setup` + `perfect_foresight_solver`. It is no
longer possible to manipulate by hand the contents of
`oo_.exo_simul` when using `simul`. People who want to do
it must first call `perfect_foresight_setup`, then do the
manipulations, then call `perfect_foresight_solver`,
+ By default, the perfect foresight solver will try a homotopy
method if it fails to converge at the first try. The old behavior
can be restored with the `no_homotopy` option,
+ New option `stack_solve_algo=7` that allows specifying a
`solve_algo` solver for solving the model,
+ New option `solve_algo` that allows specifying a solver for
solving the model when using `stack_solve_algo=7`,
+ New option `lmmcp` that solves the model via a Levenberg-Marquardt
mixed complementarity problem (LMMCP) solver,
+ New option `robust_lin_solve` that triggers the use of a robust
linear solver for the default `solve_algo=4`,
+ New options `tolf` and `tolx` to control termination criteria of
solvers,
+ New option `endogenous_terminal_period` to `simul`,
+ Added the possibility to set the initial condition of the
(stochastic) extended path simulations with the histval block.
- Optimal simple rules
+ Saves the optimal value of parameters to `oo_.osr.optim_params`,
+ New block `osr_params_bounds` allows specifying bounds for the
estimated parameters,
+ New option `opt_algo` allows selecting different optimizers while
the new option `optim` allows specifying the optimizer options,
+ The `osr` command now saves the names, bounds, and indices for the
estimated parameters as well as the indices and weights of the
variables entering the objective function into `M_.osr`.
- Forecasts and Smoothing
+ The smoother and forecasts take uncertainty about trends and means
into account,
+ Forecasts accounting for measurement error are now saved in fields
of the form `HPDinf_ME` and `HPDsup_ME`,
+ New fields `oo_.Smoother.Trend` and `oo_.Smoother.Constant` that
save the trend and constant parts of the smoothed variables,
+ new field `oo_.Smoother.TrendCoeffs` that stores the trend
coefficients.
+ Rolling window forecasts allowed in `estimation` command by
passing a vector to `first_obs`,
+ The `calib_smoother` command now accepts the `loglinear`,
`prefilter`, `first_obs` and `filter_decomposition` options.
- Estimation
+ New options: `logdata`, `consider_all_endogenous`,
`consider_only_observed`, `posterior_max_subsample_draws`,
`mh_conf_sig`, `diffuse_kalman_tol`, `dirname`, `nodecomposition`
+ `load_mh_file` and `mh_recover` now try to load chain's proposal density,
+ New option `load_results_after_load_mh` that allows loading some
posterior results from a previous run if no new MCMC draws are
added,
+ New option `posterior_nograph` that suppresses the generation of
graphs associated with Bayesian IRFs, posterior smoothed objects,
and posterior forecasts,
+ Saves the posterior density at the mode in
`oo_.posterior.optimization.log_density`,
+ The `filter_covariance` option now also works with posterior
sampling like Metropolis-Hastings,
+ New option `no_posterior_kernel_density` to suppress computation
of kernel density of posterior objects,
+ Recursive estimation and forecasting now provides the individual
`oo_` structures for each sample in `oo_recursive_`,
+ The `trace_plot` command can now plot the posterior density,
+ New command `generate_trace_plots` allows generating all trace
plots for one chain,
+ New commands `prior_function` and `posterior_function` that
execute a user-defined function on parameter draws from the
prior/posterior distribution,
+ New option `huge_number` for replacement of infinite bounds with
large number during `mode_compute`,
+ New option `posterior_sampling_method` allows selecting the new
posterior sampling options:
`tailored_random_block_metropolis_hastings` (Tailored randomized
block (TaRB) Metropolis-Hastings), `slice` (Slice sampler),
`independent_metropolis_hastings` (Independent
Metropolis-Hastings),
+ New option `posterior_sampler_options` that allow controlling the
options of the `posterior_sampling_method`, its `scale_file`-option
pair allows loading the `_mh_scale.mat`-file storing the tuned
scale factor from a previous run of `mode_compute=6`,
+ New option `raftery_lewis_diagnostics` that computes Raftery/Lewis
(1992) convergence diagnostics,
+ New option `fast_kalman_filter` that provides fast Kalman filter
using Chandrasekhar recursions as described in Ed Herbst (2015),
+ The `dsge_var` option now saves results at the posterior mode into
`oo_.dsge_var`,
+ New option `smoothed_state_uncertainty` to provide the uncertainty
estimate for the smoothed state estimate from the Kalman smoother,
+ New prior density: generalized Weibull distribution,
+ Option `mh_recover` now allows continuing a crashed chain at the
last save mh-file,
+ New option `nonlinear_filter_initialization` for the
`estimation` command. Controls the initial covariance matrix
of the state variables in nonlinear filters.
+ The `conditional_variance_decomposition` option now displays
output and stores it as a LaTeX-table when the `TeX` option is
invoked,
+ The `use_calibration` to `estimated_params_init` now also works
with ML,
+ Improved initial estimation checks.
- Steady state
+ The default solver for finding the steady state is now a
trust-region solver (can be triggered explicitly with option
`solve_algo=4`),
+ New options `tolf` and `tolx` to control termination criteria of
solver,
+ The debugging mode now provides the termination values in steady
state finding.
- Stochastic simulations
+ New options `nodecomposition`,
+ New option `bandpass_filter` to compute bandpass-filtered
theoretical and simulated moments,
+ New option `one_sided_hp_filter` to compute one-sided HP-filtered
simulated moments,
+ `stoch_simul` displays a simulated variance decomposition when
simulated moments are requested,
+ `stoch_simul` saves skewness and kurtosis into respective fields
of `oo_` when simulated moments have been requested,
+ `stoch_simul` saves the unconditional variance decomposition in
`oo_.variance_decomposition`,
+ New option `dr_display_tol` that governs omission of small terms
in display of decision rules,
+ The `stoch_simul` command now prints the displayed tables as LaTeX
code when the new `TeX` option is enabled,
+ The `loglinear` option now works with lagged and leaded exogenous
variables like news shocks,
+ New option `spectral_density` that allows displaying the spectral
density of (filtered) endogenous variables,
+ New option `contemporaneous_correlation` that allows saving
contemporaneous correlations in addition to the covariances.
- Identification
+ New options `diffuse_filter` and `prior_trunc`,
+ The `identification` command now supports correlations via
simulated moments,
- Sensitivity analysis
+ New blocks `irf_calibration` and `moment_calibration`,
+ Outputs LaTeX tables if the new `TeX` option is used,
+ New option `relative_irf` to `irf_calibration` block.
- Conditional forecast
+ Command `conditional_forecast` now takes into account `histval`
block if present.
- Shock decomposition
+ New option `colormap` to `shocks_decomposition` for controlling
the color map used in the shocks decomposition graphs,
+ `shocks_decomposition` now accepts the `nograph` option,
+ New command `realtime_shock_decomposition` that for each period `T= [presample,...,nobs]`
allows computing the:
* realtime historical shock decomposition `Y(t|T)`, i.e. without observing data in `[T+1,...,nobs]`
* forecast shock decomposition `Y(T+k|T)`
* realtime conditional shock decomposition `Y(T+k|T+k)-Y(T+k|T)`
+ New block `shock_groups` that allows grouping shocks for the
`shock_decomposition` and `realtime_shock_decomposition` commands,
+ New command `plot_shock_decomposition` that allows plotting the
results from `shock_decomposition` and
`realtime_shock_decomposition` for different vintages and shock
groupings.
- Macroprocessor
+ Can now pass a macro-variable to the `@#include` macro directive,
+ New preprocessor flag `-I`, macro directive `@#includepath`, and
dynare config file block `[paths]` to pass a search path to the
macroprocessor to be used for file inclusion via `@#include`.
- Command line
+ New option `onlyclearglobals` (do not clear JIT compiled functions
with recent versions of Matlab),
+ New option `minimal_workspace` to use fewer variables in the
current workspace,
+ New option `params_derivs_order` allows limiting the order of the
derivatives with respect to the parameters that are calculated by
the preprocessor,
+ New command line option `mingw` to support the MinGW-w64 C/C++
Compiler from TDM-GCC for `use_dll`.
- dates/dseries/reporting classes
+ New methods `abs`, `cumprod` and `chain`,
+ New option `tableRowIndent` to `addTable`,
+ Reporting system revamped and made more efficient, dependency on
matlab2tikz has been dropped.
- Optimization algorithms
+ `mode_compute=2` Uses the simulated annealing as described by
Corana et al. (1987),
+ `mode_compute=101` Uses SOLVEOPT as described by Kuntsevich and
Kappel (1997),
+ `mode_compute=102` Uses `simulannealbnd` from Matlab's Global
Optimization Toolbox (if available),
+ New option `silent_optimizer` to shut off output from mode
computing/optimization,
+ New options `verbosity` and `SaveFiles` to control output and
saving of files during mode computing/optimization.
- LaTeX output
+ New command `write_latex_original_model`,
+ New option `write_equation_tags` to `write_latex_dynamic_model`
that allows printing the specified equation tags to the generate
LaTeX code,
+ New command `write_latex_parameter_table` that writes the names and
values of model parameters to a LaTeX table,
+ New command `write_latex_prior_table` that writes the descriptive
statistics about the prior distribution to a LaTeX table,
+ New command `collect_latex_files` that creates one compilable LaTeX
file containing all TeX-output.
- Misc.
+ Provides 64bit preprocessor,
+ Introduces new path management to avoid conflicts with other
toolboxes,
+ Full compatibility with Matlab 2014b's new graphic interface,
+ When using `model(linear)`, Dynare automatically checks
whether the model is truly linear,
+ `usedll`, the `msvc` option now supports `normcdf`, `acosh`,
`asinh`, and `atanh`,
+ New parallel option `NumberOfThreadsPerJob` for Windows nodes that
sets the number of threads assigned to each remote MATLAB/Octave
run,
+ Improved numerical performance of
`schur_statespace_transformation` for very large models,
+ The `all_values_required` option now also works with `histval`,
+ Add missing `horizon` option to `ms_forecast`,
+ BVAR now saves the marginal data density in
`oo_.bvar.log_marginal_data_density` and stores prior and
posterior information in `oo_.bvar.prior` and
`oo_.bvar.posterior`.
* Bugs and problems identified in version 4.4.3 and that have been fixed in version 4.5.0:
- BVAR models
+ `bvar_irf` could display IRFs in an unreadable way when they moved from
negative to positive values,
+ In contrast to what is stated in the documentation, the confidence interval
size `conf_sig` was 0.6 by default instead of 0.9.
- Conditional forecasts
+ The `conditional_forecast` command produced wrong results in calibrated
models when used at initial values outside of the steady state (given with
`initval`),
+ The `plot_conditional_forecast` option could produce unreadable figures if
the areas overlap,
+ The `conditional_forecast` command after MLE crashed,
+ In contrast to what is stated in the manual, the confidence interval size
`conf_sig` was 0.6 by default instead of 0.8.
+ Conditional forecasts were wrong when the declaration of endogenous
variables was not preceeding the declaration of the exogenous
variables and parameters.
- Discretionary policy
+ Dynare allowed running models where the number of instruments did not match
the number of omitted equations,
+ Dynare could crash in some cases when trying to display the solution,
+ Parameter dependence embedded via a `steady_state` was not taken into
account, typically resulting in crashes.
- dseries class
+ When subtracting a dseries object from a number, the number was instead
subtracted from the dseries object.
- DSGE-VAR models
+ Dynare crashed when estimation encountered non-finite values in the Jacobian
at the steady state,
+ The presence of a constant was not considered for degrees of freedom
computation of the Gamma function used during the posterior computation; due
to only affecting the constant term, results should be be unaffected, except
for model_comparison when comparing models with and without.
- Estimation command
+ In contrast to what was stated in the manual, the confidence interval size
`conf_sig` for `forecast` without MCMC was 0.6 by default instead of 0.9,
+ Calling estimation after identification could lead to crashes,
+ When using recursive estimation/forecasting and setting some elements of
`nobs` to be larger than the number of observations T in the data,
`oo_recursive_` contained additional cell entries that simply repeated the
results obtained for `oo_recursive_T`,
+ Computation of Bayesian smoother could crash for larger models when
requesting `forecast` or `filtered_variables`,
+ Geweke convergence diagnostics were not computed on the full MCMC chain when
the `load_mh_file` option was used,
+ The Geweke convergence diagnostics always used the default `taper_steps` and
`geweke_interval`,
+ Bayesian IRFs (`bayesian_irfs` option) could be displayed in an unreadable
way when they move from negative to positive values,
+ If `bayesian_irfs` was requested when `mh_replic` was too low to compute
HPDIs, plotting was crashing,
+ The x-axis value in `oo_.prior_density` for the standard deviation and
correlation of measurement errors was written into a field
`mearsurement_errors_*` instead of `measurement_errors_*`,
+ Using a user-defined `mode_compute` crashed estimation,
+ Option `mode_compute=10` did not work with infinite prior bounds,
+ The posterior variances and covariances computed by `moments_varendo` were
wrong for very large models due to a matrix erroneously being filled up with
zeros,
+ Using the `forecast` option with `loglinear` erroneously added the unlogged
steady state,
+ When using the `loglinear` option the check for the presence of a constant
was erroneously based on the unlogged steady state,
+ Estimation of `observation_trends` was broken as the trends specified as a
function of deep parameters were not correctly updated during estimation,
+ When using `analytic_derivation`, the parameter values were not set before
testing whether the steady state file changes parameter values, leading to
subsequent crashes,
+ If the steady state of an initial parameterization did not solve, the
observation equation could erroneously feature no constant when the
`use_calibration` option was used,
+ When computing posterior moments, Dynare falsely displayed that moment
computations are skipped, although the computation was performed correctly,
+ If `conditional_variance_decomposition` was requested, although all
variables contain unit roots, Dynare crashed instead of providing an error
message,
+ Computation of the posterior parameter distribution was erroneously based
on more draws than specified (there was one additional draw for every Markov
chain),
+ The estimation option `lyapunov=fixed_point` was broken,
+ Computation of `filtered_vars` with only one requested step crashed Dynare,
+ Option `kalman_algo=3` was broken with non-diagonal measurement error,
+ When using the diffuse Kalman filter with missing observations, an additive
factor log(2*pi) was missing in the last iteration step,
+ Passing of the `MaxFunEvals` and `InitialSimplexSize` options to
`mode_compute=8` was broken,
+ Bayesian forecasts contained initial conditions and had the wrong length in
both plots and stored variables,
+ Filtered variables obtained with `mh_replic=0`, ML, or
`calibrated_smoother` were padded with zeros at the beginning and end and
had the wrong length in stored variables,
+ Computation of smoothed measurement errors in Bayesian estimation was broken,
+ The `selected_variables_only` option (`mh_replic=0`, ML, or
`calibrated_smoother`) returned wrong results for smoothed, updated, and
filtered variables,
+ Combining the `selected_variables_only` option with forecasts obtained
using `mh_replic=0`, ML, or `calibrated_smoother` leaded to crashes,
+ `oo_.UpdatedVariables` was only filled when the `filtered_vars` option was specified,
+ When using Bayesian estimation with `filtered_vars`, but without
`smoother`, then `oo_.FilteredVariables` erroneously also contained filtered
variables at the posterior mean as with `mh_replic=0`,
+ Running an MCMC a second time in the same folder with a different number of
iterations could result in crashes due to the loading of stale files,
+ Results displayed after Bayesian estimation when not specifying
the `smoother` option were based on the parameters at the mode
from mode finding instead of the mean parameters from the
posterior draws. This affected the smoother results displayed, but
also calls to subsequent command relying on the parameters stored
in `M_.params` like `stoch_simul`,
+ The content of `oo_.posterior_std` after Bayesian estimation was based on
the standard deviation at the posterior mode, not the one from the MCMC, this
was not consistent with the reference manual,
+ When the initialization of an MCMC run failed, the metropolis.log file was
locked, requiring a restart of Matlab to restart estimation,
+ If the posterior mode was right at the corner of the prior bounds, the
initialization of the MCMC erroneously crashed,
+ If the number of dropped draws via `mh_drop` coincided with the number of
draws in a `_mh'-file`, `oo_.posterior.metropolis.mean` and
`oo_.posterior.metropolis.Variance` were NaN.
- Estimation and calibrated smoother
+ When using `observation_trends` with the `prefilter` option, the mean shift
due to the trend was not accounted for,
+ When using `first_obs`>1, the higher trend starting point of
`observation_trends` was not taken into account, leading, among other things,
to problems in recursive forecasting,
+ The diffuse Kalman smoother was crashing if the forecast error variance
matrix becomes singular,
+ The multivariate Kalman smoother provided incorrect state estimates when
all data for one observation are missing,
+ The multivariate diffuse Kalman smoother provided incorrect state estimates
when the `Finf` matrix becomes singular,
+ The univariate diffuse Kalman filter was crashing if the initial covariance
matrix of the nonstationary state vector is singular,
- Forecats
+ In contrast to what is stated in the manual, the confidence interval size
`conf_sig` was 0.6 by default instead of 0.9.
+ Forecasting with exogenous deterministic variables provided wrong decision
rules, yielding wrong forecasts.
+ Forecasting with exogenous deterministic variables crashed when the
`periods` option was not explicitly specified,
+ Option `forecast` when used with `initval` was using the initial values in
the `initval` block and not the steady state computed from these initial
values as the starting point of forecasts.
- Global Sensitivity Analysis
+ Sensitivity with ML estimation could result in crashes,
+ Option `mc` must be forced if `neighborhood_width` is used,
+ Fixed dimension of `stock_logpo` and `stock_ys`,
+ Incomplete variable initialization could lead to crashes with `prior_range=1`.
- Indentification
+ Identification did not correctly pass the `lik_init` option,
requiring the manual setting of `options_.diffuse_filter=1` in
case of unit roots,
+ Testing identification of standard deviations as the only
parameters to be estimated with ML leaded to crashes,
+ Automatic increase of the lag number for autocovariances when the
number of parameters is bigger than the number of non-zero moments
was broken,
+ When using ML, the asymptotic Hessian was not computed,
+ Checking for singular values when the eigenvectors contained only
one column did not work correctly,
- Model comparison
+ Selection of the `modifiedharmonicmean` estimator was broken,
- Optimal Simple Rules
+ When covariances were specified, variables that only entered with
their variance and no covariance term obtained a wrong weight,
resulting in wrong results,
+ Results reported for stochastic simulations after `osr` were based
on the last parameter vector encountered during optimization,
which does not necessarily coincide with the optimal parameter
vector,
+ Using only one (co)variance in the objective function resulted in crashes,
+ For models with non-stationary variables the objective function was computed wrongly.
- Ramsey policy
+ If a Lagrange multiplier appeared in the model with a lead or a lag
of more than one period, the steady state could be wrong.
+ When using an external steady state file, incorrect steady states
could be accepted,
+ When using an external steady state file with more than one
instrument, Dynare crashed,
+ When using an external steady state file and running `stoch_simul`
after `ramsey_planner`, an incorrect steady state was used,
+ When the number of instruments was not equal to the number of
omitted equations, Dynare crashed with a cryptic message,
+ The `planner_objective` accepted `varexo`, but ignored them for computations,
- Shock decomposition
+ Did not work with the `parameter_set=calibration` option if an
`estimated_params` block is present,
+ Crashed after MLE.
- Perfect foresight models
+ The perfect foresight solver could accept a complex solution
instead of continuing to look for a real-valued one,
+ The `initval_file` command only accepted column and not row vectors,
+ The `initval_file` command did not work with Excel files,
+ Deterministic simulations with one boundary condition crashed in
`solve_one_boundary` due to a missing underscore when passing
`options_.simul.maxit`,
+ Deterministic simulation with exogenous variables lagged by more
than one period crashed,
+ Termination criterion `maxit` was hard-coded for `solve_algo=0`
and could no be changed,
+ When using `block`/`bytecode`, relational operators could not be enforced,
+ When using `block` some exceptions were not properly handled,
leading to code crashes,
+ Using `periods=1` crashed the solver (bug only partially fixed).
- Smoothing
+ The univariate Kalman smoother returned wrong results when used
with correlated measurement error,
+ The diffuse smoother sometimes returned linear combinations of the
smoothed stochastic trend estimates instead of the original trend
estimates.
- Perturbation reduced form
+ In contrast to what is stated in the manual, the results of the
unconditional variance decomposition were only stored in
`oo_.gamma_y(nar+2)`, not in `oo_.variance_decomposition`,
+ Dynare could crash when the steady state could not be computed
when using the `loglinear` option,
+ Using `bytcode` when declared exogenous variables were not
used in the model leaded to crashes in stochastic simulations,
+ Displaying decision rules involving lags of auxiliary variables of
type 0 (leads>1) crashed.
+ The `relative_irf` option resulted in wrong output at `order>1` as
it implicitly relies on linearity.
- Displaying of the MH-history with the `internals` command crashed
if parameter names did not have same length.
- Dynare crashed when the user-defined steady state file returned an
error code, but not an conformable-sized steady state vector.
- Due to a bug in `mjdgges.mex` unstable parameter draws with
eigenvalues up to 1+1e-6 could be accepted as stable for the
purpose of the Blanchard-Kahn conditions, even if `qz_criterium<1`.
- The `use_dll` option on Octave for Windows required to pass a
compiler flag at the command line, despite the manual stating this
was not necessary.
- Dynare crashed for models with `block` option if the Blanchard-Kahn
conditions were not satisfied instead of generating an error
message.
- The `verbose` option did not work with `model(block)`.
- When falsely specifying the `model(linear)` for nonlinear models,
incorrect steady states were accepted instead of aborting.
- The `STEADY_STATE` operator called on model local variables
(so-called pound variables) did not work as expected.
- The substring operator in macro-processor was broken. The
characters of the substring could be mixed with random characters
from the memory space.
- Block decomposition could sometimes cause the preprocessor to crash.
- A bug when external functions were used in model local variables
that were contained in equations that required auxiliary
variable/equations led to crashes of Matlab.
- Sampling from the prior distribution for an inverse gamma II
distribution when `prior_trunc>0` could result in incorrect
sampling.
- Sampling from the prior distribution for a uniform distribution
when `prior_trunc>0` was ignoring the prior truncation.
- Conditional forecasts were wrong when the declaration of endogenous
variables was not preceeding the declaration of the exogenous
variables and parameters.
Announcement for Dynare 4.4.3 (on 2014-07-31)
=============================================
......
......@@ -16,7 +16,7 @@ available via the Dynare homepage: <http://www.dynare.org/download/dynare-stable
# Contributions
To contribute to Dynare and participate in the Dynare community, please see: [CONTRIBUTING.md](https://github.com/DynareTeam/dynare/blob/master/CONTRIBUTING.md)
To contribute to Dynare and participate in the Dynare community, please see: [CONTRIBUTING.md](https://git.dynare.org/Dynare/dynare/blob/master/CONTRIBUTING.md)
# License
......@@ -32,7 +32,7 @@ Here, we explain how to build from source:
- all the associated documentation (PDF and HTML)
This source can be retrieved in three forms:
- via git, at <https://github.com/DynareTeam/dynare.git>
- via git, at <https://git.dynare.org/Dynare/dynare.git>
- using the stable source archive of the latest Dynare version (currently 4.4) from <http://www.dynare.org/download/dynare-stable/>
- using a source snapshot of the unstable version, from <http://www.dynare.org/download/dynare-unstable/source-snapshot>
......@@ -81,7 +81,7 @@ A number of tools and libraries are needed in order to recompile everything. You
- [Beamer](http://latex-beamer.sourceforge.net/) (for some PDF presentations)
- For building the reference manual:
- [GNU Texinfo](http://www.gnu.org/software/texinfo/)
- [Texi2HTML](http://www.nongnu.org/texi2html) and [Latex2HTML](http://www.latex2html.org), if you want nice mathematical formulas in HTML output
- [Latex2HTML](http://www.latex2html.org), if you want nice mathematical formulas in HTML output
- [Doxygen](http://www.stack.nl/%7Edimitri/doxygen/) (if you want to build Dynare preprocessor source documentation)
- For Octave, the development libraries corresponding to the UMFPACK packaged with Octave
......@@ -91,7 +91,7 @@ If you have downloaded the sources from an official source archive or the source
If you want to use Git, do the following from a terminal:
git clone --recursive http://github.com/DynareTeam/dynare.git
git clone --recursive https://git.dynare.org/Dynare/dynare.git
cd dynare
autoreconf -si
......@@ -219,9 +219,9 @@ Alternatively, if you want to build everything, manually install the following p
- `build-essential` (for gcc, g++ and make)
- `gfortran`
- `liboctave-dev` or `octave3.2-headers` (will install ATLAS)
- `liboctave-dev` (or `octave3.2-headers` on older systems)
- `libboost-graph-dev`
- `libgsl0-dev`
- `libgsl-dev` (or `libgsl0-dev` on older systems)
- `libmatio-dev`
- `libslicot-dev` and `libslicot-pic`
- `libsuitesparse-dev`
......@@ -235,9 +235,11 @@ Alternatively, if you want to build everything, manually install the following p
- `texlive-formats-extra` (for Eplain)
- `texlive-latex-extra` (for fullpage.sty)
- `texlive-fonts-extra` (for ccicons)
- `latex-beamer`
- `texlive-latex-recommended` (or `latex-beamer` on older systems)
- `texlive-science` (or `texlive-math-extra` on older systems) (for amstex)
- `texinfo`
- `texi2html`, `latex2html`
- `lmodern` (for macroprocessor PDF)
- `latex2html`
- `doxygen`
## Fedora
......@@ -253,7 +255,7 @@ Alternatively, if you want to build everything, manually install the following p
- `automake`
- `texlive`
- `texinfo`
- `texi2html`, `latex2html`
- `latex2html`
- `doxygen`
## Windows
......@@ -303,7 +305,7 @@ After this, prepare the source and configure the build tree as described for Lin
- **NB**: If not compiling Dynare mex files for Octave, add ```--without-octave``` to the installation command
- **NB**: To compile the latest stable version of dynare, follow the same instructions as above, omitting the ```--HEAD``` argument
- **NB**: To update a ```--HEAD``` install of dynare you need to uninstall it then install it again: ```brew uninstall dynare; brew install dynare --HEAD```.
- **NB**: If you want to maintain a separate git directory of dynare, you can do a ```--HEAD``` install of dynare, then uninstall it. This will have the effect of bringing in all the dependencies you will need to then compile dynare from your git directory. Then, change to the git directory and type:
- **NB**: If you want to maintain a separate git directory of dynare, you can do a ```--HEAD``` install of dynare, then uninstall it. This will have the effect of bringing in all the dependencies you will need to then compile dynare from your git directory. (For `flex` and `bison` it may be necessary to symlink them via `brew link bison --force` and `brew link flex --force` as they are keg-only). Then, change to the git directory and type:
- ```autoreconf -si; ./configure --with-matlab=/Applications/MATLAB_R2015a.app MATLAB_VERSION=R2015a```, adjusting the Matlab path and version to accord with your version
- Once compilation is done, open Matlab and type the last line shown when you type ```brew info dynare``` in the Terminal window. With the typical Homebrew setup, this is:
- ```addpath /usr/local/opt/dynare/lib/dynare/matlab```
@PACKAGE_VERSION@
\ No newline at end of file
dnl Process this file with autoconf to produce a configure script.
dnl Copyright (C) 2009-2016 Dynare Team
dnl Copyright (C) 2009-2017 Dynare Team
dnl
dnl This file is part of Dynare.
dnl
......@@ -18,7 +18,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with Dynare. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ([2.62])
AC_INIT([dynare], [4.5-unstable])
AC_INIT([dynare], [4.5.7])
AC_CONFIG_SRCDIR([preprocessor/DynareMain.cc])
AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability foreign no-dist-gzip dist-xz tar-pax])
......@@ -86,10 +86,6 @@ CPPFLAGS="$CPPFLAGS_SAVED"
# Don't use deprecated hash structures
AC_DEFINE([BOOST_NO_HASH], [], [Don't use deprecated STL hash structures])
# Check for dlopen(), needed by tests for estimation DLL
AC_CHECK_LIB([dl], [dlopen], [LIBADD_DLOPEN="-ldl"], [])
AC_SUBST([LIBADD_DLOPEN])
# Check for libmatio, needed by Dynare++
AX_MATIO
AM_CONDITIONAL([HAVE_MATIO], [test "x$has_matio" = "xyes"])
......@@ -117,9 +113,6 @@ 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"])
......@@ -172,6 +165,7 @@ esac
AX_PTHREAD
AC_CONFIG_FILES([Makefile
VERSION
preprocessor/macro/Makefile
preprocessor/Makefile
doc/Makefile
......@@ -202,10 +196,6 @@ AC_CONFIG_FILES([Makefile
dynare++/kord/Makefile
dynare++/src/Makefile
mex/sources/Makefile
mex/sources/estimation/Makefile
mex/sources/estimation/tests/Makefile
mex/sources/estimation/libmat/Makefile
mex/sources/estimation/libmat/tests/Makefile
])
AC_ARG_ENABLE([matlab], AS_HELP_STRING([--disable-matlab], [disable compilation of MEX files for MATLAB]), [], [enable_matlab=yes])
......@@ -281,10 +271,10 @@ fi
if test "x$MAKEINFO" != "x"; then
BUILD_DYNARE_INFO="yes"
if test "x$TEXI2HTML" != "x" -a "x$LATEX2HTML" != "x"; then
if test "x$LATEX2HTML" != "x"; then
BUILD_DYNARE_HTML_MANUAL="yes"
else
BUILD_DYNARE_HTML_MANUAL="yes (but with ugly math formulas, missing texi2html or latex2html)"
BUILD_DYNARE_HTML_MANUAL="yes (but with ugly math formulas, missing latex2html)"
fi
BUILD_DYNARE_PDF_MANUAL="yes"
else
......
dmm @ ea7846fd
Subproject commit ea7846fd71d32851877cf60008ac5046b51a7a51
Subproject commit 8b3d14040133ea5b622cde9ea79b3b0b41891bce
Subproject commit ce173d3fa2605957f7208bf624655893a7dc1768
......@@ -2,15 +2,14 @@ SUBDIRS = preprocessor macroprocessor userguide parallel internals gsa dseries-a
info_TEXINFOS = dynare.texi
if HAVE_TEXI2HTML
if HAVE_LATEX2HTML
html-local: dynare.html
# The temporary directory for latex2html (L2H_TMP) must not contain a dot, so
# enforce standard tmp directory instead of defaulting to current directory
dynare.html: dynare.texi
rm -rf dynare.html
mkdir -p dynare.html
cd dynare.html && $(TEXI2HTML) --l2h --split section --prefix index ../dynare.texi
endif
texi2any --html --split=section -c L2H=1 -c L2H_TMP=$${TMPDIR:-/tmp} -c PREFIX=dynare.html dynare.texi
endif
PDF_TARGETS =
......
......@@ -97,7 +97,7 @@
@c %**end of header
 
@copying
Copyright @copyright{} 1996-2017, Dynare Team.
Copyright @copyright{} 1996-2019, Dynare Team.
 
@quotation
Permission is granted to copy, distribute and/or modify this document
......@@ -114,8 +114,8 @@ A copy of the license can be found at @uref{http://www.gnu.org/licenses/fdl.txt}
@subtitle Reference Manual, version @value{VERSION}
@author Stéphane Adjemian
@author Houtan Bastani
@author Frédéric Karamé
@author Michel Juillard
@author Frédéric Karamé
@author Junior Maih
@author Ferhat Mihoubi
@author George Perendia
......@@ -171,14 +171,14 @@ Installation of Dynare
 
* On Windows::
* On Debian GNU/Linux and Ubuntu::
* On Mac OS X::
* On macOS::
* For other systems::
 
Compiler installation
 
* Prerequisites on Windows::
* Prerequisites on Debian GNU/Linux and Ubuntu::
* Prerequisites on Mac OS X::
* Prerequisites on macOS::
 
Configuration
 
......@@ -350,23 +350,21 @@ 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.
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, macOS, 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.fr, Cepremap} by a core team of
......@@ -377,7 +375,7 @@ Adjemian (Université du Maine, Gains and Cepremap), Houtan Bastani
(Université du Maine, Gains and Cepremap), Junior Maih (Norges Bank),
Ferhat Mihoubi (Université Paris-Est Créteil, Epee and Cepremap), George
Perendia, Johannes Pfeifer (University of Cologne), Marco Ratto (European Commission, Joint Research Centre - JRC)
and Sébastien Villemot (OFCE – Sciences Po).
and Sébastien Villemot (CEPREMAP).
Increasingly, the developer base is expanding, as tools developed by
researchers outside of Cepremap are integrated into Dynare. Financial
support is provided by Cepremap, Banque de France and DSGE-net (an
......@@ -407,8 +405,10 @@ New users should rather begin with Dynare User Guide (@cite{Mancini
@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}.
@uref{http://www.dynare.org/DynareWiki,old Dynare wiki}, the
@uref{https://git.dynare.org/Dynare/dynare/wikis/home,new Dynare wiki}, the documentation
section of the @uref{http://www.dynare.org/documentation-and-support,Dynare
website} and the @uref{https://forum.dynare.org/,Dynare forum}.
 
@node Citing Dynare in your research
@section Citing Dynare in your research
......@@ -417,10 +417,10 @@ If you would like to refer to Dynare in a research article, the
recommended way is to cite the present manual, as follows:
 
@quotation
Stéphane Adjemian, Houtan Bastani, Michel Juillard, Frédéric Karamé,
Ferhat Mihoubi, George Perendia, Johannes Pfeifer, Marco Ratto and
Sébastien Villemot (2011), ``Dynare: Reference Manual, Version 4,''
@i{Dynare Working Papers}, 1, CEPREMAP
Stéphane Adjemian, Houtan Bastani, Michel Juillard, Frédéric Karamé, Junior
Maih, Ferhat Mihoubi, George Perendia, Johannes Pfeifer, Marco Ratto and
Sébastien Villemot (2011), ``Dynare: Reference Manual, Version 4,'' @i{Dynare
Working Papers}, 1, CEPREMAP
@end quotation
 
Note that citing the Dynare Reference Manual in your research is a
......@@ -442,9 +442,9 @@ If you want to give a URL, use the address of the Dynare website:
@node Software requirements
@section Software requirements
 
Packaged versions of Dynare are available for Windows XP/Vista/7/8,
Packaged versions of Dynare are available for Windows XP/Vista/7/8/10,
@uref{http://www.debian.org,Debian GNU/Linux},
@uref{http://www.ubuntu.com/,Ubuntu} and Mac OS X 10.8 or later. Dynare should
@uref{http://www.ubuntu.com/,Ubuntu} and macOS 10.8 or later. Dynare should
work on other systems, but some compilation steps are necessary in that case.
 
In order to run Dynare, you need one of the following:
......@@ -452,10 +452,10 @@ In order to run Dynare, you need one of the following:
@itemize
 
@item
MATLAB version 7.5 (R2007b) or above (MATLAB R2009b 64-bit for Mac OS X);
MATLAB version 7.5 (R2007b) or above (MATLAB R2009b 64-bit for macOS);
 
@item
GNU Octave version 3.6 or above.
GNU Octave version 4.2.1 or above.
@end itemize
 
Packages of GNU Octave can be downloaded on the
......@@ -475,10 +475,6 @@ If under GNU Octave, the following
@uref{http://octave.sourceforge.net/,Octave-Forge} packages: optim,
io, statistics, control.
 
@item
Mac OS X Octave users will also need to install
gnuplot if they want graphing capabilities.
@end itemize
 
 
......@@ -495,7 +491,7 @@ about your own files.
@menu
* On Windows::
* On Debian GNU/Linux and Ubuntu::
* On Mac OS X::
* On macOS::
* For other systems::
@end menu
 
......@@ -526,25 +522,29 @@ Wiki} for detailed instructions.
Dynare will be installed under @file{/usr/lib/dynare}. Documentation will be
under @file{/usr/share/doc/dynare-doc}.
 
@node On Mac OS X
@subsection On Mac OS X
Execute the automated installer called
@file{dynare-4.@var{x}.@var{y}.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}}.
@node On macOS
@subsection On macOS
 
Please refer to the
To install Dynare for use with Matlab, execute the automated installer called
@file{dynare-4.@var{x}.@var{y}.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.
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{/Applications/Dynare}), as long as you correctly
adjust your path settings (@pxref{Some words of warning}).
Note that several versions of Dynare can coexist (by default in
@file{/Applications/Dynare}), as long as you correctly adjust your path
settings (@pxref{Some words of warning}).
To install Dynare for Octave, first install Homebrew following the instructions
on their site: @uref{https://brew.sh/}. Then install Octave, issuing the
command @code{brew install octave} at the Terminal prompt. You can then install
the latest stable version of Dynare by typing @code{brew install dynare} at the
Terminal prompt. You can also pass options to the installation command. These
options can be viewed by typing @code{brew info dynare} at the Terminal prompt.
 
@node For other systems
@subsection For other systems
......@@ -554,7 +554,7 @@ You need to download Dynare source code from the
 
Then you will need to recompile the pre-processor and the dynamic
loadable libraries. Please refer to
@uref{https://github.com/DynareTeam/dynare/blob/master/README.md,README.md}.
@uref{https://git.dynare.org/Dynare/dynare/blob/master/README.md,README.md}.
 
@node Compiler installation
@section Compiler installation
......@@ -573,7 +573,7 @@ Octave comes with built-in functionality for compiling mex-files.
@menu
* Prerequisites on Windows::
* Prerequisites on Debian GNU/Linux and Ubuntu::
* Prerequisites on Mac OS X::
* Prerequisites on macOS::
@end menu
 
@node Prerequisites on Windows
......@@ -601,9 +601,9 @@ it can be installed via @code{apt-get install build-essential}.
Users of Octave under Linux should install the package for MEX file compilation
(under Debian or Ubuntu, it is called @file{liboctave-dev}).
 
@node Prerequisites on Mac OS X
@subsection Prerequisites on Mac OS X
If you are using MATLAB under Mac OS X, you should install the latest
@node Prerequisites on macOS
@subsection Prerequisites on macOS
If you are using MATLAB under macOS, you should install the latest
version of XCode: see
@uref{http://www.dynare.org/DynareWiki/InstallOnMacOSX,instructions on
the Dynare wiki}.
......@@ -643,7 +643,7 @@ Under Debian GNU/Linux or Ubuntu, type:
addpath /usr/lib/dynare/matlab
@end example
 
Under Mac OS X, assuming that you have installed Dynare in the standard
Under macOS, assuming that you have installed Dynare in the standard
location, and replacing @code{4.@var{x}.@var{y}} with the correct version
number, type:
 
......@@ -658,7 +658,7 @@ will have to do it again.
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
``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.
......@@ -682,18 +682,16 @@ addpath c:\dynare\4.@var{x}.@var{y}\matlab
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:
Under macOS, assuming that you have installed Dynare and Octave via Homebrew, type:
 
@example
addpath /Applications/Dynare/4.@var{x}.@var{y}/matlab
addpath /usr/local/opt/dynare/lib/dynare/matlab
@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 be @file{c:\Documents and
Settings\USERNAME\} while under Mac OS X it is @file{/Users/USERNAME/}).
Settings\USERNAME\} while under macOS it is @file{/Users/USERNAME/}).
This file is run by Octave at every startup.
 
@node Some words of warning
......@@ -1052,6 +1050,13 @@ it did not expect. Hence, it throws an error of the form: @code{ERROR:
PARAMETERS}. In this case, you would simply place a semicolon at the
end of line one and the parser would continue processing.
 
It is also helpful to keep in mind that any piece of code that does not violate
Dynare syntax, but at the same time is not recognized by the parser, is interpreted
as native Matlab code. This code will be directly passed to the @code{driver.m}-file.
Investigating @code{driver.m}-file then helps with debugging. Such problems most often
occur when defined variable or parameter names have been misspelled so that Dynare's
parser is unable to recognize them.
@node The Model file
@chapter The Model file
 
......@@ -1090,6 +1095,12 @@ 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;}.
 
If Dynare encounters an unknown expression at the beginning of a line or after a semicolon,
it will parse the rest of that line as native Matlab code, even if there are
more statements separated by semicolons present. To prevent cryptic error
messages, it is strongly recommended to always only put one statement/command
into each line and start a new line after each semicolon.
Most Dynare commands have arguments and several accept options,
indicated in parentheses after the command keyword. Several options
are separated by commas.
......@@ -1171,9 +1182,10 @@ or @var{Sigma_e} to name your variable. Not conforming to this rule might yield
error messages or crashes. Second, to minimize interference with MATLAB or Octave functions that
may be called by Dynare or user-defined steady state files, it is recommended to avoid using the name
of MATLAB functions. In particular when working with steady state files, do not use correctly-spelled greek
names like @var{alpha}, because there are Matlab functions of the same name. Rather go for @var{alppha} or so.
names like @var{alpha}, because there are Matlab functions of the same name. Rather go for @var{alppha} or @var{alph}.
Lastly, please do not name a variable or parameter @var{i}. This may interfere with the imaginary
number @var{i} and the index in many loops. Rather, name investment @var{invest}.
number @var{i} and the index in many loops. Rather, name investment @var{invest}. Using @var{inv} is also not recommended
as it alread denotes the inverse operator.
 
Declarations of variables and parameters are made with the following commands:
 
......@@ -1890,7 +1902,7 @@ different purposes by allowing the user to attach arbitrary informations to each
equation and to recover them at runtime. For instance, it is possible to name the
equations with a @code{name}-tag, using a syntax like:
@example
mode;
model;
...
[name = 'Budget constraint']
c + k = k^theta*A;
......@@ -1902,7 +1914,7 @@ of the model is tagged with a name, the @code{resid} command
will display the name of the equations (which may be more informative than the
equation numbers) in addition to the equation number. Several tags for one equation can be separated using a comma.
@example
mode;
model;
...
[name='Taylor rule',mcp = 'r > -1.94478']
r = rho*r(-1) + (1-rho)*(gpi*Infl+gy*YGap) + e;
......@@ -2268,7 +2280,7 @@ static equilibria, but not necessarily.
One typical application is to consider an economy at the equilibrium at time 0,
trigger a shock in first period, and study the trajectory of return to
the initial equilibrium. To do that, one needs @code{initval} and
@code{shocks} (@pxref{Shocks on exogenous variables}.
@code{shocks} (@pxref{Shocks on exogenous variables}).
 
Another one is to study, how an economy, starting from arbitrary
initial conditions at time 0 converges toward equilibrium.
......@@ -3139,7 +3151,7 @@ option, @pxref{Model declaration})
Trust-region algorithm on the entire model.
 
@item 10
Levenberg-Marquardt mixed compleproblem (LMMCP) solver
Levenberg-Marquardt mixed complementarity problem (LMMCP) solver
(@cite{Kanzow and Petra 2004})
 
@item 11
......@@ -3586,7 +3598,7 @@ 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}
@item SOLVE BACKWARD @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
......@@ -4292,7 +4304,7 @@ If option @code{periods} is present, sets @code{oo_.skewness},
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}
If option @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).
......@@ -4347,7 +4359,7 @@ The variables are arranged in declaration order.
@end defvr
 
@defvr {MATLAB/Octave variable} oo_.kurtosis
After a run of @code{stoch_simul} contains the kurtosis (standardized fourth moment)
After a run of @code{stoch_simul} contains the excess kurtosis (standardized fourth moment)
of the simulated variables if the @code{periods} option is present.
The variables are arranged in declaration order.
@end defvr
......@@ -4718,7 +4730,7 @@ 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
\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
......@@ -4880,7 +4892,7 @@ likelihood estimation. In a Bayesian estimation context, sets a lower bound
only effective while maximizing the posterior kernel. This lower bound does not
modify the shape of the prior density, and is only aimed at helping the
optimizer in identifying the posterior mode (no consequences for the MCMC). For
some prior densities (namely inverse gamma, gamma, uniform, beta or weibull) it is
some prior densities (namely inverse gamma, gamma, uniform, beta or Weibull) it is
possible to shift the support of the prior distributions to the left or the right using
@ref{prior_3rd_parameter}. In this case the prior density is effectively
modified (note that the truncated Gaussian density is not implemented in
......@@ -4908,7 +4920,7 @@ that @code{inv_gamma_pdf} is equivalent to
@item @var{PRIOR_3RD_PARAMETER}
@anchor{prior_3rd_parameter}
A third parameter of the prior used for generalized beta distribution,
generalized gamma, generalized weibull and for the uniform distribution. Default: @code{0}
generalized gamma, generalized Weibull and for the uniform distribution. Default: @code{0}
 
@item @var{PRIOR_4TH_PARAMETER}
@anchor{prior_4th_parameter}
......@@ -5659,14 +5671,14 @@ A real number between zero and one. The scale parameter of the jumping distribut
@item 'InitialCovarianceMatrix'
Initial covariance matrix of the jumping distribution. Default is @code{'previous'} if option @code{mode_file} is used, @code{'prior'} otherwise.
 
@item 'nclimb'
Number of iterations in the last MCMC (climbing mode).
@item 'nclimb-mh'
Number of iterations in the last MCMC (climbing mode). Default: @code{200000}
 
@item 'ncov-mh'
Number of iterations used for updating the covariance matrix of the jumping distribution. Default: @code{20000}
 
@item 'nscale-mh'
Maximum number of iterations used for adjusting the scale parameter of the jumping distribution. @code{200000}
Maximum number of iterations used for adjusting the scale parameter of the jumping distribution. Default: @code{200000}
 
@item 'NumberOfMh'
Number of MCMC run sequentially. Default: @code{3}
......@@ -5809,7 +5821,7 @@ distribution of IRFs. The length of the IRFs are controlled by the
weight of the DSGE prior of the VAR model is calibrated to the value
passed (see @cite{Del Negro and Schorfheide (2004)}). It represents ratio of dummy over actual observations.
To assure that the prior is proper, the value must be bigger than @math{(k+n)/T},
where @math{k} is the number of estimated parameters, @math{n} is the number of observables, #
where @math{k} is the number of estimated parameters, @math{n} is the number of observables,
and @math{T} is the number of observations. 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
......@@ -6072,7 +6084,7 @@ singularity is encountered, Dynare by default automatically switches to the univ
recursions as described by @cite{Herbst, 2015}. This setting is only used with
@code{kalman_algo=1} or @code{kalman_algo=3}. In case of using the diffuse Kalman
filter (@code{kalman_algo=3/lik_init=3}), the observables must be stationary. This option
is not yet compatible with @code{analytical_derivation}.
is not yet compatible with @ref{analytic_derivation}.
 
@item kalman_tol = @var{DOUBLE}
@anchor{kalman_tol} Numerical tolerance for determining the singularity of the covariance matrix of the prediction errors during the Kalman filter (minimum allowed reciprocal of the matrix condition number). Default value is @code{1e-10}
......@@ -6218,9 +6230,10 @@ where the model is ill-behaved. By default the original objective function is
used.
 
@item analytic_derivation
@anchor{analytic_derivation}
Triggers estimation with analytic gradient. The final hessian is also
computed analytically. Only works for stationary models without
missing observations.
missing observations, i.e. for @code{kalman_algo<3}.
 
@item ar = @var{INTEGER}
@xref{ar}. Only useful in conjunction with option @code{moments_varendo}.
......@@ -6720,8 +6733,8 @@ observation for which the forecast has been made.
@defvr {MATLAB/Octave variable} oo_.Smoother.State_uncertainty
@anchor{oo_.Smoother.State_uncertainty}
Three-dimensional array set by the @code{estimation} command (if used with the
@code{smoother}) without Metropolis,
or by the @code{calib_smoother} command, if the @code{o_smoothed_state_uncertainty} option
@code{smoother} option) without Metropolis,
or by the @code{calib_smoother} command, if the @code{smoothed_state_uncertainty} option
has been requested.
Contains the series of covariance matrices for the state estimate given the full data
from the Kalman smoother. The @code{M_.endo_nbr} times @code{M_.endo_nbr} times
......@@ -7299,9 +7312,9 @@ model).
(@xref{plot_shock_decomposition}).
 
@item presample = @var{INTEGER}
@anchor{presample_shock_decomposition} First data point from which recursive
@anchor{presample_shock_decomposition} Data point above which recursive
realtime shock decompositions are computed, @i{i.e.} for
@math{T=[@code{presample}@dots{}@code{nobs}]}.
@math{T=[@code{presample+1}@dots{}@code{nobs}]}.
 
@item forecast = @var{INTEGER}
@anchor{forecast_shock_decomposition} Compute shock decompositions up to
......@@ -7662,7 +7675,7 @@ uncertainty, but ignoring the effect of measurement error on
observed variables
 
@item HPDsup
Lower bound of a 90% HPD interval due to parameter uncertainty, but
Upper bound of a 90% HPD forecast interval due to parameter uncertainty, but
ignoring the effect of measurement error on
observed variables
 
......@@ -7672,7 +7685,7 @@ to change the size of the HPD interval} of forecast for observed variables
due to parameter uncertainty and measurement error
 
@item HPDsup_ME
Lower bound of a 90% HPD interval of forecast for observed variables
Upper bound of a 90% HPD interval of forecast for observed variables
due to parameter uncertainty and measurement error
 
@item Mean
......@@ -7720,7 +7733,7 @@ Fields are of the form:
@end defvr
 
 
@deffn Command conditional_forecast (@var{OPTIONS}@dots{}) [@var{VARIABLE_NAME}@dots{}];
@deffn Command conditional_forecast (@var{OPTIONS}@dots{});
@anchor{conditional_forecast}
@descriptionhead
 
......@@ -7775,7 +7788,7 @@ 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.
Use @ref{plot_conditional_forecast} to graph the results.
 
@optionshead
 
......@@ -7871,7 +7884,8 @@ periods 1:5;
values 3;
end;
 
conditional_forecast(parameter_set = calibration, controlled_varexo = (e, u), replic = 3000);
conditional_forecast(parameter_set = calibration, controlled_varexo = (e, u),
replic = 3000);
 
plot_conditional_forecast(periods = 10) a y;
@end example
......@@ -7900,7 +7914,7 @@ it is necessary to specify the logarithm of the controlled variables.
 
@deffn Command plot_conditional_forecast [@var{VARIABLE_NAME}@dots{}];
@deffnx Command plot_conditional_forecast (periods = @var{INTEGER}) [@var{VARIABLE_NAME}@dots{}];
@anchor{plot_conditional_forecast}
@descriptionhead
 
Plots the conditional (plain lines) and unconditional (dashed lines) forecasts.
......@@ -8272,11 +8286,11 @@ Note that the use of this block requires the use of a constrained optimizer, @i{
 
@example
 
osr_param_bounds;
osr_params_bounds;
gamma_inf_, 0, 2.5;
end;
 
osr(solve_algo=9) y;
osr(opt_algo=9) y;
@end example
 
@end deffn
......@@ -9162,7 +9176,7 @@ named as:
@code{<namendo>_vs_<namexo>}: for entries of the matrix of the shocks.
@end itemize
 
The following files are stored in each directory (we stick with prior sample but similar convetins are used for MC samples):
The following files are stored in each directory (we stick with prior sample but similar conventions are used for MC samples):
@itemize
@item
@code{<mod_file>_prior_<namendo>_vs_<namexo>.fig}: histogram and CDF plot of the MC sample of the individual entry
......@@ -9433,12 +9447,12 @@ that of the parameter at @code{t-1}.
 
@end table
 
In case of estimating a MS-DSGE model,@footnote{An example can be found at @uref{https://github.com/DynareTeam/dynare/blob/master/tests/ms-dsge/test_ms_dsge.mod}.} in addition the following options are allowed:
In case of estimating a MS-DSGE model,@footnote{An example can be found at @uref{https://git.dynare.org/Dynare/dynare/blob/master/tests/ms-dsge/test_ms_dsge.mod}.} in addition the following options are allowed:
 
@table @code
 
@item parameters = @var{[LIST OF PARAMETERS]}
This option specifies which parameters are controlled by this Markov Chai
This option specifies which parameters are controlled by this Markov Chain.
 
@item number_of_lags = @var{DOUBLE}
Provides the number of lags that each parameter can take within each regime in this chain.
......@@ -10685,8 +10699,8 @@ This file computes the steady state. It begins with:
@@#include "modeqs.mod"
@end example
Then it initializes parameters (including @code{lab_rat}, excluding
@math{\alpha}, computes the steady state (using guess values for
endogenous, including @math{\alpha}, then saves values of parameters
@math{\alpha}), computes the steady state (using guess values for
endogenous, including @math{\alpha}), then saves values of parameters
and endogenous at steady state in a file, using the
@code{save_params_and_steady_state} command.
 
......@@ -10743,7 +10757,7 @@ array (@code{rhos}).
The advantage of this method is that it uses a shorter syntax, since
list of values directly given in the loop construct. Note that values
are given as character strings (the macro-processor does not know
floating point values. The inconvenient is that you can not reuse an
floating point values). The inconvenience is that you can not reuse an
array stored in a MATLAB/Octave variable.
 
@end table
......@@ -10923,7 +10937,7 @@ 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
On Linux and macOS, 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,
......@@ -11184,7 +11198,7 @@ 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
and macOS, 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}
......@@ -11688,7 +11702,7 @@ ans =
 
@deftypefn{dates} {@var{C} =} gt (@var{A}, @var{B})
 
Overloads the Matlab/Octave @code{gt} (greater than, @code{>=}) operator. @dates objects @var{A} and @var{B} must have the same number of elements (say, @code{n}). The returned argument is a @code{n} by @code{1} vector of zeros and ones. The i-th element of @var{C} is equal to @code{1} if and only if the date @code{A(i)} is posterior to the date @code{B(i)}.
Overloads the Matlab/Octave @code{gt} (greater than, @code{>}) operator. @dates objects @var{A} and @var{B} must have the same number of elements (say, @code{n}). The returned argument is a @code{n} by @code{1} vector of zeros and ones. The i-th element of @var{C} is equal to @code{1} if and only if the date @code{A(i)} is posterior to the date @code{B(i)}.
 
@examplehead
@example
......@@ -11837,7 +11851,7 @@ ans =
 
@deftypefn{dates} {@var{C} =} lt (@var{A}, @var{B})
 
Overloads the Matlab/Octave @code{lt} (less than, @code{<=}) operator. @dates objects @var{A} and @var{B} must have the same number of elements (say, @code{n}). The returned argument is a @code{n} by @code{1} vector of zeros and ones. The i-th element of @var{C} is equal to @code{1} if and only if the date @code{A(i)} preceeds the date @code{B(i)}.
Overloads the Matlab/Octave @code{lt} (less than, @code{<}) operator. @dates objects @var{A} and @var{B} must have the same number of elements (say, @code{n}). The returned argument is a @code{n} by @code{1} vector of zeros and ones. The i-th element of @var{C} is equal to @code{1} if and only if the date @code{A(i)} preceeds the date @code{B(i)}.
 
@examplehead
@example
......@@ -13606,7 +13620,7 @@ Instantiates a @code{Report} object.
The full path to the @LaTeX{} compiler on your system. If this option
is not provided, Dynare will try to find the appropriate program to
compile @LaTeX{} on your system. Default is system dependent: Windows:
the result of @code{findtexmf --file-type=exe pdflatex}, Mac OS X and
the result of @code{findtexmf --file-type=exe pdflatex}, macOS and
Linux: the result of @code{which pdflatex}
 
@item showDate, @code{BOOLEAN}
......@@ -13711,7 +13725,7 @@ command. Default: @code{`!'}
@end defmethod
 
@anchor{addGraph}
@defmethod Report addGraph axisShape, data, graphDirName, graphName, graphSize, height, showGrid, showLegend, legendAt, showLegendBox, legendLocation, legendOrientation, legendFontSize, miscTikzAxisOptions, miscTikzPictureOptions, seriesToUse, shade, shadeColor, shadeOpacity, tickFontSize, title, titleFontSize, titleFormat, width, writeCSV, xlabel, ylabel, xAxisTight, xrange, xTicks, xTickLabels, xTickLabelAnchor, xTickLabelRotation, yAxisTight, yTickLabelFixed, yTickLabelPrecision, yTickLabelScaled, yTickLabelZeroFill, yrange, showZeroline, zeroLineColor
@defmethod Report addGraph axisShape, data, graphDirName, graphName, graphSize, height, showGrid, showLegend, legendAt, showLegendBox, legendLocation, legendOrientation, legendFontSize, miscTikzAxisOptions, miscTikzPictureOptions, seriesToUse, shade, shadeColor, shadeOpacity, tickFontSize, title, titleFontSize, titleFormat, width, writeCSV, xlabel, ylabel, xAxisTight, xrange, xTicks, xTickLabels, xTickLabelAnchor, xTickLabelRotation, yAxisTight, yTickLabelFixed, yTickLabelPrecision, yTickLabelScaled, yTickLabelZeroFill, yrange, showZeroLine, zeroLineColor
Adds a @code{Graph} to a @code{Section}.
@optionshead
@table @code
......@@ -14175,7 +14189,7 @@ Print the compiler output to the screen. Useful for debugging your code as the
@ref{showOutput}
 
@item showReport, @code{BOOLEAN}
Open the compiled report (works on Windows and OS X on Matlab). Default:
Open the compiled report (works on Windows and macOS on Matlab). Default:
@code{true}
 
@end table
......@@ -14432,6 +14446,13 @@ Computes and displays first and second order moments of the endogenous
variables at the prior mode (considering the linearized version of the
model).
 
@item moments(distribution)
Computes and displays the prior mean and prior standard deviation of the
first and second moments of the endogenous variables (considering the
linearized version of the model) by randomly sampling from the prior.
The results will also be stored in the @code{prior} subfolder in a
@code{_endogenous_variables_prior_draws.mat} file.
@item optimize
Optimizes the prior density (starting from a random initial guess). The
parameters such that the steady state does not exist or does not satisfy
......@@ -14476,7 +14497,7 @@ Cycles: The Cycle is the Trend,'' @i{NBER Working Paper}, 10734
Amisano, Gianni and Tristani, Oreste (2010): ``Euro area inflation persistence in an estimated nonlinear DSGE model'', @i{Journal of Economic Dynamics and Control}, 34(10), 1837--1858
 
@item
Andreasen, Martin M., Jesús Fernández-Villaverde, and Juan Rubio-Ramírez (2013): ``The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications,'' @i{NBER Working Paper}, 18983
Andreasen, Martin M., Jesús Fernández-Villaverde, and Juan Rubio-Ramírez (2018): ``The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications,'' @i{Review of Economic Studies}, 85(1), 1--49
 
@item
Andrews, Donald W.K (1991): ``Heteroskedasticity and autocorrelation consistent covariance matrix estimation'',
......@@ -14500,10 +14521,10 @@ and Control}, 19, 711--734
@item
Brooks, Stephen P., and Andrew Gelman (1998): ``General methods for
monitoring convergence of iterative simulations,'' @i{Journal of
computational and graphical statistics}, 7, pp. 434--455
Computational and Graphical Statistics}, 7, pp. 434--455
 
@item
Cardoso, Margarida F., R. L. Salcedo and S. Feyo de Azevedo (1996): ``The simplex simulated annealing approach to continuous non-linear optimization,'' @i{Computers chem. Engng}, 20(9), 1065-1080
Cardoso, Margarida F., R. L. Salcedo and S. Feyo de Azevedo (1996): ``The simplex simulated annealing approach to continuous non-linear optimization,'' @i{Computers & Chemical Engineering}, 20(9), 1065-1080
 
@item
Chib, Siddhartha and Srikanth Ramamurthy (2010):
......@@ -14704,7 +14725,7 @@ Models of the Business Cycle: A Bayesian Approach,'' Federal Reserve
of Atlanta, @i{Working Paper Series}, 2003-30.
 
@item
Raftery, Adrien E. and Steven Lewis (1992): ``How many iterations in the Gibbs sampler?,'' in @i{Bayesian Statistics, Vol. 4},
Raftery, Adrian E. and Steven Lewis (1992): ``How many iterations in the Gibbs sampler?,'' in @i{Bayesian Statistics, Vol. 4},
ed. J.O. Berger, J.M. Bernardo, A.P. Dawid, and A.F.M. Smith, Clarendon Press: Oxford, pp. 763-773.
 
@item
......
......@@ -8,12 +8,11 @@
\usetheme{Boadilla}
\title{The Dynare Macro-processor}
\subtitle{Dynare Summer School 2015}
\subtitle{Dynare Summer School 2017}
\author{Sébastien Villemot}
%\pgfdeclareimage[height=0.6cm]{logo}{logo-ofce}
%\institute[OFCE]{\pgfuseimage{logo}}
\institute{OFCE}
\date{June 9, 2015}
\date{June 13, 2017}
\AtBeginSection[]
{
......@@ -91,30 +90,6 @@
\end{itemize}
\end{frame}
\begin{frame}[fragile=singleslide]
\frametitle{Inclusion directive}
\begin{itemize}
\item This directive simply includes the content of another file at the place where it is inserted.
\begin{block}{Syntax}
\verb+@#include "+\textit{filename}\verb+"+
\end{block}
\begin{block}{Example}
\begin{verbatim}
@#include "modelcomponent.mod"
\end{verbatim}
\end{block}
\item Exactly equivalent to a copy/paste of the content of the included file
\item Note that it is possible to nest includes (\textit{i.e.} to include a file from an included file)
\item Since Dynare 4.5, the filename can be given by a macro-variable (see below).
Useful in loops.
\begin{block}{Example with variable}
\begin{verbatim}
@#define fname = "modelcomponent.mod"
@#include fname
\end{verbatim}
\end{block}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Variables}
......@@ -219,6 +194,41 @@ end;
\end{block}
\end{frame}
\begin{frame}[fragile=singleslide]
\frametitle{Inclusion directive (1/2)}
\begin{itemize}
\item This directive simply includes the content of another file at the place where it is inserted.
\begin{block}{Syntax}
\verb+@#include "+\textit{filename}\verb+"+
\end{block}
\begin{block}{Example}
\begin{verbatim}
@#include "modelcomponent.mod"
\end{verbatim}
\end{block}
\item Exactly equivalent to a copy/paste of the content of the included file
\item Note that it is possible to nest includes (\textit{i.e.} to include a
file from an included file)
\end{itemize}
\end{frame}
\begin{frame}[fragile=singleslide]
\frametitle{Inclusion directive (2/2)}
\begin{itemize}
\item The filename can be given by a macro-variable (useful in loops):
\begin{block}{Example with variable}
\begin{verbatim}
@#define fname = "modelcomponent.mod"
@#include fname
\end{verbatim}
\end{block}
\item Files to include are searched for in current directory. Other directories can
be added with
\texttt{@includepath} directive, \texttt{-I} command line option or
\texttt{[paths]} section in config file.
\end{itemize}
\end{frame}
\begin{frame}[fragile=singleslide]
\frametitle{Loop directive}
\begin{block}{Syntax}
......@@ -604,7 +614,7 @@ rhos = [ 0.8, 0.9, 1];
\ccbysa
\column{0.71\textwidth}
\tiny
Copyright © 2008--2015 Dynare Team \\
Copyright © 2008--2017 Dynare Team \\
Licence: \href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative
Commons Attribution-ShareAlike 4.0}
\end{columns}
......
......@@ -2,6 +2,7 @@
% AMS-LaTeX Paper ************************************************
% **** -----------------------------------------------------------
\documentclass[12pt,a4paper,pdftex,nofootinbib]{article}
\usepackage[cp1252]{inputenc}
\usepackage{amssymb,amsmath}
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}
......
......@@ -100,6 +100,7 @@ SimResults::~SimResults()
for (int i = 0; i < getNumSets(); i++) {
delete data[i];
delete shocks[i];
delete start[i];
}
}
......@@ -149,7 +150,7 @@ which are not to be burnt. If the data is not finite, the both data
and shocks are thrown away.
@<|SimResults::addDataSet| code@>=
bool SimResults::addDataSet(TwoDMatrix* d, ExplicitShockRealization* sr)
bool SimResults::addDataSet(TwoDMatrix* d, ExplicitShockRealization* sr, const ConstVector& st)
{
KORD_RAISE_IF(d->nrows() != num_y,
"Incompatible number of rows for SimResults::addDataSets");
......@@ -160,6 +161,10 @@ bool SimResults::addDataSet(TwoDMatrix* d, ExplicitShockRealization* sr)
data.push_back(new TwoDMatrix((const TwoDMatrix&)(*d),num_burn,num_per));
shocks.push_back(new ExplicitShockRealization(
ConstTwoDMatrix(sr->getShocks(),num_burn,num_per)));
if (num_burn == 0)
start.push_back(new Vector(st));
else
start.push_back(new Vector(ConstVector(*d, num_burn-1)));
ret = true;
}
......@@ -527,7 +532,7 @@ void SimulationWorker::operator()()
TwoDMatrix* m = dr.simulate(em, np, st, *esr);
{
SYNCHRO syn(&res, "simulation");
res.addDataSet(m, esr);
res.addDataSet(m, esr, st);
}
}
......@@ -540,13 +545,11 @@ void SimulationIRFWorker::operator()()
ExplicitShockRealization* esr =
new ExplicitShockRealization(res.control.getShocks(idata));
esr->addToShock(ishock, 0, imp);
const TwoDMatrix& data = res.control.getData(idata);
ConstVector st(data, res.control.getNumBurn());
TwoDMatrix* m = dr.simulate(em, np, st, *esr);
TwoDMatrix* m = dr.simulate(em, np, res.control.getStart(idata), *esr);
m->add(-1.0, res.control.getData(idata));
{
SYNCHRO syn(&res, "simulation");
res.addDataSet(m, esr);
res.addDataSet(m, esr, res.control.getStart(idata));
}
}
......
......@@ -694,7 +694,8 @@ bool calcFixPoint(emethod em, Vector& out)
@ This is a basically a number of matrices of the same dimensions,
which can be obtained as simulation results from a given decision rule
and shock realizations. We also store the realizations of shocks.
and shock realizations. We also store the realizations of shocks and the
starting point of each simulation.
@<|SimResults| class declaration@>=
class ExplicitShockRealization;
......@@ -705,6 +706,7 @@ protected:@;
int num_burn;
vector<TwoDMatrix*> data;
vector<ExplicitShockRealization*> shocks;
vector<Vector *> start;
public:@;
SimResults(int ny, int nper, int nburn = 0)
: num_y(ny), num_per(nper), num_burn(nburn)@+ {}
......@@ -723,7 +725,9 @@ public:@;
{@+ return *(data[i]);@+}
const ExplicitShockRealization& getShocks(int i) const
{ @+ return *(shocks[i]);@+}
bool addDataSet(TwoDMatrix* d, ExplicitShockRealization* sr);
const Vector& getStart(int i) const
{ return *(start[i]); }
bool addDataSet(TwoDMatrix* d, ExplicitShockRealization* sr, const ConstVector& st);
void writeMat(const char* base, const char* lname) const;
void writeMat(mat_t* fd, const char* lname) const;
};
......
......@@ -22,7 +22,7 @@ to select (return true) the pairs for which $\alpha<\beta$.
@<|order_eigs| function code@>=
lapack_int order_eigs(const double* alphar, const double* alphai, const double* beta)
{
return (*alphar * *alphar + *alphai * *alphai < *beta * *beta * qz_criterium);
return (*alphar * *alphar + *alphai * *alphai < *beta * *beta * qz_criterium * qz_criterium);
}
......
......@@ -101,7 +101,11 @@ void SystemResources::getRUS(double& load_avg, long int& pg_avail,
majflt = -1;
#endif
#if !defined(__MINGW32__) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) && !defined(__MINGW64__) && !defined(__CYGWIN64__)
#define MINGCYGTMP (!defined(__MINGW32__) && !defined(__CYGWIN32__) && !defined(__CYGWIN__))
#define MINGCYG (MINGCYGTMP && !defined(__MINGW64__) && !defined(__CYGWIN64__))
#if MINGCYG
getloadavg(&load_avg, 1);
#else
load_avg = -1.0;
......
......@@ -159,9 +159,9 @@ KOrder::KOrder(int num_stat, int num_pred, int num_both, int num_forw,
KORD_RAISE_IF(gy.nrows() != ypart.ny(),
"Wrong number of rows in gy in KOrder constructor");
KORD_RAISE_IF(gu.nrows() != ypart.ny(),
"Wrong number of rows in gu in KOrder constuctor");
"Wrong number of rows in gu in KOrder constructor");
KORD_RAISE_IF(gu.ncols() != nu,
"Wrong number of columns in gu in KOrder constuctor");
"Wrong number of columns in gu in KOrder constructor");
// set nvs:
nvs[0] = ypart.nys(); nvs[1] = nu; nvs[2] = nu; nvs[3] = 1;
......