We are pleased to announce the release of Dynare 6.0.
This major release adds new features and fixes various bugs.
The Windows, macOS, MATLAB Online and source packages are already available for download at the Dynare website.
This release is compatible with MATLAB versions ranging from 9.5 (R2018b) to 23.2 (R2023b), and with GNU Octave versions ranging from 7.1.0 to 8.4.0 (NB: the Windows package requires version 8.4.0 specifically).
Major user-visible changes
-
The Sequential Monte Carlo sampler as described by Herbst and Schorfheide (2014) is now available under value
hssmcfor 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_setupandperfect_foresight_with_expectation_errors_solvercommands, 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.
-
Available under option
mom_method = irf_matchingoption to themethod_of_momentscommand. -
New blocks
matched_irfsandmatched_irfs_weightsfor specifying the values and weights of the empirical impulse response functions.
-
-
Pruning Ă la Andreasen et al. (2018) is now available at an arbitrary approximation order when performing stochastic simulations with
stoch_simul, and at 3rd order when performing particle filtering. -
New
logoption to thevarstatement. 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 (yandLOG_y), and an auxiliary equation linking the two will also be added (equal toy = exp(LOG_y);). Moreover, every occurrence ofyin 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. -
New model editing features
-
Multiple
modelblocks are now supported (this was already working but not explicitly documented). -
Multiple
estimated_paramsblocks now concatenate their contents (instead of overwriting previous ones, which was the former undocumented behavior); anoverwriteoption has been added to provide the old behavior. -
New
model_optionsstatement to set model options in a global fashion. -
New
model_removecommand to remove equations. -
New
model_replaceblock to replace equations. -
New
var_removecommand to remove variables (or parameters). -
New
estimated_params_removeblock to remove estimated parameters.
-
-
Stochastic simulations
-
Performance improvements for simulation of the solution under perturbation and for particle filtering at higher order (⩾ 3).
-
Performance improvement for the first order perturbation solution using either cycle reduction (
dr=cycle_reductionoption) or logarithmic reduction (dr=logarithmic_reduction). -
New
nomodelsummaryoption to thestoch_simulcommand, to suppress the printing of the model summary and the covariance of the exogenous shocks.
-
-
Estimation
-
A truncated normal distribution can now be specified as a prior, using the 3rd and 4th parameters of the
estimated_paramsblock as the bounds. -
New
conditional_likelihoodoption to theestimationcommand. 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. -
New
additional_optimizer_stepsoption to theestimationcommand to trigger the sequential execution of several optimizers when looking for the posterior mode. -
The
generate_trace_plotscommand now allows comparing multiple chains. -
The Geweke and Raftery-Lewis convergence diagnostics will now also be displayed when
mh_nblocks>1. -
New
robust,TolGstep, andTolGstepReloptions to the optimizer available undermode_compute=5(“newrat”). -
New
brooks_gelman_plotrowsoption to theestimationcommand for controlling the number of parameters to depict along the rows of the figures depicting the Brooks and Gelman (1998) convergence diagnostics. -
New
mh_init_scale_factoroption to theestimationcommand tor govern the overdispersion of the starting draws when initializing several Monte Carlo Markov Chains. This option supersedes themh_init_scaleoption, which is now deprecated.
-
-
Steady state computation
-
Steady state computation now accounts for occasionally-binding constraints of mixed-complementarity problems (as defined by
mcptags). -
New
tolxoption to thesteadycommand for governing the termination based on the step tolerance. -
New
fsolve_optionsoption to thesteadycommand for passing options tofsolve(in conjunction with thesolve_algo=0option). -
New option
from_initval_to_endvaloption to thehomotopy_setupblock, for easily computing homotopy from initial to terminal steady state (when the former is already computed). -
New
non_zerooption toresidcommand to restrict display to non-zero residuals.
-
-
Perfect foresight
-
Significant performance improvement of the
stack_solve_algo=1option to theperfect_foresight_solvercommand (Laffargue-Boucekkine-Juillard algorithm) when used in conjunction with optionsblockand/orbytecodeof themodelblock. -
New
relative_to_initvaloption to themshocksblock, to use the initial steady state as a basis for the multiplication when there is anendvalblock. -
New
static_mfsoption to themodelblock (and to themodel_optionscommand), 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_steadyoption to theperfect_foresight_setupcommand for computing the terminal steady state at the same time as the transitory dynamics (and new optionssteady_solve_algo,steady_tolf,steady_tolx,steady_maxitandsteady_markowitzfor controlling the steady state nonlinear solver). -
New
homotopy_linearization_fallbackandhomotopy_marginal_linearization_fallbackoptions to theperfect_foresight_solvercommand to get an approximate solution when homotopy fails to go to 100%. -
New
homotopy_initial_step_size,homotopy_min_step_size,homotopy_step_size_increase_success_countandhomotopy_max_completion_shareoptions to theperfect_foresight_solvercommand to fine tune the homotopy behavior. -
Purely backward, forward and static models are now supported by the homotopy procedure.
-
-
The
stack_solve_algo=1andstack_solve_algo=6options of theperfect_foresight_solvercommand were merged and are now synonymous. They both provide the Laffargue-Boucekkine-Juillard algorithm and work with and without theblockandbytecodeoptions of themodelblock. Usingstack_solve_algo=1is now recommended, butstack_solve_algo=6is kept for backward compatibility.
-
-
OccBin
-
New
simul_reset_check_ahead_periodsoption to theoccbin_setupandoccbin_solvercommands, for resettingcheck_ahead_periodsin each simulation period. -
new
simul_max_check_ahead_periods,likelihood_max_check_ahead_periods, andsmoother_max_check_ahead_periodsoptions to theoccbin_setupcommand, for truncating the number of periods for which agents check ahead which regime is present.
-
-
Optimal policy
-
The
osrcommand now accepts theanalytic_derivationandanalytic_derivation_modeoptions. -
The
evaluate_planner_objectivecommand now computes the unconditional welfare for higher-order approximations (⩾ 3). -
New
periodsanddropoptions to theevaluate_planner_objectivecommand.
-
-
Semi-structural models
-
New
pac_target_infoblock for decomposing the PAC target into an arbitrary number of components. Furthermore, in the presence of such a block, the newpac_target_nonstationaryoperator can be used to select the non stationary part of the target (typically useful in the error correction term of the PAC equation). -
New
kindoption to thepac_modelcommand. 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. -
Performance improvement to
solve_algo=12andsolve_algo=14, which significantly accelerates the simulation of purely backward, forward and static models with theperfect_foresight_solvercommand and the routines for semi-structural models.
-
-
dseries classes
-
The
removeandremove_methods now accept a list of variables (they would previously only accept a single variable). -
New MATLAB/Octave command
dplotto plot mathematical expressions generated from variables fetched from (different) dseries objects.
-
-
Misc
-
New
display_parameter_valuescommand to print the parameter values in the command window. -
New
collapse_figures_in_tabgroupcommand to dock all figures. -
Performance improvement for the
use_dlloption of themodelblock. The preprocessor now takes advantage of parallelization when compiling the MEX files. -
New mathematical primitives available: complementary error function (
erfc), hyperbolic functions (cosh,sinh,tanh,acosh,asinh,atanh). -
New
last_simulation_periodoption to theinitval_filecommand. -
The
calib_smoothercommand now accepts thenobsandheteroskedastic_filteroptions. -
Under the MATLAB Desktop, autocompletion is now available for the
dynarecommand and other CLI commands (thanks to Eduard Benet Cerda from MathWorks). -
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), whereyare the endogenous,xthe exogenous,paramsthe parameters, andsteady_stateis self-explanatory. NB: In the dynamic case, the vectoryof 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
searchfor listing the equations in which given variable(s) appear (requiresjsoncommand line option). -
The
model_infocommand allows to print the block decomposition even if theblockoption of themodelblock has not been used, by specifying the new optionsblock_staticandblock_dynamic. -
There is now a default value for the global initialization file (
GlobalInitFileoption of the configuration file): theglobal_init.min the Dynare configuration directory (typically$HOME/.config/dynare/global_init.munder Linux and macOS, andc:\Users\USERNAME\AppData\Roaming\dynare\global_init.munder Windows). -
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.
-
-
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.
Incompatible changes
-
The default value of the
mode_computeoption of theestimationcommand has been changed to5(it was previously4). -
When using block decomposition (with the
blockoption of themodelblock), the optionmfsnow 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 under
dynare/dynare.iniin the configuration directories defined by the XDG specification (typically$HOME/.config/dynare/dynare.inifor the user-specific configuration and/etc/xdg/dynare/dynare.inifor 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). -
The information stored in
oo_.endo_simul, oo_.exo_simul, andoo_.irfsis no longer duplicated in the base workspace. New helper functionssend_endogenous_variables_to_workspace,send_exogenous_variables_to_workspace, andsend_irfs_to_workspacehave been introduced to explicitly request these outputs and to mimic the old behavior. -
The
dynare_sensitivitycommand has been renamedsensitivity. The old name is still accepted but triggers a warning. -
The syntax
resid(1)is no longer supported. -
The
mode_compute=6option to theestimationcommand now recursively updates the covariance matrix across theNumberOfMhMetropolis-Hastings runs, starting with theInitialCovarianceMatrixin the first run, instead of computing it from scratch in every Metropolis-Hastings run. -
The
periodscommand has been removed. -
The
Sigma_ecommand has been removed. -
The
blockoption of themodelblock no longer has an effect when used in conjunction withstoch_simulorestimationcommands. -
The Dynare++ executable is no longer distributed since almost all of its functionalities have been integrated inside Dynare for MATLAB/Octave.
-
A macro-processor variable defined without a value (such as
@#define varin the.modfile or alternatively-Dvaron thedynarecommand line) is now assigned thetruelogical value (it was previously assigned1). -
The
parallel_slave_open_modeoption of thedynarecommand has been renamedparallel_follower_open_mode. -
The
staticoption of themodel_infocommand is now deprecated and is replaced by theblock_staticoption.
Bugs that were present in 5.5 and that have been fixed in 6.0
- The
mh_initialize_from_previous_mcmcoption of theestimationcommand would not work if estimation was conducted with a different prior and the last draw in the previous MCMC fell outside the new prior bounds - When specifying a generalized inverse Gamma prior, the hyperparameter computation would erroneously ignore the resulting mean shift
- When using the
mh_recoveroption of theestimationcommand, the status bar always started at zero instead of showing the overall progress of the recovered chain - The
model_diagnosticscommand would fail to check the correctness of user-defined steady state files - GSA: LaTeX output was not working as expected
- Forecasts and filtered variables could not be retrieved with the
heteroskedastic_shocksblock - The OccBin smoother would potentially not display all smoothed shocks with
heteroskedastic_filteroption - The OccBin smoother would crash if the number of requested periods was smaller than the data length
- The multivariate OccBin smoother would return wrong results if the constraint was binding in the first period
- The
plot_shock_decompositioncommand would fail with theinit2shocksblock if theinitial_condition_decompositionwas not run before - LaTeX output under Windows failed to compile for
plot_priors=1option of theestimationcommand and Brooks and Gelman (1998) convergence diagnostics - The plot produced by the
shock_decompositioncommand was too big, making the close button inaccessible - Monthly dates for October, November and December (i.e. with a 2-digit month number) were not properly interpreted by the preprocessor
- Theoretical moments computed by
stoch_simulatorder=2withpruningwould not contain unconditional and conditional variance decomposition