This page documents the changes between Dynare versions (including the unstable one). For previous versions of Dynare, please read the dedicated frozen page on the DynareWiki.
Dynare 7 (unstable)
-
Method of moments now supports estimation with discretionary optimal policy (!2279 (merged))
-
Option values
solve_algo={6,7,8}
andstack_solve_algo={2,3}
are now available withoutblock
norbytecode
(e14a4921, aa263e6a) -
More flexible syntax for specifying complementarity conditions (461c30fe, 656c1300)
- The complementarity condition is now specified between the associated equation and its closing semicolon, using the perpendicular symbol as a separator (the latter can be input either in UTF-8, as
⟂
, corresponding to Unicode codepoint U+27C2; or alternatively as pure ASCII, as_|_
, i.e. a vertical bar enclosed within two underscores) - Both the lower and the upper bounds can be specified at the same time in a given complementarity condition
- Arbitrary functions of parameters can appear in the bounds
- The old syntax using the
mcp
equation tag is still supported but deprecated - Here is an example of an equation with an associated complementarity condition, using the new syntax:
- The complementarity condition is now specified between the associated equation and its closing semicolon, using the perpendicular symbol as a separator (the latter can be input either in UTF-8, as
mu = 0 ⟂ 0 < i < 1+2*alpha;
-
Model-local variables (i.e. defined with a
#
sign) can now appear with a lead or a lag in themodel
block (the expression by which they will be replaced will be shifted accordingly) (#1929 (closed)) -
New
dr_cycle_reduction_maxiter
option to thestoch_simul
,estimation
andmethod_of_moments
command, to control the maximum number of iterations when the cycle reduction algorithm is used. (#1920 (closed), preprocessor!104 (merged), !2295 (merged)) -
Incompatible changes
-
⚠️ The default filename produced by thesavemacro
option of thedynare
command has changed. It now contains an underscore (instead of a dash), for better compatibility with MATLAB/Octave syntax (preprocessor#126 (closed), preprocessor!105 (merged), !2296 (merged))
-
Dynare 6
-
The Sequential Monte Carlo sampler as described by Herbst and Schorfheide (2014) is now available under value
hssmc
for optionposterior_sampling_method
. -
New routines for perfect foresight simulation with expectation errors. In such a scenario, agents make expectation errors in that the path they had anticipated in period 1 is not realized exactly. More precisely, in some simulation periods, they may receive new information that makes them revise their anticipation for the path of future shocks. Also, under this scenario, it is assumed that agents behave as under perfect foresight, i.e. they make their decisions as if there were no uncertainty and they knew exactly the path of future shocks; the new information that they may receive comes as a total surprise to them. Available under new
perfect_foresight_with_expectation_errors_setup
andperfect_foresight_with_expectation_errors_solver
commands, andshocks(learnt_in=…)
,mshocks(learnt_in=…)
andendval(learnt_in=…)
blocks. -
New routines for IRF matching with stochastic simulations:
-
Both frequentist (as in Christiano, Eichenbaum, and Evans, 2005) and Bayesian (as in Christiano, Trabandt, and Walentin, 2010) IRF matching approaches are implemented. The core idea of IRF matching is to treat empirical impulse responses (e.g. given from an SVAR or local projection estimation) as data and select model parameters that align the model’s IRFs closely with their empirical counterparts. (!2191 (merged))
-
Available under option
mom_method = irf_matching
option to themethod_of_moments
command. (preprocessor!85 (merged)) -
New blocks
matched_irfs
andmatched_irfs_weights
for specifying the values and weights of the empirical impulse response functions. (preprocessor#124 (closed))
-
-
Pruning à la Andreasen et al. (2018) is now available at an arbitrary approximation order when performing stochastic simulations with
stoch_simul
(!2147 (merged)), and at 3rd order when performing particle filtering. (!2071 (merged), particles!16, !2045 (merged)) -
New
log
option to thevar
statement. In addition to the endogenous variable(s) thus declared, this option also triggers the creation of auxiliary variable(s) equal to the log of the corresponding endogenous variable(s). For example, given avar(log) y;
statement, two endogenous will be created (y
andLOG_y
), and an auxiliary equation linking the two will also be added (equal toy = exp(LOG_y);
). Moreover, every occurrence ofy
in the model will be replaced byexp(LOG_y)
. This option is, for example, useful for performing a loglinear approximation of some variable(s) in the context of a first-order stochastic approximation; or for ensuring that the variable(s) stay(s) in the definition domain of the function defining the steady state or the dynamic residuals when the nonlinear solver is used. (#349 (closed)) -
New model editing features (21a8a579 and 4db28998)
-
Multiple
model
blocks are now supported (this was already working but not explicitly documented). -
Multiple
estimated_params
blocks now concatenate their contents (instead of overwriting previous ones, which was the former undocumented behavior); anoverwrite
option has been added to provide the old behavior. (preprocessor@60ef6bbd, preprocessor@ea44aa19) -
New
model_options
statement to set model options in a global fashion. (preprocessor#19 (closed)) -
New
model_remove
command to remove equations. (preprocessor@1f004584) -
New
model_replace
block to replace equations. (preprocessor@1f004584) -
New
var_remove
command to remove variables (or parameters). (preprocessor@342c4faf) -
New
estimated_params_remove
block to remove estimated parameters. (preprocessor@5ffbc5ba)
-
-
Stochastic simulations
-
Performance improvements for simulation of the solution under perturbation and for particle filtering at higher order (⩾ 3). (#1802 (closed), !2071 (merged), particles!16, !2045 (merged))
-
Performance improvement for the first order perturbation solution using either cycle reduction (
dr=cycle_reduction
option) or logarithmic reduction (dr=logarithmic_reduction
). (!2085 (merged), !2089 (merged)) -
New
nomodelsummary
option to thestoch_simul
command, to suppress the printing of the model summary and the covariance of the exogenous shocks. (a00eb5e1)
-
-
Estimation
-
A truncated normal distribution can now be specified as a prior, using the 3rd and 4th parameters of the
estimated_params
block as the bounds. (!2161 (merged)) -
New
conditional_likelihood
option to theestimation
command. When the option is set, instead of using the Kalman filter to evaluate the likelihood, Dynare will evaluate the conditional likelihood based on the first-order reduced form of the model by assuming that the initial state vector is at its steady state. (b7693c32, f7694208) -
New
additional_optimizer_steps
option to theestimation
command to trigger the sequential execution of several optimizers when looking for the posterior mode. (!2178 (merged)) -
The
generate_trace_plots
command now allows comparing multiple chains. (baf8243f) -
The Geweke and Raftery-Lewis convergence diagnostics will now also be displayed when
mh_nblocks>1
. (d0e99daf) -
New
robust
,TolGstep
, andTolGstepRel
options to the optimizer available undermode_compute=5
(“newrat”). (!2231 (merged)) -
New
brooks_gelman_plotrows
option to theestimation
command for controlling the number of parameters to depict along the rows of the figures depicting the Brooks and Gelman (1998) convergence diagnostics. (!2146 (merged)) -
New
mh_init_scale_factor
option to theestimation
command tor govern the overdispersion of the starting draws when initializing several Monte Carlo Markov Chains. This option supersedes themh_init_scale
option, which is now deprecated. (!2041 (merged))
-
-
Steady state computation
-
Steady state computation now accounts for occasionally-binding constraints of mixed-complementarity problems (as defined by
mcp
tags). (!1877 (merged)) -
New
tolx
option to thesteady
command for governing the termination based on the step tolerance. (preprocessor!60 (merged)) -
New
fsolve_options
option to thesteady
command for passing options tofsolve
(in conjunction with thesolve_algo=0
option). (#1856 (closed)) -
New option
from_initval_to_endval
option to thehomotopy_setup
block, for easily computing homotopy from initial to terminal steady state (when the former is already computed). (2e3fbfc0) -
New
non_zero
option toresid
command to restrict display to non-zero residuals. (preprocessor@9db21a23, 3d7299c1)
-
-
Perfect foresight
-
Significant performance improvement of the
stack_solve_algo=1
option to theperfect_foresight_solver
command (Laffargue-Boucekkine-Juillard algorithm) when used in conjunction with optionsblock
and/orbytecode
of themodel
block. (17b016d9, be648d35, 77a7d5c3) -
New
relative_to_initval
option to themshocks
block, to use the initial steady state as a basis for the multiplication when there is anendval
block. (5145bd07) -
New
static_mfs
option to themodel
block (and to themodel_options
command), for controlling the minimum feedback set computation for the static model. It defaults to0
(corresponding to the behavior in Dynare version 5). -
Various improvements to homotopy
-
New
endval_steady
option to theperfect_foresight_setup
command for computing the terminal steady state at the same time as the transitory dynamics (and new optionssteady_solve_algo
,steady_tolf
,steady_tolx
,steady_maxit
andsteady_markowitz
for controlling the steady state nonlinear solver). (d5a3a8e1) -
New
homotopy_linearization_fallback
andhomotopy_marginal_linearization_fallback
options to theperfect_foresight_solver
command to get an approximate solution when homotopy fails to go to 100%. (d5a3a8e1) -
New
homotopy_initial_step_size
,homotopy_min_step_size
,homotopy_step_size_increase_success_count
andhomotopy_max_completion_share
options to theperfect_foresight_solver
command to fine tune the homotopy behavior. (d5a3a8e1) -
Purely backward, forward and static models are now supported by the homotopy procedure. (fe142b66)
-
New
homotopy_exclude_varexo
option to theperfect_foresight_solver
command, for excluding exogenous variables from the homotopy procedure (only available since version 6.1) (9f65299d)
-
-
The
stack_solve_algo=1
andstack_solve_algo=6
options of theperfect_foresight_solver
command were merged and are now synonymous. They both provide the Laffargue-Boucekkine-Juillard algorithm and work with and without theblock
andbytecode
options of themodel
block. Usingstack_solve_algo=1
is now recommended, butstack_solve_algo=6
is kept for backward compatibility. (06f665e2)
-
-
OccBin
-
New
simul_reset_check_ahead_periods
option to theoccbin_setup
andoccbin_solver
commands, for resettingcheck_ahead_periods
in each simulation period. (3765ef77) -
new
simul_max_check_ahead_periods
,likelihood_max_check_ahead_periods
, andsmoother_max_check_ahead_periods
options to theoccbin_setup
command, for truncating the number of periods for which agents check ahead which regime is present. (2f236048 and preprocessor@ed95a2ca )
-
-
Optimal policy
-
The
osr
command now accepts theanalytic_derivation
andanalytic_derivation_mode
options. (!2171 (closed)) -
The
evaluate_planner_objective
command now computes the unconditional welfare for higher-order approximations (⩾ 3). (!1962 (merged)) -
New
periods
anddrop
options to theevaluate_planner_objective
command. (!1967 (closed))
-
-
Semi-structural models
-
New
pac_target_info
block for decomposing the PAC target into an arbitrary number of components. Furthermore, in the presence of such a block, the newpac_target_nonstationary
operator can be used to select the non stationary part of the target (typically useful in the error correction term of the PAC equation). (b297353b) -
New
kind
option to thepac_model
command. This option allows the user to select the formula used to compute the weights on the VAR companion matrix variables that are used to form PAC expectations. (b297353b) -
Performance improvement to
solve_algo=12
andsolve_algo=14
, which significantly accelerates the simulation of purely backward, forward and static models with theperfect_foresight_solver
command and the routines for semi-structural models.
-
-
dseries classes
-
The
remove
andremove_
methods now accept a list of variables (they would previously only accept a single variable). (dseries@b7ca9c3e, c02e5505) -
New MATLAB/Octave command
dplot
to plot mathematical expressions generated from variables fetched from (different) dseries objects. (dseries@d6c8d039).
-
-
Misc
-
New
display_parameter_values
command to print the parameter values in the command window. (!2268 (merged)) -
New
collapse_figures_in_tabgroup
command to dock all figures. (!2263 (merged)) -
Performance improvement for the
use_dll
option of themodel
block. The preprocessor now takes advantage of parallelization when compiling the MEX files. (preprocessor@f6053df7, preprocessor@5cf4729a, preprocessor@dd66459e, preprocessor@3dd40c6c) -
New mathematical primitives available: complementary error function (
erfc
), hyperbolic functions (cosh
,sinh
,tanh
,acosh
,asinh
,atanh
). (preprocessor#85 (closed), preprocessor@c0ea8d72) -
New
last_simulation_period
option to theinitval_file
command. (#1838 (closed), f5f47cd8, preprocessor@ddddf89d) -
The
calib_smoother
command now accepts thenobs
andheteroskedastic_filter
options. (!2110 (merged)) -
Under the MATLAB Desktop, autocompletion is now available for the
dynare
command and other CLI commands (thanks to Eduard Benet Cerda from MathWorks). (36a2a41e) -
Model debugging: The preprocessor now creates files for evaluating the left- and right-hand sides of model equations separately. For a model file called
ramst.mod
, you can call[lhs,rhs]=ramst.debug.static_resid(y,x,params);
(for the static model) and[lhs,rhs]=ramst.debug.dynamic_resid(y,x,params,steady_state);
(for the dynamic model), wherey
are the endogenous,x
the exogenous,params
the parameters, andsteady_state
is self-explanatory. NB: In the dynamic case, the vectory
of endogenous must have 3n elements where n is the number of endogenous (including auxiliary ones); the first n elements correspond to the lagged values, the middle n elements to the contemporaneous values, and the last n elements to the lead values. -
New interactive MATLAB/Octave command
search
for listing the equations in which given variable(s) appear (requiresjson
command line option). (#1886 (closed)) -
The
model_info
command allows to print the block decomposition even if theblock
option of themodel
block has not been used, by specifying the new optionsblock_static
andblock_dynamic
. -
There is now a default value for the global initialization file (
GlobalInitFile
option of the configuration file): theglobal_init.m
in the Dynare configuration directory (typically$HOME/.config/dynare/global_init.m
under Linux and macOS, andc:\Users\USERNAME\AppData\Roaming\dynare\global_init.m
under Windows). (43b24fac) -
For those compiling Dynare from source, the build system has been entirely rewritten and now uses Meson; as a consequence, it is now faster and easier to understand.
-
-
Incompatible changes
-
⚠️ The default value of themode_compute
option of theestimation
command has been changed to5
(it was previously4
). -
⚠️ When using block decomposition (with theblock
option of themodel
block), the optionmfs
now defaults to1
. This setting should deliver better performance in perfect foresight simulation on most models. -
⚠️ The default location for the configuration file has changed. On Linux and macOS, the configuration file is now searched by default underdynare/dynare.ini
in the configuration directories defined by the XDG specification (typically$HOME/.config/dynare/dynare.ini
for the user-specific configuration and/etc/xdg/dynare/dynare.ini
for the system-wide configuration, the former having precedence over the latter). Under Windows, the configuration file is now searched by default in%APPDATA%\dynare\dynare.ini
(typicallyc:\Users\USERNAME\AppData\Roaming\dynare\dynare.ini
). (43b24fac) -
⚠️ The information stored inoo_.endo_simul, oo_.exo_simul
, andoo_.irfs
is no longer duplicated in the base workspace. New helper functionssend_endogenous_variables_to_workspace
,send_exogenous_variables_to_workspace
, andsend_irfs_to_workspace
have been introduced to explicitly request these outputs and to mimic the old behavior. (!2229 (closed)) -
⚠️ Thedynare_sensitivity
command has been renamedsensitivity
. The old name is still accepted but triggers a warning. (66bc9fd9) -
⚠️ The syntaxresid(1)
is no longer supported. -
⚠️ Themode_compute=6
option to theestimation
command now recursively updates the covariance matrix across theNumberOfMh
Metropolis-Hastings runs, starting with theInitialCovarianceMatrix
in the first run, instead of computing it from scratch in every Metropolis-Hastings run. (e5102eee) -
⚠️ Theperiods
command has been removed. (1b47c8a5) -
⚠️ TheSigma_e
command has been removed. (e30314e7) -
⚠️ Theblock
option of themodel
block no longer has an effect when used in conjunction withstoch_simul
orestimation
commands. (8f1a4cb3) -
⚠️ The Dynare++ executable is no longer distributed since almost all of its functionalities have been integrated inside Dynare for MATLAB/Octave. (c1922c3a) -
⚠️ A macro-processor variable defined without a value (such as@#define var
in the.mod
file or alternatively-Dvar
on thedynare
command line) is now assigned thetrue
logical value (it was previously assigned1
). (preprocessor#43 (closed)) -
⚠️ Theparallel_slave_open_mode
option of thedynare
command has been renamedparallel_follower_open_mode
. (preprocessor#86 (closed), !1976 (merged)) -
⚠️ Thestatic
option of themodel_info
command is now deprecated and is replaced by theblock_static
option. (45450651 and preprocessor@2fd06811)
-
-
References:
- 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,” Review of Economic Studies, 85(1), 1-49.
- Brooks, Stephen P., and Andrew Gelman (1998): “General methods for monitoring convergence of iterative simulations,” Journal of Computational and Graphical Statistics, 7, pp. 434–455.
- Christiano, Eichenbaum and Charles L. Evans (2005): “Nominal Rigidities and the Dynamic Effects of a Shock to Monetary Policy,” Journal of Political Economy, 113(1), 1–45.
- Christiano, Lawrence J., Mathias Trabandt, and Karl Walentin (2010): “DSGE Models for Monetary Policy Analysis,” In: Handbook of Monetary Economics 3, 285–367.
- Herbst, Edward and Schorfheide, Frank (2014): "Sequential Monte Carlo Sampling for DSGE Models," Journal of Applied Econometrics, 29, 1073-1098.
Dynare 5
-
New routines for simulating semi-structural (backward) models where some equations incorporate expectations based on future values of a VAR or trend component model. See the
var_model
,trend_component_model
andvar_expectation_model
commands, and thevar_expectation
operator. -
New routines for simulating semi-structural models where some equations are specified using the polynomial adjustment costs (PAC) approach, as in the FRB/US model (see Brayton et al., 2014 and Brayton et al., 2000) and the ECB-BASE model (see Angelini et al., 2019). The forward-looking terms of the PAC equations can be computed either using a satellite VAR model, or using full model-consistent expectations. See the
pac_model
command and thepac_expectation
operator. -
New Method of Moments toolbox that provides functionality to estimate parameters by (i) Generalized Method of Moments (GMM) up to 3rd-order pruned perturbation approximation or (ii) Simulated Method of Moments (SMM) up to any perturbation approximation order. The toolbox is inspired by replication codes accompanied to Andreasen et al. (2018), Born and Pfeifer (2014), and Mutschler (2018). It is accessible via the new
method_of_moments
command (!1750 (merged)) and the newmatched_moments
block (preprocessor!23 (merged)). Moreover, by default, a new non-linear least squares optimizer based onlsqnonlin
is used for minimizing the method of moments objective function (available undermode_compute=13
) (3615962a, b4f293bd). GMM can further benefit from using Gradient-based optimizers (usinganalytic_standard_errors
option and/or passing'Jacobian','on'
to the optimization options) as the Jacobian of the moment conditions can be computed analytically (a697002a). -
Implementation of the Occbin algorithm by Guerrieri and Iacoviello (2015) (#569 (closed), preprocessor#68 (closed)), together with the inversion filter of Cuba-Borda, Guerrieri, Iacoviello, and Zhong (2019) and the piecewise Kalman filter of Giovannini, Pfeiffer, and Ratto (2021) (!1876 (closed)). It is available via the new block
occbin_constraints
and the new commandsoccbin_setup
,occbin_solver
,occbin_graph
andoccbin_write_regimes
. -
Stochastic simulations
-
Estimation
-
Performance optimization to pruned state space system and Lyapunov solvers. (!1749 (merged), !1745 (merged), #1737 (closed))
-
New option
mh_posterior_mode_estimation
toestimation
to perform mode-finding by running the MCMC. (preprocessor@8d14e18c) -
New heteroskedastic filter and smoother, where shocks standard error may unexpectedly change in every period. Triggered by
heteroskedastic_filter
option of theestimation
command, and configured via theheteroskedastic_shocks
block. (!1844 (closed), !1851 (closed)) -
New option
mh_tune_guess
for setting the initial value formh_tune_jscale
. (!1717 (closed)) -
New option
smoother_redux
toestimation
andcalib_smoother
to trigger computing the Kalman smoother on a restricted state space instead of the full one. (!1859 (merged)) -
New block
filter_initial_state
for setting the initial condition of the Kalman filter/smoother. (7c8f4867) -
New option
mh_initialize_from_previous_mcmc
to theestimation
command that allows to pick initial values for a new MCMC from a previous one. (!1841 (closed)) -
The
xls_sheet
option of theestimation
command now takes a quoted string as value. The former unquoted syntax is still accepted, but no longer recommended. (preprocessor#67 (closed)) -
New option
particle_filter_options
to set various particle filter options
-
-
Perfect foresight and extended path
-
New specialized algorithm in
perfect_foresight_solver
to deal with purely static problems. (27ee801a) -
The
debug
option ofperfect_foresight_solver
provides debugging information if the Jacobian is singular. (!1834 (merged)) -
In deterministic models (perfect foresight or extended path), exogenous variables with lead/lags are now replaced by auxiliary variables. This brings those models in line with the transformation done on stochastic models. However note that transformation is still not exactly the same between the two classes of models, because there is no need to take into account the Jensen inequality on the latter. In deterministic models, there is a one-to-one mapping between exogenous with lead/lags and auxiliaries, while in stochastic models, an auxiliary endogenous may correspond to a more complex nonlinear expression. (preprocessor@9bca65c7)
-
-
Optimal policy
-
Several improvements to
evaluate_planner_objective
:- it now applies a consistent approximation order when doing the computation;
- in addition to the conditional welfare, it now also provides the unconditional welfare;
- in a stochastic context, it now works with higher order approximation (only the conditional welfare is available for order ⩾ 3); (!1828 (merged), !1866 (closed))
- it now also works in a perfect foresight context. (!1833 (merged))
-
discretionary_policy
is now able to solve nonlinear models (it will then use their first-order approximation, and the analytical steady state must be provided). (!1792 (merged))
-
-
Identification
-
New option
schur_vec_tol
to theidentification
command, for setting the tolerance level used to find nonstationary variables in Schur decomposition of the transition matrix. (!1794 (merged)) -
The
identification
command now supports optimal policy. (!1852 (merged))
-
-
Shock decomposition
- The
fast_realtime
option of therealtime_shock_decomposition
command now accepts a vector of integers, which runs the smoother for all the specified data vintages. (!1842 (closed))
- The
-
Macro processor
- Macroprocessor variables can be defined without a value (they are assigned integer 1). (preprocessor#43 (closed))
-
LaTeX and JSON outputs
-
New
nocommutativity
option to thedynare
command. This option tells the preprocessor not to use the commutativity of addition and multiplication when looking for common subexpressions. As a consequence, when using this option, equations in various outputs (LaTeX, JSON…) will appear as the user entered them (without terms or factors swapped). Note that using this option may have a performance impact on the preprocessing stage, though it is likely to be small. (preprocessor@c9c36c03) -
Model-local variables are now substituted out as part of the various model transformations. This means that they will no longer appear in LaTeX or in JSON files (for the latter, they are still visible with
json=parse
orjson=check
).
-
-
Compilation of the model (
use_dll
option)-
Block decomposition (option
block
ofmodel
) can now be used in conjunction with theuse_dll
option. -
The
use_dll
option can now directly be given to thedynare
command. (a9fea692)
-
-
dseries classes
-
Routines for converting between time series frequencies (e.g. daily to monthly) have been added.
-
dseries now support bi-annual (dseries!37 (merged)) and daily (dseries@1b897b37) frequency data.
-
dseries can now import data from DBnomics, via the dbnomics/mdbnomics> plugin (dseries#44 (closed)). Note that this does not yet work under Octave (dbnomics/mdbnomics#10). For the time being, the DBnomics plugin must be installed separately.
-
-
Misc improvements
-
The
histval_file
andinitval_file
commands have been made more flexible and now have functionalities similar to thedatafile
option of theestimation
command. (#1671 (closed)) -
When using the
loglinear
option, the output from Dynare now clearly shows that the results reported concern the log of the original variable. (!1796 (merged)) -
Options
block
andbytecode
ofmodel
can now be used in conjunction with model-local variables (variables declared with a pound-sign#
). (#1243 (closed)) -
The
model_info
command now prints the typology of endogenous variables for non-block decomposed models. -
The total computing time of a run (in seconds) is now saved to
oo_.time
. (preprocessor@c79ae5d4) -
New
notime
option to thedynare
command, to disable the printing and the saving of the total computing time. (preprocessor@27a8b3b7) -
New
parallel_use_psexec
command-line Windows-specific option for parallel local clusters: whentrue
(the default), usepsexec
to spawn processes; whenfalse
, usestart
. (!1843 (closed)) -
when compiling from source, it is no longer necessary to pass the
MATLAB_VERSION
version to the configure script; the version is now automatically detected.
-
-
Different versions of Dynare are now available as Docker Containers.
-
Incompatible changes
-
⚠️ Dynare will now generally save its output in theMODFILENAME/Output
folder (or theDIRNAME/Output
folder if thedirname
option was specified) instead of the main directory. Most importantly, this concerns the_results.mat
and the_mode.mat
files. -
⚠️ The structure of theoo_.planner_objective
field has been changed, in relation to the improvements toevaluate_planner_objective
. -
⚠️ The preprocessor binary has been renamed todynare-preprocessor
, and is now located in a dedicatedpreprocessor
subdirectory. -
⚠️ Thedynare
command no longer acceptsoutput=dynamic
andoutput=first
(those options actually had no effect).
-
-
Platform requirements
-
⚠️ The minimal required MATLAB version is now R2014a (8.3). (#1713 (closed)) -
⚠️ The 32-bit support has been dropped for Windows. (#1713 (closed))
-
-
References
- Andreasen et al. (2018): “The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications,” Review of Economic Studies, 85(1), pp. 1-49.
- Angelini, Bokan, Christoffel, Ciccarelli and Zimic (2019): “Introducing ECB-BASE: The blueprint of the new ECB semi-structural model for the euro area”, ECB Working Paper no. 2315
- Born and Pfeifer (2014): “Policy risk and the business cycle”, Journal of Monetary Economics, 68, 68-85.
- Brayton, Davis and Tulip (2000): “Polynomial Adjustment Costs in FRB/US”, Unpublished manuscript.
- Brayton, Laubach and Reifschneider (2014): “The FRB/US Model: A Tool for Macroeconomic Policy Analysis,” FEDS Notes. Washington: Board of Governors of the Federal Reserve System, https://doi.org/10.17016/2380-7172.0012
- Cuba-Borda, Guerrieri, Iacoviello, and Zhong (2019): “Likelihood evaluation of models with occasionally binding constraints”, Journal of Applied Econometrics, 34(7), 1073-1085
- Giovannini, Pfeiffer and Ratto (2021): “Efficient and robust inference of models with occasionally binding constraints,” Working Papers 2021-03, Joint Research Centre, European Commission
- Guerrieri and Iacoviello (2015): “OccBin: A toolkit for solving dynamic models with occasionally binding constraints easily,” Journal of Monetary Economics, 70, 22–38.
- Mutschler (2018): “Higher-order statistics for DSGE models”, Econometrics and Statistics, 6(C), 44-56.
Dynare 4.6
-
Stochastic simulations
-
The perturbation method is now available at an arbitrary approximation order. In other words, the
order
option ofstoch_simul
accepts an arbitrary positive integer (of course, up to some model-specific computational limit). (#217 (closed)) -
New option
filtered_theoretical_moments_grid
ofstoch_simul
, that supersedeshp_ngrid
.
-
-
Estimation
-
Nonlinear estimation is now also available at an arbitrary approximation order. In other words, the
order
option ofestimation
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. (#1486 (closed))
-
New option
mh_tune_jscale
ofestimation
command for tuning the scale parameter of the proposal distribution of the Random Walk Metropolis Hastings. -
Added debugging info when parameters take a
NaN
orInf
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
norblock
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 theuse_dll
option is used). -
New options
print
andnoprint
ofperfect_foresight_solver
command. (#1647 (closed)) -
Option
stack_solve_algo=2
is now available under Octave.
-
-
Steady state
- Option
solve_algo=7
is now available under Octave.
- Option
-
Optimal policy
-
The
ramsey_policy
command is now deprecated. It is superseded by successive calls toramsey_model
,stoch_simul
, andevaluate_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 eitherramsey_model
ordiscretionary_policy
. It is however not yet possible to estimate parameters that appear in the discount factor of the social planner. (#1173 (closed)) -
Discretionary policy returns a more informative error message when the objective has nonzero derivatives with respect to some variables. (!1468 (merged))
-
-
Identification (!1648 (merged), !1689 (merged), !1683 (merged), !1711 (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 off.
-
More numerical options can be changed by the user.
-
Improved printing and storage (same folder) of results.
-
-
Sensitivity analysis
-
New
diffuse_filter
option to thedynare_sensitivity
command. (!1562 (merged)) -
Arbitrary expressions can now be passed for the interval boundaries in
irf_calibration
andmoment_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 ofcontrolled_varexo
matters: if the second endogenous variable is controlled for less periods than the first one, the secondcontrolled_varexo
isn't set for the last periods. (#699 (closed)) -
New option
parameter_set
to thecalib_smoother
command (#1477 (closed)) -
⚠️ The results ofconditional_forecast
command is now saved inoo_
(used to be in a file; see #1672 (closed))
-
-
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 (closed)) and (!1552 (closed)) -
New
diff
,flip
,max_nrows
,plot_init_date
andplot_end_date
options toplot_shock_decomposition
(#1649 (closed), !1655 (merged), 74e7c12d) -
New
initial_decomposition_decomposition
command, for computing and plotting the decomposition of the effect of smoothed initial conditions of state variables (#1586 (closed)) -
New
squeeze_shock_decomposition
command, for removing decompositions of variables that are not of interest (!1655 (merged)) -
New
with_epilogue
option (common toshock_decomposition
,realtime_shock_decomposition
andinitial_condition_decomposition
) (!1688 (merged)) -
New
init2shocks
block to attribute initial conditions to shocks (#1650 (closed))
-
-
Macro processor
-
New object types: real (supersedes integers), boolean (distinct from integers), tuple, user-defined function.
-
New operators: various mathematical functions, set operations on arrays (union, intersection, difference, cartesian power and product), type checking and conversion.
-
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]
). -
User-defined functions can be declared using the
@#define
operator (e.g.@#define f(x) = 2*x^2+3*x+5
). -
@#elseif
-clauses are now supported in conditional statements. -
@#for
loops can iterate over several variables at the same time (e.g.@#for (i,j) in X
, whereX
is an array containing tuples of size 2). -
Added the possibility to exclude some elements when iterating over
@#for
loops (e.g.@#for i in 1:5 when mod(i,2) == 0
iterates over all even numbers between 1 and 5). -
A
defined()
function allows testing whether macro variables have been defined. -
Empty arrays (with the
[]
syntax) are now possible (#707 (closed)). -
Arrays of arrays are now supported.
-
New macro directives
@#echomacrovars
and@#echomacrovars(save)
for displaying or saving the values of all macro-variables. (#1564 (closed)) -
Inline comments are now supported.
-
⚠️ All division operations are now done with doubles (as opposed to integers). To achieve the old functionality, use the newfloor
operator. -
⚠️ 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]]
). -
⚠️ Previously, printing a boolean would print1
or0
. Now, it printstrue
orfalse
. 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 (closed)) -
New option
planner_discount_latex_name
oframsey_model
anddiscretionary_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
andwrite_latex_original_model
commands now support thewrite_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 compilation flags.
-
-
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 ane
, anx
, or ap
. For example, to declare a parameter namedalpha
in the model block, you could writealpha|p
directly in an equation where it appears. Similarly, to declare an endogenous variablec
in the model block you could writec|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
, orparameter
followed by an equal sign and the variable name in single quotes. Hence, to declare a variablec
as endogenous in an equation tag, you can type[endogenous='c']
. (see 01d5a130) -
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).
-
-
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 (closed)) -
It is now possible to assign an arbitrary macro-expression to a macro-variable defined on the command-line, using the
-D
syntax. (#1696 (closed)) -
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 isFILENAME.mod
, then M-files and MEX-files will be under+FILENAME/
, while other output (JSON, LaTeX, source code for the MEX files) will be underFILENAME/
. -
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))
-
-
dseries classes
-
New functionalities and efficiency improvements.
-
Complete rewrite using the new
classdef
syntax and exploiting in place modifications when possible. -
Integration of the
dates
classes withindseries
.
-
-
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/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 themodel
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 undermatlab/missing/mex
; this only applies to themjdgges
,gensylv
,A_times_B_kronecker_C
,sparse_hessian_times_B_kronecker_C
andlocal_state_space_iteration_2
DLLs).
-
-
References
-
Komunjer, I. and S. Ng (2011), “Dynamic Identification of Dynamic Stochastic General Equilibrium Models,” Econometrica, 79(6), 1995–2032
-
Qu, Z. and D. Tkachenko (2012), “Identification and frequency domain quasi‐maximum likelihood estimation of linearized dynamic stochastic general equilibrium models,” Quantitative Economics, 3(1), 95–132
-
Mutschler, W. (2015), “Identification of DSGE models—The effect of higher-order approximation and pruning,” Journal of Economic Dynamics and Control, 56, 34–54
-
Dynare 4.5
-
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. 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) andperfect_foresight_solver
(for computing it). The oldsimul
command still exist and is now an alias forperfect_foresight_setup
+perfect_foresight_solver
. It is no longer possible to manipulate by hand the contents ofoo_.exo_simul
when usingsimul
. People who want to do it must first callperfect_foresight_setup
, then do the manipulations, then callperfect_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 asolve_algo
solver for solving the model, -
New option
solve_algo
that allows specifying a solver for solving the model when usingstack_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 defaultsolve_algo=4
, -
New options
tolf
andtolx
to control termination criteria of solvers, -
New option
endogenous_terminal_period
tosimul
, -
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 optionoptim
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 intoM_.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
andHPDsup_ME
(#853 (closed)), -
New fields
oo_.Smoother.Trend
andoo_.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 tofirst_obs
, -
The
calib_smoother
command now accepts theloglinear
,prefilter
,first_obs
andfilter_decomposition
options.
-
-
Estimation
-
New options:
logdata
,consider_all_endogenous
,consider_only_observed
,posterior_max_subsample_draws
(#567 (closed)),mh_conf_sig
(#598 (closed)),diffuse_kalman_tol
(!865 (closed)),dirname
(#910 (closed)),nodecomposition
-
load_mh_file
andmh_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
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 inoo_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
andposterior_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 duringmode_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 theposterior_sampling_method
; itsscale_file
-option pair allows loading the_mh_scale.mat
-file storing the tuned scale factor from a previous run ofmode_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 intooo_.dsge_var
, -
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 theestimation
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 theTeX
option is invoked, -
The
use_calibration
toestimated_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
andtolx
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 ofoo_
when simulated moments have been requested, -
stoch_simul
saves the unconditional variance decomposition inoo_.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 newTeX
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
andprior_trunc
, -
The
identification
command now supports correlations via simulated moments,
-
-
Sensitivity analysis
-
New blocks
irf_calibration
andmoment_calibration
, -
Outputs LaTeX tables if the new
TeX
option is used, -
New option
relative_irf
toirf_calibration
block.
-
-
Conditional forecast
- Command
conditional_forecast
now takes into accounthistval
block if present.
- Command
-
Shock decomposition
-
New option
colormap
toshocks_decomposition
for controlling the color map used in the shocks decomposition graphs, -
shocks_decomposition
now accepts thenograph
option, -
New command
realtime_shock_decomposition
that for each periodT= [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 theshock_decomposition
andrealtime_shock_decomposition
commands, -
New command
plot_shock_decomposition
that allows plotting the results fromshock_decomposition
andrealtime_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 foruse_dll
(#1226 (closed)).
-
-
dates/dseries/reporting classes
-
New methods
abs
,cumprod
andchain
, -
New option
tableRowIndent
toaddTable
, -
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
Usessimulannealbnd
from Matlab's Global Optimization Toolbox (if available), -
New option
silent_optimizer
to shut off output from mode computing/optimization, -
New options
verbosity
andSaveFiles
to control output and saving of files during mode computing/optimization.
-
-
LaTeX output
-
New command
write_latex_original_model
, -
New option
write_equation_tags
towrite_latex_dynamic_model
that allows printing the specified equation tags to the generate LaTeX code (#477 (closed)), -
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
: themsvc
option now supportsnormcdf
,acosh
,asinh
, andatanh
(#1259 (closed)), -
New parallel option
NumberOfThreadsPerJob
for Windows nodes that sets the number of threads assigned to each remote MATLAB/Octave run (!1357 (merged)), -
Improved numerical performance of
schur_statespace_transformation
for very large models, -
The
all_values_required
option now also works withhistval
, -
Add missing
horizon
option toms_forecast
, -
BVAR now saves the marginal data density in
oo_.bvar.log_marginal_data_density
and stores prior and posterior information inoo_.bvar.prior
andoo_.bvar.posterior
.
-