Dynare 7.0 Released
Posted on 19 March 2026We are pleased to announce the release of Dynare 7.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.8 (R2020a) to 25.2 (R2025b), and with GNU Octave versions ranging from 8.4.0 to 11.1.0 (NB: the Windows package requires version 11.1.0 specifically).
Major user-visible changes
-
New framework for solving and simulating models featuring rich heterogeneity (which includes HANK models)
-
The solution technique for the dynamics combines elements from Bhandari, Bourany, Evans, and Golosov (2023) and Auclert, Bardóczy, Rognlie, and Straub (2021).
-
The steady state can be computed through a time iteration method within Dynare, or computed outside of Dynare and then loaded therein.
-
New statements
heterogeneity_dimension,var(heterogeneity=NAME),varexo(heterogeneity=NAME),model(heterogeneity=NAME),shocks(heterogeneity=NAME), and theSUM()aggregation operator for declaring heterogenous features. -
New
heterogeneity_compute_steady_statecommand to compute the steady state numerically. -
New
heterogeneity_load_steady_statecommand to load a pre-computed steady state (policy functions, discretized shocks, stationary distribution) from a MAT file. -
New
heterogeneity_solvecommand to compute a first-order linearized solution. -
New
heterogeneity_simulatecommand to compute impulse response functions and stochastic simulations, with support for both unanticipated shocks and anticipated news shock sequences. -
Example
.modfiles include: Krusell-Smith (krusell_smith.mod), a one-asset HANK (hank_one_asset.mod), a two-asset HANK (hank_two_assets.mod), with steady state computation variants. The models are the same as in the Sequence-Space-Jacobian package (shade-econ/sequence-jacobianon GitHub).
-
-
Skew normal shocks and closed skew normal (CSN) distribution support
-
New
skewkeyword inshocksandestimated_paramsblocks to declare skewness. -
Added support for skew normal shocks in
stoch_simulcommand. -
Added support for skew normal shocks in
estimationcommand by means of the Pruned Skewed Kalman Filter and Smoother of Guljanov, Mutschler, and Trede (forthcoming).
-
-
Posterior samplers
-
New posterior samplers (available via the
posterior_sampling_methodoption of theestimationcommand):-
The Dynamic Striated Metropolis Hastings sampler proposed by Waggoner, Wu, and Zha (2016) is now available under the value
'dsmh'; -
The Differential-Independence Mixture Ensemble (“DIME”) MCMC sampler of Boehl (2022) is now available under the value
'dime_mcmc'.
-
-
New
posterior_sampler_optionoptions forposterior_sampling_method='slice':-
save_iter_info_fileto shut off saving of iteration information to a file; -
fast_likelihood_evaluation_for_rejectionto reject poor draws in OccBin more efficiently; -
use_prior_drawsto use the prior as the proposal within slice (Gibbs) sampling for up to 10 draws.
-
-
Sequential Monte Carlo (SMC) sampler:
-
Trace plots now allow plotting the particles;
-
Now supports the
bayesian_irf,moments_varendo, andsmootheroptions.
-
-
-
New functionality for leveraging MATLAB’s Parallel Computing Toolbox (PCT) for accelerating computations
- Computations that can be thus parallelized:
- running multiple Metropolis-Hasting chains in parallel (as set by the
mh_nblocksoption); - SMC sampler initialization;
- parallel likelihood evaluations in SMC samplers.
- running multiple Metropolis-Hasting chains in parallel (as set by the
-
Controlled by a new
use_pctoption of theestimationcommand. - If Dynare detects MATLAB R2024b or later with the PCT and a valid license,
these supported tasks are parallelized by default (unless the user sets
use_pcttofalse); random seeds are precomputed so results are reproducible between serial and parallel execution (thanks to Eduard Benet Cerda from MathWorks).
- Computations that can be thus parallelized:
-
New options to the
estimationcommand:-
estimate_initial_states_endogenous_prior, that estimates initial states along with model parameters, for stationary models; -
frequentist_smootherthat allows shutting off the smoother in cases the Bayesian smoother is not applicable; -
use_univariate_smoother_if_singularity_is_detectedto use the univariate Kalman smoother in case stochastic singularity is detected.
-
-
OccBin
-
New piecewise linear particle filter (PPF).
-
New posterior importance sampling feature: allows to bootstrap posterior draws obtained from e.g. linear KF estimation, using PKF or PPF and check effective sample size and estimator bias.
-
-
Improvements to the the
method_of_momentscommand:-
It now supports estimation with discretionary optimal policy;
-
With
mom_method=SMMit now supports thebandpass_filter,one_sided_hp_filter, andhp_filteroptions to match filtered moments; -
It now allows matching first moments even when the
prefilteroption is used to obtain centered higher order moments.
-
-
Perfect foresight
-
Improvements to perfect foresight solver with iterative linear solvers, i.e., GMRES (
stack_solve_algo=2) and BiCGStab (stack_solve_algo=3):-
New
preconditioneroption to theperfect_foresight_solverandperfect_foresight_with_expectation_errors_solvercommands, which controls the preconditioner used with GMRES or BiCGStab; -
The new default,
preconditioner=first_iter_lu, does a LU decomposition with complete pivoting at the first Newton iteration, and uses it as a preconditioner in further iterations; -
The value
preconditioner=block_diagonal_lucomputes a block diagonal preconditioner based on a LU decomposition for only a few periods of the stacked system; -
The old default, using an incomplete LU decomposition, remains available under
precondition=incomplete_lu; -
The
first_iter_luandblock_diagonal_lupreconditioners deliver a significant performance improvement over the old default (incomplete_lu) and make this algorithm competitive and in some cases faster than other perfect foresight solvers; -
Other new options that control the behaviour of the iterative solvers:
iter_tol,iter_maxit,gmres_restart,block_diagonal_lu_maxlu,block_diagonal_lu_nperiods,block_diagonal_lu_nlu,block_diagonal_lu_relu.
-
-
New perfect foresight solvers:
-
ParU from SuiteSparse, a direct sparse LU solver, available under the
stack_solve_algo=8option; -
Panua PARDISO direct sparse LU solver, available under the
stack_solve_algo=9option (license file has to be provided by the user); -
Panua PARDISO direct-iterative solver using CGS, available under the
stack_solve_algo=10option (license file has to be provided by the user).
-
-
New
perfect_foresight_controlled_pathsblock that gives the possibility of controlling the value of some endogenous variables for some simulation periods (in which case some exogenous variables must be left free and are thus solved for by Dynare, to avoid over-determination of the problem). Can be used either in a pure perfect foresight context, or in perfect foresight with expectation errors. -
Perfect foresight integration with dates/dseries:
-
New options
first_simulation_periodandlast_simulation_periodtoperfect_foresight_setupandperfect_foresight_with_expectation_errors_setupcommands, to specify the real dates for the simulation (e.g.2024Q1); -
The
periodskeyword of theshocksandmshocksblocks now accept real dates; -
The
learnt_inoption of theshocks,mshocksandendvalblocks now accept real dates; -
When real dates are used, the
perfect_foresight_solverandperfect_foresight_with_expectation_errors_solvercommands return the simulation as a dseries object in the workspace variableSimulated_time_series(which contains both endogenous and exogenous variables).
-
-
The
perfect_foresight_with_expectation_errors_setupcommand can now be combined with ahistvalblock or ahistval_filecommand. -
New
endval_steady_nocheckoption to theperfect_foresight_solverandperfect_foresight_with_expectation_errors_solvercommands, to skip checking the terminal steady state values when they are provided explicitly either by a steady state file or asteady_state_modelblock (in combination with theendval_steadyoption for theperfect_foresight_solvercase). This is useful for models with unit roots as, in this case, the steady state is not unique or doesn’t exist. -
Using several
endvalblocks in the same file is now supported, in which case they are concatenated. -
Option values
stack_solve_algo={2,3}are now available withoutblocknorbytecode. -
New
shock_pathsblock for describing a perfect foresight scenario in a more compact and flexible way, which supersedes theshocks,mshocksandendvalblocks. Additionally, a newdatabasecommand has been added to refer to external databases that can be used from withinshock_paths.
-
-
Steady state
-
The
steadycommand now accepts thenoprintoption. -
The
steadycommand now accepts thenon_zerooption (with the same meaning as in theresidcommand). -
Option values
solve_algo={6,7,8}are now available withoutblocknorbytecode.
-
-
Decision rules (reduced form solution)
-
New
dr=aimoption to thestoch_simul,estimationandmethod_of_momentscommands (equivalent to the formeraim_solveroption, which is now deprecated). -
New
dr_cycle_reduction_maxiteroption to thestoch_simul,estimationandmethod_of_momentscommands, to control the maximum number of iterations when the cycle reduction algorithm is used.
-
-
Extended path
-
New option
use_first_order_solutionto the theextended_pathcommand. -
It is now possible to have zero-variance shocks.
-
-
Forecasting
-
The
forecastcommand now also works at higher order and supports thepruningoption. -
Option
forecast_typetoshock_decompositionto allow shock decomposing conditional and unconditional forecasts.
-
-
Syntax
-
More flexible syntax for specifying complementarity conditions:
-
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
mcpequation tag is still supported but deprecated; -
Here is an example of an equation with an associated complementarity condition, using the new syntax:
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 themodelblock (the expression by which they will be replaced will be shifted accordingly). -
The
heteroskedastic_shocksblock now supports dates syntax.
-
-
The
osrcommand now supports using aplanner_objectivefunction to conduct welfare analysis at higher order. -
Significant performance improvements for:
-
Higher-order perturbation solution under Windows;
-
Estimation with the
analytic_derivationoption.
-
-
New debugging information
-
The multivariate Kalman filter smoother now allows using the
debugoption to display information on linear combinations causing stochastic singularity. -
dynare_minimize_objectivenow returns runtime, iterations, function evaluations, exitflag, and messages from all optimizers. -
The
model_diagnosticscommand now:-
checks for redundant equations based on the dynamic Jacobian;
-
displays equation tags of affected equations;
-
displays its information in a more readable way.
-
-
New debugging options to the
perfect_foresight_solvercommand:-
check_jacobian_singularityto check the singularity of the dynamic Jacobian forstack_solve_algooption equal to0,2or3; -
allow_nonfinite_valuesto prevent the automatic removal of nonfinite values during Newton iterations, which may be useful for debugging purposes.
-
-
-
dseries
-
New routines for converting annual data into quarterly data, and quarterly data into monthly data.
-
New
--print-tableoption to thedplotcommand, for displaying the results as a table instead of a plot. -
The
dseriesconstructor based on atableis now available under Octave (requires thedatatypespackage). -
The
datesanddseriesclasses now accept the string syntax (double quotes) in their constructor and methods.
-
-
The
calib_smoothercommand now plots the smoother results. -
New preprocessor option
output=firstthat instructs the preprocessor to only compute first-order dynamic derivatives if no other command in the.modfile requires higher-order ones. -
New
irfs(distribution)option to thepriorcommand from the command-line interface, for computing the prior distribution of the impulse response functions of the endogenous variables. -
New structure
M_.state_varstoring information on the state variables in both declaration and decision-rule order. -
References:
-
Auclert, A., B. Bardóczy, M. Rognlie, and L. Straub (2021): “Using the Sequence‐Space Jacobian to solve and estimate heterogeneous‐agent models,” Econometrica, 89(5), 2375–2408.
-
Bhandari, A., T. Bourany, D. Evans, and M. Golosov (2023): “A perturbational approach for approximating heterogeneous agent models,” NBER Working Papers, 31744.
-
Boehl, G. (2022): “DIME MCMC: A Swiss Army Knife for Bayesian Inference”, SSRN Electronic Journal, https://dx.doi.org/10.2139/ssrn.4250395
-
Guljanov, G., W. Mutschler and M. Trede (forthcoming): “Pruned skewed Kalman filter and smoother with application to DSGE models,” Journal of Economic Dynamics and Control
-
Waggoner, D. F., H. Wu and T. Zha (2016): “Striated Metropolis–Hastings sampler for high-dimensional models,” Journal of Econometrics, 192(2), 406–420.
-
Incompatible changes
-
With the
osrcommand, the legacy linear-quadratic approach with anoptim_weightsblock now requires explicitly settingorder=1. -
The default filename produced by the
savemacrooption of thedynarecommand has changed. It now contains an underscore (instead of a dash), for better compatibility with MATLAB/Octave syntax. -
Prior truncation is now shut off by default via setting
prior_trunc=0. -
The
infileoption of thesmoother2histvalcommand has been removed. An equivalent functionality can be obtained with theoutfileoption of thesmoother2histvalcommand and thehistval_filecommand. -
The
det_cond_forecast,init_plan,basic_planandflip_plancommands have been removed. A similar functionality is provided by the newperfect_foresight_controlled_pathsblock (or alternatively by theshock_pathsblock with andendogenizestanza). -
The
unit_root_varscommand has been removed. It has been superseded by thediffuse_filterof theestimationcommand, and thenocheckoption of thesteadycommand. -
Estimated standard errors internally now get a prefix
stderrinstead of just the name of the exogenous variable. -
The deprecated
dynare_sensitivitycommand has been removed, use thesensitivitycommand instead. -
The
hp_ngridoption was removed, usefiltered_theoretical_moments_gridinstead. -
Declaring
dsge_prior_weightas aparameterhas been removed. It will be automatically added when using thedsge_varoption of theestimationcommand.
Bugs that were present in 6.5 and that have been fixed in 7.0
-
The
smoother2histval(outfile = …)command would store incorrect values for variables appearing with a lag of 2 or more. -
Using several
endvalblocks in the same file could lead to incorrect results (this setup was not supported, but there was unfortunately no error message preveting users from doing this). Proper support for multipleendvalblocks has been added (they are now concatenated). -
The
prior momentsandprior optimizecommands would crash. -
The
matched_irfsblock would not accept a single entry following theweightskeyword when there were multiple entries following theperiodskeyword, contrary to what the manual says. -
The
mode_compute=5option of theestimationcommand would crash in case of an invalid initial parameter draw. -
Uniform priors did not correctly check for invalid hyperparameter specifications.
-
The
method_of_momentscommand would crash upon trying to randomize the starting value for steady state finding. -
Filtered theoretical autocorrelation matrices at lag>0 in
oo_.autocorrandoo_.gamma_ywere erroneously transposed. -
The
mh_recoverandload_mh_fileoptions of theestimationcommand would not correctly work if the value of themh_nblocksoption was different from what was originally run. - The
extended_pathcommand would:- not return the initial condition in
oo_.exo_simul; - crash if NaN was encountered in the solution;
- crash for purely forward or purely backward models.
- not return the initial condition in
-
The
ramsey_modelcommand would crash in the presence of external functions. - The
model_infocommand would:- not display the dynamic block structure if the
block_staticoption was specified; - sometimes crash when displaying the incidence matrix when passed the
incidenceoption.
- not display the dynamic block structure if the
- When running the
estimationcommand with measurement errors:- the logic for computing calibrated measurement error entries was broken;
- the
analytic_derivationoption would crash.
-
Using Weibull priors in estimation could trigger infinite loops.
-
The generalized Weibull prior distribution did not correctly take the third hyperparameter shifting the lower bound into account.
-
The display of problematic variables in
debugmode for theperfect_foresight_solvercommand was broken. -
OccBin posterior moments would crash when the smoother encountered an unsuccessful draw.
-
OccBin: when multiple solutions were found, the relaxation algorithm would crash.
-
The diffuse Kalman smoother would return incorrect smoothed state uncertainty.
-
The block decomposition in a perfect foresight context would occasionally crash Octave.
-
Using the
forecastcommand with a model solved atorder=2withvarexo_det, Dynare would return uncertainty bands based on a first-order approximation. -
OccBin would not correctly sum the likelihood of detected multiple solution paths.
- The
identificationcommand would ignore thekalman_algooption.