Dynare 5.0 Released
Posted on 07 January 2022We are pleased to announce the release of Dynare 5.0.
This major release adds new features and fixes various bugs.
The Windows, macOS and source packages are already available for download at the Dynare website.
All users are strongly encouraged to upgrade.
This release is compatible with MATLAB versions ranging from 8.3 (R2014a) to 9.11 (R2021b), and with GNU Octave version 6.4.0 (under Windows).
The new tools for semi-structural models and the improvements on the nonlinear solvers were funded by the European Central Bank. Special thanks to Nikola Bokan (ECB) for his contributions and numerous bug reports and fixes.
Major user-visible changes
-
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_modelandvar_expectation_modelcommands, and thevar_expectationoperator. -
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_modelcommand and thepac_expectationoperator. -
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 accompanying Andreasen et al. (2018), Born and Pfeifer (2014), and Mutschler (2018). It is accessible via the new
method_of_momentscommand and the newmatched_momentsblock. Moreover, by default, a new non-linear least squares optimizer based onlsqnonlinis used for minimizing the method of moments objective function (available undermode_compute=13). GMM can further benefit from using gradient-based optimizers (usinganalytic_standard_errorsoption and/or passing'Jacobian','on'to the optimization options) as the Jacobian of the moment conditions can be computed analytically. -
Implementation of the Occbin algorithm by Guerrieri and Iacoviello (2015), together with the inversion filter of Cuba-Borda, Guerrieri, Iacoviello, and Zhong (2019) and the piecewise Kalman filter of Giovannini, Pfeiffer, and Ratto (2021). It is available via the new block
occbin_constraintsand the new commandsoccbin_setup,occbin_solver,occbin_graph, andoccbin_write_regimes. -
Stochastic simulations
-
stoch_simulnow supports theoretical moments atorder=3withpruning. -
stoch_simulnow reports second moments based on the pruned state space if thepruningoption is set (in previous Dynare releases it would report a second-order accurate result based on the linear solution).
-
-
Estimation
-
Performance optimization to pruned state space systems and Lyapunov solvers.
-
New option
mh_posterior_mode_estimationtoestimationto perform mode-finding by running the MCMC. -
New heteroskedastic filter and smoother, where shock standard errors may unexpectedly change in every period. Triggered by the
heteroskedastic_filteroption of theestimationcommand, and configured via theheteroskedastic_shocksblock. -
New option
mh_tune_guessfor setting the initial value formh_tune_jscale. -
New option
smoother_reduxtoestimationandcalib_smootherto trigger computing the Kalman smoother on a restricted state space instead of the full one. -
New block
filter_initial_statefor setting the initial condition of the Kalman filter/smoother. -
New option
mh_initialize_from_previous_mcmcto theestimationcommand that allows to pick initial values for a new MCMC from a previous one. -
The
xls_sheetoption of theestimationcommand now takes a quoted string as value. The former unquoted syntax is still accepted, but no longer recommended. -
New option
particle_filter_optionsto set various particle filter options.
-
-
Perfect foresight and extended path
-
New specialized algorithm in
perfect_foresight_solverto deal with purely static problems. -
The
debugoption ofperfect_foresight_solverprovides debugging information if the Jacobian is singular. -
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 the 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 for 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.
-
-
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);
- it now also works in a perfect foresight context.
-
discretionary_policyis now able to solve nonlinear models (it will then use their first-order approximation, and the analytical steady state must be provided).
-
-
Identification
-
New option
schur_vec_tolto theidentificationcommand, for setting the tolerance level used to find nonstationary variables in the Schur decomposition of the transition matrix. -
The
identificationcommand now supports optimal policy.
-
-
Shock decomposition
- The
fast_realtimeoption of therealtime_shock_decompositioncommand now accepts a vector of integers, which runs the smoother for all the specified data vintages.
- The
-
Macro processor
- Macroprocessor variables can be defined without a value (they are assigned integer 1).
-
LaTeX and JSON outputs
-
New
nocommutativityoption to thedynarecommand. 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. -
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=parseorjson=check).
-
-
Compilation of the model (
use_dlloption)-
Block decomposition (option
blockofmodel) can now be used in conjunction with theuse_dlloption. -
The
use_dlloption can now directly be given to thedynarecommand.
-
-
dseries classes
-
Routines for converting between time series frequencies (e.g. daily to monthly) have been added.
-
dseries now supports bi-annual and daily frequency data.
-
dseries can now import data from DBnomics, via the mdbnomics plugin. Note that this does not yet work under Octave. For the time being, the DBnomics plugin must be installed separately.
-
-
Misc improvements
-
The
histval_fileandinitval_filecommands have been made more flexible and now have functionalities similar to thedatafileoption of theestimationcommand. -
When using the
loglinearoption, the output from Dynare now clearly shows that the results reported concern the log of the original variable. -
Options
blockandbytecodeofmodelcan now be used in conjunction with model-local variables (variables declared with a pound-sign#). -
The
model_infocommand 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. -
New
notimeoption to thedynarecommand, to disable the printing and the saving of the total computing time. -
New
parallel_use_psexeccommand-line Windows-specific option for parallel local clusters: whentrue(the default), usepsexecto spawn processes; whenfalse, usestart. -
When compiling from source, it is no longer necessary to pass the
MATLAB_VERSIONversion to the configure script; the version is now automatically detected.
-
Incompatible changes
-
Dynare will now generally save its output in the
MODFILENAME/Outputfolder (or theDIRNAME/Outputfolder if thedirnameoption was specified) instead of the main directory. Most importantly, this concerns the_results.matand the_mode.matfiles. -
The structure of the
oo_.planner_objectivefield has been changed, in relation to the improvements toevaluate_planner_objective. -
The preprocessor binary has been renamed to
dynare-preprocessor, and is now located in a dedicatedpreprocessorsubdirectory. -
The
dynarecommand no longer acceptsoutput=dynamicandoutput=first(these options actually had no effect). -
The minimal required MATLAB version is now R2014a (8.3).
-
The 32-bit support has been dropped for Windows.
Bugs that were present in 4.6.4 and that have been fixed in 5.0
- Equations marked with
static-tags were not detrended when adeflatorwas specified - Parallel execution of
dsge_varestimation was broken - The preprocessor would incorrectly simplify forward-looking constant
equations of the form
x(+1)=0to implyx=0 - Under some circumstances, the use of the
model_local_variablestatement would lead to a crash of the preprocessor - When using the
block-option withoutbytecodethe residuals of the static model were incorrectly displayed - When using
k_order_solver, thesimult_function ignored requested approximation orders that differed from the one used to compute the decision rules - Stochastic simulations of the
k_order_solverwithoutpruningiterated on the policy function with a zero shock vector for the first (non-endogenous) period estimationwould ignore the mean of non-zero observables if the mean was 0 for the initial parameter vectormode_checkwould crash if a parameter was estimated to be exactly 0load_mh_filewould not be able to load the proposal density if the previous run was done in parallelload_mh_filewould not work with MCMC runs from Dynare versions before 4.6.2ramsey_modelwould not correctly work withlmmcpramsey_modelwould crash if a non-scalar error code was encountered during steady state finding.- Using undefined objects in the
planner_objectivefunction would yield an erroneous error message about the objective containing exogenous variables model_diagnosticsdid not correctly handle a previousloglinearoptionsolve_algo=3(csolve) would ignore user-setmaxitandtolfoptions- The
planner_objectivevalues were not based on the correct initialization of auxiliary variables (if any were present) - The
nostrictcommand line option was not ignoring unused endogenous variables ininitval,endval, andhistval prior_posterior_statistics_corecould crash for models with eigenvalues very close to 1- The display of the equation numbers in
debugmode related to issues in the Jacobian would not correctly take auxiliary equations into account - The
residcommand was not correctly taking auxiliary and missing equations related to optimal policy (ramsey_model,discretionary_policy) into account bytecodewould lock thedynamic.binfile upon encountering an exception, requiring a restart of MATLAB to be able to rerun the file- Estimation with the
blockmodel option would crash when calling the block Kalman filter - The
blockmodel option would crash if noinitvalstatement was present - Having a variable with the same name as the mod-file present in the base workspace would result in a crash
oo_.FilteredVariablesKStepAheadVarianceswas wrongly computed in the Kalman smoother based on the previous period forecast error variance- Forecasts after
estimationwould not work if there were lagged exogenous variables present - Forecasts after
estimationwith MC would crash if measurement errors were present - Smoother results would be infinity for auxiliary variables associated with lagged exogenous variables
- In rare cases, the posterior Kalman smoother could crash due to previously accepted draws violating the Blanchard-Kahn conditions when using an unrestricted state space
perfect_foresight_solverwould crash for purely static problems- Monte Carlo sampling in
identificationwould crash if the minimal state space for the Komunjer and Ng test could not be computed - Monte Carlo sampling in
identificationwould skip the computation of identification statistics for all subsequent parameter draws if an error was triggered by one draw - The
--steps-option of Dynare++ was broken smoother2histvalwould crash if variable names were too similarsmoother2histvalwas not keeping track of whether previously stored results were generated withloglinear- The
initval_fileoption was not supporting Dynare’s translation of a model into a one lead/lag-model via auxiliary variables
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), 1–49
-
Angelini, Bokan, Christoffel, Ciccarelli and Zimic (2019): “Introducing ECB-BASE: The blueprint 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 Paper 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