This page documents the changes between Dynare versions (including the unstable
one). For previous versions of Dynare, please read the dedicated frozen page on
Dynare 4.7 (unstable)
Macroprocessor: variables can be defined without a value (they are assigned integer 1) (preprocessor#43)
New option mh_tune_guess for setting the initial value for mh_tune_jscale (!1717 (closed))
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). (#217 (closed))
New option filtered_theoretical_moments_grid of stoch_simul, that
Nonlinear estimation is now also available at an arbitrary approximation
order. In other words, the order option of estimation accepts an
arbitrary positive integer (of course, up to some model-specific
computational limit). (#1673 (closed))
Various improvements to particle filters.
It is now possible to estimate models under optimal policy (see below).
Variance decomposition of observables now accounts for measurement error.
New option mh_tune_jscale of estimation command for tuning the scale
parameter of the proposal distribution of the Random Walk Metropolis
Added debugging info when parameters take a NaN or Inf value. (!1538 (closed))
Option mode_compute=1 is now available under Octave.
Perfect foresight 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 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).
New options print and noprint of perfect_foresight_solver command.
Option stack_solve_algo=2 is now available under Octave.
Option solve_algo=7 is now available under Octave.
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 (closed))
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
Discretionary policy returns a more informative error message when the
objective has nonzero derivatives with respect to some variables. (!1468 (merged))
Added minimal system identification check of Komunjer and Ng (2011).
Added spectrum identification check of Qu and Tkachenko (2012).
Identification is now also available for approximation orders 2 and 3
with either analytical or numerical parameter derivatives. The relevant
moments and spectrum are computed from the pruned state space system
as in Mutschler (2015).
All tests (moments, spectrum, minimal system, strength) can be turned
More numerical options can be changed by the user.
Improved printing and storage (same folder) of results.
New diffuse_filter option to the dynare_sensitivity command. (!1562 (merged))
Arbitrary expressions can now be passed for the interval boundaries in
irf_calibration and moment_calibration. ⚠ This breaks the
previous syntax, requiring that the lower/upper bounds be separated by
commas. (preprocessor#12 (closed))
Forecasting and smoothing
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 (closed))
New option parameter_set to the calib_smoother command (#1477 (closed))
⚠ The results of conditional_forecast command is now saved in
oo_ (used to be in a file; see #1672 (closed))
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 (closed)) and (!1552 (closed))
New option planner_discount_latex_name of ramsey_model and
discretionary_policy. (#1686 (closed))
New command model_local_variable command for assigning a LaTeX name to
model-local variables. (#563 (closed))
The write_latex_static_model and write_latex_original_model commands
now support the write_equation_tags option. (#1431 (closed))
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
Model, variables and parameters declaration
New syntax to declare model variables and parameters on-the-fly in the
model block. To do this, simply follow the symbol name with a vertical
line (|, pipe character) and either an e, an x, or a p. For
example, to declare a parameter named alpha in the model block, you
could write alpha|p directly in an equation where it appears.
Similarly, to declare an endogenous variable c in the model block you
could write c|e. (#1386 (closed))
New syntax to declare model variable and parameters on-the-fly in
equation tags. In the tag, simply state the type of variable to be
declared (endogenous, exogenous, or parameter followed by an equal
sign and the variable name in single quotes. Hence, to declare a variable
c as endogenous in an equation tag, you can type [endogenous='c'].
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
Added the possibility to declare Dynare command-line options in the .mod
New option nopreprocessoroutput to disable printing of messages from
the preprocessor. (#1390 (closed))
It is now possible to assign an arbitrary macro-expression to a
macro-variable defined on the command-line, using the -D syntax.
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, Octave…). This new feature opens the possibility to
develop alternative back-ends for the Dynare language.
⚠ 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 (closed))
New functionalities and efficiency improvements.
Complete rewrite using the new classdef syntax and exploiting in place
modifications when possible.
Integration of the dates classes within dseries.
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.
External functions can be located in MATLAB/Octave namespaces. (#1639 (closed))
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 (closed))
New collection of MATLAB/Octave utilities to retrieve and alter objects:
get_irf, get_mean, get_shock_stderr_by_name, get_smooth,
get_update, set_shock_stderr_value. (!1686 (merged))
⚠ 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/Octave 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
Added command ramsey_model that builds the expanded model with
FOC conditions for the planner's problem but doesn't perform any
computation. Useful to compute Ramsey policy in a perfect
foresight model and for estimation,
ramsey_policy accepts multipliers in its variable list and
displays results for them (#1355 (closed)).
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
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
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 (#679 (closed)),
Forecasts accounting for measurement error are now saved in fields
of the form HPDinf_ME and HPDsup_ME (#853 (closed)),
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
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.
load_mh_file and mh_recover now try to load chain's proposal density (!1230 (merged)),
New option load_results_after_load_mh that allows loading some
posterior results from a previous run if no new MCMC draws are
added (!1352 (merged)),
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
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 (!1239 (closed)),
New commands prior_function and posterior_function that
execute a user-defined function on parameter draws from the
prior/posterior distribution (!871 (merged)),
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),
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 (!1223 (closed)),
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
New option smoothed_state_uncertainty to provide the uncertainty
estimate for the smoothed state estimate from the Kalman smoother (!1324 (merged)),
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
The use_calibration to estimated_params_init now also works
Improved initial estimation checks.
The default solver for finding the steady state is now a
trust-region solver (can be triggered explicitly with option
New options tolf and tolx to control termination criteria of
The debugging mode now provides the termination values in steady
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
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
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.
New options diffuse_filter and prior_trunc,
The identification command now supports correlations via
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.
Command conditional_forecast now takes into account histval
block if present.
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]