Refactor Dynare 4.6 release notes authored by Sébastien Villemot's avatar Sébastien Villemot
This page documents the new features in Dynare. For previous versions of Dynare, please read the dedicated frozen page on the [DynareWiki](http://www.dynare.org/DynareWiki/NewFeatures). This page documents the changes between Dynare versions (including the unstable
noe). For previous versions of Dynare, please read the dedicated frozen page on
the [DynareWiki](http://www.dynare.org/DynareWiki/NewFeatures).
Dynare 4.7 (unstable)
---------------------
Dynare 4.6 Dynare 4.6
---------- ----------
- The perturbation method is now available at an arbitrary approximation order. In other words, the `order` option of `stoch_simul` accepts an arbitrary positive integer (of course, up to some model-specific computational limit) (see #217 for details) - Stochastic simulations
- (Nonlinear) estimation is also now available at an arbitrary approximation - The perturbation method is now available at an arbitrary approximation
order (#1673) order. In other words, the `order` option of `stoch_simul` accepts an
arbitrary positive integer (of course, up to some model-specific
computational limit). (#217)
- Improvements to `identification` command: - New option `filtered_theoretical_moments_grid` of `stoch_simul`, that
supersedes `hp_ngrid`.
- added minimal system identification check of *Komunjer and Ng (2011, Econometrica)* - Estimation
- added spectrum identification check of *Qu and Tkachenko (2012, Quantitative Economics)*
- all tests (moments, spectrum, minimal system, strength) can be turned off
- more numerical options which can be changed by the user
- improved printing and storage (same folder) of results
- fixed numerical derivatives
- fixed functionality when there is correlation of shocks or one wants to consider corr parameters for both analytical as well as numerical derivatives
- Reference: !1648
- Optimal policy - (Nonlinear) estimation is now also available at an arbitrary approximation
- :warning: The `ramsey_policy`-command is now deprecated. It is superseded by calls to `ramsey_policy`, `stoch_simul`, and `evaluate_planner_objective` (see https://git.dynare.org/Dynare/dynare/wikis/BreakingFeaturesIn4.6) order. In other words, the `order` option of `estimation` accepts an
- New command `evaluate_planner_objective` to compute the value of the `planner_objective` (https://git.dynare.org/Dynare/dynare/issues/1678) arbitrary positive integer (of course, up to some model-specific
- New option `planner_discount_latex_name` of `ramsey_policy` (#1686) computational limit). (#1673)
- It is now possible to estimate a model under optimal policy (either
Ramsey or discretionary) (#1173)
- Improvements to option `use_dll`: - Various improvements to particle filters.
- compilation is now faster on large models (by disabling targeted optimization flags in the compiler) - It is now possible to estimate models under optimal policy (see below).
- it is no longer necessary to configure MATLAB for compiling MEX files, since the compilation is done by the preprocessor; on Windows, a suitable compiler (MinGW) ships with the Dynare installer; on other platforms, GCC must be in the path
- Improvements to perfect foresight simulation and extended path: a significant speed improvement should be noted on large models (when neither `bytecode` nor `block` option is used). The stacked problem is now constructed using a MEX file that greatly speeds up the process (in particular, the time spent in that step can become negligible when the `use_dll` option is used). - Variance decomposition of observables now accounts for measurement error.
(#1486)
- Various improvements to particle filters (TO BE DETAILED) - New option `mh_tune_jscale` of `estimation` command for tuning the scale
parameter of the proposal distribution of the Random Walk Metropolis
Hastings.
- Options `solve_algo=7`, `stack_solve_algo=2` and `mode_compute=1` now work under Octave - Added debugging info when parameters take a `NaN` or `Inf` value. (!1538)
- In `conditional_forecast_paths`, it is no longer required that all constrained paths be of the same length. There may now be a different number of controlled variables at each period. In that case, the order of declaration of endogenous controlled variables and of `controlled_varexo` matters: if the second endogenous variable is controlled for less periods than the first one, the second `controlled_varexo` isn't set for the last periods. (see #699) - Option `mode_compute=1` is now available under Octave.
- Perfect foresight and extended path
- Added JSON output to the preprocessor. A representation of the model file and the whole content of the `*.mod` file is saved in `*.json` files. These JSON files can be easily parsed from any language (C++, Fortran, Python, Julia, Matlab, ...). This new feature opens the possibility to develop alternative back-ends for the Dynare language. - A significant speed improvement should be noted on large models (when
neither `bytecode` nor `block` option is used). The stacked problem is
now constructed using a dedicated machine-compiled library that greatly
speeds up the process (in particular, the time spent in that step can
become negligible when the `use_dll` option is used).
- Added the possibility to declare Dynare command options in the mod file. - New options `print` and `noprint` of `perfect_foresight_solver` command.
(#1647)
- Discretionary policy returns a more informative error message when the objective has nonzero derivatives with respect to some variables. (!1468) - Option `stack_solve_algo=2` is now available under Octave.
- `write_latex_static_model` and `write_latex_original_model` now support the `write_equation_tags`-option (#1431) - Steady state
- The `calib_smoother`-command now take the option `parameter_set` (#1477) - Option `solve_algo=7` is now available under Octave.
- New command `model_local_variable` that allows defining LaTeX-expressions for model-local variables (#563) - Optimal policy
- Always write `M_.state_var`, independently of what commands are issued (#637) - The `ramsey_policy` command is now deprecated. It is superseded by
successive calls to `ramsey_model`, `stoch_simul`, and
`evaluate_planner_objective` (in this order). (#1678)
- New command-line option `nopreprocessoroutput` (#1390) - It is now possible to estimate a model under optimal policy (either
Ramsey or discretionary) by running the `estimation` command after either
`ramsey_model` or `discretionary_policy`. It is however not yet possible
to estimate parameters that appear in the discount factor of the social
planner. (#1173)
- New command `write_latex_steady_state_model` (#1496) - Discretionary policy returns a more informative error message when the
objective has nonzero derivatives with respect to some variables. (!1468)
- Ability to call the preprocessor by passing the `.mod` file as a string argument from the macOS or GNU/Linux command line (#1509) - Identification (!1648)
- Variance decomposition of observables now accounts for measurement error (#1486) - Added minimal system identification check of *Komunjer and Ng (2011,
Econometrica)*.
- New dynare option `noemptylinemacro` (#1551) - Added spectrum identification check of *Qu and Tkachenko (2012,
Quantitative Economics)*.
- The Macro processor has been rewritten - All tests (moments, spectrum, minimal system, strength) can be turned
- New features off.
- `elseif`-clauses are now supported
- a `defined()`-function allows testing whether macro variables have been defined - More numerical options can be changed by the user.
- Empty arrays (with the `[]` syntax) are now possible (#707)
- Arrays of arrays are now possible - Improved printing and storage (same folder) of results.
- New types: Double, Tuple, Function
- New macro directives `@#echomacrovars` and `@#echomacrovars(save)` (#1564) - Sensitivity analysis
- Inline comments are now supported
- Support for comprehensions - New `diffuse_filter` option to the `dynare_sensitivity` command. (!1562)
- :warning: Breaking changes
- :warning: All division operations are now done with doubles (as opposed to integers). To achieve the old functionality, use the new `floor` operator. - Arbitrary expressions can now be passed for the interval boundaries in
- :warning: Colon syntax used to require braces around it to create an array (e.g. `[1:3]` would create `[1,2,3]`). Now this is not necessary (`1:3` creates `[1,2,3]` while `[1:3]` would create `[[1,2,3]]`) `irf_calibration` and `moment_calibration`. :warning: This breaks the
- :warning: Previously, printing a boolean would print `1` or `0`. Now, it prints `true` or `false`. To achieve the old functionality, you must cast it to a real, e.g. `@{(real)(1!=0)}` previous syntax, requiring that the lower/upper bounds be separated by
commas. (preprocessor#12)
- Forecasting and smoothing
- Dseries and Reporting have been rewritten using the Matlab/Octave `classdef` syntax - In `conditional_forecast_paths`, it is no longer required that all
constrained paths be of the same length. There may now be a different
number of controlled variables at each period. In that case, the order of
declaration of endogenous controlled variables and of `controlled_varexo`
matters: if the second endogenous variable is controlled for less periods
than the first one, the second `controlled_varexo` isn't set for the last
periods. (#699)
- The `dynare_sensitivity`-command now accepts the `diffuse_filter`-option (!1562) - New option `parameter_set` to the `calib_smoother` command (#1477)
- Added debugging info on NaN and Inf parameters (!1538) - :warning: The results of `conditional_forecast` command is now saved in
`oo_` (used to be in a file; see #1672)
- Shock decomposition
- Added `fast_realtime` option to real time shock decomposition (deactivated
by default, runs the smoother only twice: once for the last in-sample and
once for the last out-of-sample data point) (!1563) and (!1552)
- New `diff`, `flip`, `max_nrows`, `plot_init_date` and `plot_end_date`
options to `plot_shock_decomposition` (#1649, !1655,
74e7c12d9d4f802cb687f6f1f122330fa5c4a2f4)
- Shock decomposition:
- Added `fast_realtime` option to real time shock decomposition (deactivated by default, runs the smoother only twice: once for the last in-sample and once for the last out-of-sample data point) (!1563) and (!1552)
- Added `diff`, `flip` and `max_nrows` options to `plot_shock_decomposition`
(#1649, !1655)
- Options `plot_init_date` and `plot_end_date` of `plot_shock_decomposition`
are now documented (see 74e7c12d9d4f802cb687f6f1f122330fa5c4a2f4)
- New `initial_decomposition_decomposition` command, for computing and - New `initial_decomposition_decomposition` command, for computing and
plotting the decomposition of the effect of smoothed initial conditions of plotting the decomposition of the effect of smoothed initial conditions of
state variables (#1586) state variables (#1586)
- New `squeeze_shock_decomposition` command, for removing decompositions of - New `squeeze_shock_decomposition` command, for removing decompositions of
variables that are not of interest (!1655) variables that are not of interest (!1655)
- New `with_epilogue` option (common to `shock_decomposition`, - New `with_epilogue` option (common to `shock_decomposition`,
`realtime_shock_decomposition` and `initial_condition_decomposition`) (!1688) `realtime_shock_decomposition` and `initial_condition_decomposition`)
(!1688)
- New `init2shocks` block to attribute initial conditions to shocks (#1650) - New `init2shocks` block to attribute initial conditions to shocks (#1650)
- New syntax to declare model variables in the `model` block (#1386) - Macro processor
- Added option `mh_tune_jscale` in `estimation` for tuning the scale parameter of the proposal distribution of the Random Walk Metropolis Hastings. - New object types: real (supersedes integers), boolean (distinct from
integers), tuple, user-defined function.
- Allow for on-the-fly variable declaration in equation tags (see 01d5a1308244ffb5a85e7f8f1d6a9e104b458715) - New operators: various mathematical functions, set operations on arrays
(union, intersection, difference, cartesian power and product), type
checking and conversion.
- :warning: Previously, when some MEX files were missing, Dynare would automatically use a slower M-file functional alternative; this is no longer the case. It is however still possible to manually add these alternatives in the MATLAB path (they are located under `matlab/missing/mex`; this only applies to the `mjdgges`, `gensylv`, `A_times_B_kronecker_C`, `sparse_hessian_times_B_kronecker_C` and `local_state_space_iteration_2` DLLs) - Added support for comprehensions (e.g. the set containing the squares of
all even numbers between 1 and 5 can be constructed with `[ i^2 for i in
1:5 when mod(i,2) == 0]`)
- :warning: Most files generated by the preprocessor are now grouped under two subdirectories. Assuming your file is `FILENAME.mod`, then M-files and MEX-files will be under `+FILENAME/`, while other output (JSON, LaTeX, source for MEX files) will be under `FILENAME/` - User-defined functions can be declared using the `@#define` operator (e.g.
`@#define f(x) = 2*x^2+3*x+5`)
- options `print` and `noprint` added to `perfect_foresight_solver` (#1647) - `@#elseif`-clauses are now supported in conditional statements
- External functions can be located in matlab namespaces (#1639) - `@#for` loops can iterate over several variables at the same time (e.g.
`@#for (i,j) in X`, where `X` is an array containing tuples of size 2)
- Can pass expressions as intervals to `irf_calibration` and `moment_calibration`. - A `defined()` function allows testing whether macro variables have been defined
- :warning: This breaks the previous syntax, requiring that the lower/upper bound be separated by commas (preprocessor#12)
- Improvements to the balanced growth test path: default tolerance has been raised, a different value can be set with new option `balanced_growth_test_tol` to the `model` block; as a consequence, failing the test is now an error again (#1389) - Empty arrays (with the `[]` syntax) are now possible (#707)
- The undocumented `linear` option of `stoch_simul` has been removed - Arrays of arrays are now supported
- :warning: The results of `conditional_forecast` command is now saved in `oo_` (used to be in a file; see #1672) - New macro directives `@#echomacrovars` and `@#echomacrovars(save)` for
displaying or saving the values of all macro-variables. (#1564)
- New suite of `get` and `set` utilities to retrieve and alter objects (!1686). - Inline comments are now supported
- :warning: All division operations are now done with doubles (as opposed to
integers). To achieve the old functionality, use the new `floor` operator.
- :warning: Colon syntax used to require braces around it to create an array
(e.g. `[1:3]` would create `[1,2,3]`). Now this is not necessary (`1:3`
creates `[1,2,3]` while `[1:3]` would create `[[1,2,3]]`)
- :warning: Previously, printing a boolean would print `1` or `0`. Now, it
prints `true` or `false`. To achieve the old functionality, you must cast
it to a real, e.g. `@{(real)(1!=0)}`
- LaTeX output
- New command `write_latex_steady_state_model` (#1496)
- New option `planner_discount_latex_name` of `ramsey_policy`. (#1686)
- New command `model_local_variable` command for assigning a LaTeX name to
model-local variables. (#563)
- The `write_latex_static_model` and `write_latex_original_model` commands
now support the `write_equation_tags` option. (#1431)
- Compilation of the model (`use_dll` option) made easier and faster
- Under Windows, it is no longer necessary to manually install the
compiler, since the latter is now shipped by the Dynare installer.
- Under macOS, the Dynare installer now automatically downloads and
installs the compiler.
- It is no longer necessary to configure MATLAB to let it know where the
compiler is, since the compilation is now done by the preprocessor.
- The compilation phase is now faster on large models (this has been
achieved by disabling a few time-consuming and not-so-useful optimization
passes otherwise done by the compiler).
- New `compilation_setup` block for specifying a custom compiler or custom
compilation flags.
- Model and variables declaration
- New syntax to declare model variables in the `model` block. (#1386)
- New `epilogue` block for computing output variables of interest that may
not be necessarily defined in the model (e.g. various kinds of
real/nominal shares or relative prices, or annualized variables out of a
quarterly model).
- Allow for on-the-fly variable declaration in equation tags (see
01d5a1308244ffb5a85e7f8f1d6a9e104b458715)
- Command-line options
- Added the possibility to declare Dynare command-line options in the mod
file.
- New option `nopreprocessoroutput` to disable printing of messages from
the preprocessor. (#1390)
- It is now possible to assign an arbitrary macro-expression to a
macro-variable defined on the command-line, using the `-D` syntax.
(#1696)
- New option `linemacro` to revert to the old format of the
macro-processed file (see below).
- Preprocessor outputs and inputs
- Added JSON output to the preprocessor. A representation of the model file
and the whole content of the `*.mod` file is saved in `*.json` files.
These JSON files can be easily parsed from any language (C++, Fortran,
Python, Julia, Matlab, ...). This new feature opens the possibility to
develop alternative back-ends for the Dynare language.
- :warning: Most files generated by the preprocessor are now grouped under
two subdirectories. Assuming your file is `FILENAME.mod`, then M-files
and MEX-files will be under `+FILENAME/`, while other output (JSON,
LaTeX, source code for the MEX files) will be under `FILENAME/`
- The macro-generated output is now more readable (no more line numbers and
empty lines). The old behaviour can be restored using the `linemacro`
option (see above).
- Ability to call the preprocessor by passing the `.mod` file as a string
argument from the macOS or GNU/Linux command line (#1509)
- dseries classes
- Numerous new functionalities. Unfortunately it was not possible to
document them in time for the initial 4.6 release. We hope to fix that
soon.
- Complete rewrite using the new `classdef` syntax.
- Integration of the `dates` classes within `dseries`.
- Reporting classes
- Automatically create titlepage with page numbers/page titles.
- Allow for the removal of headers and footers from a given page.
- Allow user to set page number.
- Split up report output. Create new files for the preamble, the body of
the report, and each individual page of the report.
- The classes have been converted to the new `classdef` syntax.
- Misc
- External functions can be located in MATLAB namespaces. (#1639)
- Improvements to the balanced growth path test that is performed after
Dynare has detrended the model (given the trends on variables declared by
the user): the default tolerance has been raised, and a different value
can be set with new option `balanced_growth_test_tol` to the `model`
block; as a consequence, failing the test is now an error again (#1389)
- New collection of `get` and `set` utilities to retrieve and alter
objects. (!1686)
- :warning: Previously, when some MEX files were missing, Dynare would
automatically fall back to slower M-file functional alternative; this is
no longer the case. It is however still possible to manually add these
alternatives in the MATLAB path (they are located under
`matlab/missing/mex`; this only applies to the `mjdgges`, `gensylv`,
`A_times_B_kronecker_C`, `sparse_hessian_times_B_kronecker_C` and
`local_state_space_iteration_2` DLLs)
- New option `filtered_theoretical_moments_grid` of `stoch_simul`, that
supersedes `hp_ngrid`
Dynare 4.5 Dynare 4.5
---------- ----------
... ...
......