This page documents the bugs fixed in released versions of Dynare. For bugs fixed in previous versions of Dynare, please read the dedicated frozen page on the DynareWiki.
Bugs fixed in version 4.5.7
 The mexfile conducting the QZ decomposition erroneously applied the
qz_criterium
to the square absolute value of eigenvalues instead of the absolute value itself (as done in mjdgges.m and the AIM solver) (bug fixed in dcac7992; see #1632 (closed))  In pathological cases,
mode_compute=5
(newrat
) might enter an infinite loop (bug fixed in d5e25c8f; see also #1636 (closed)) 
discretionary_policy
might erroneously state that the derivatives of the objective function are nonzero if there are NaN present (bug fixed in 8cb99bfe; see also !1644 (merged))  Dynare++, when conducting the QZ decomposition, erroneously applied the
qz_criterium
to the square absolute value of eigenvalues instead of the absolute value itself (bug fixed in 8f738f10; see also #1632 (closed))  Dynare++: IRFs were incorrectly computed (bug fixed in 8698b4c5; see also #1634 (closed))

dynare_sensitivity
did not display the figures ofirf_calibration
, it only stored them on the disk (bug fixed in d613d11b)  Scatter plots generated by
dynare_sensitivity
did not correctly display LaTeX names (bug fixed in b0d5eadd)  Parameter updating via steady state files did not correctly work in case of using [static]/[dynamic] equation tags (bug fixed in 5beea983; see #1627 (closed))
 Memory leaks in
k_order_pert
could lead to crashes (bugs fixed in 7c5ca5, 9dce3b, and f25ec5)  Predetermined variables were not properly set when used in model local variables (bug fixed in a07f3f)
 Posterior moment computation did not correctly update the covariance matrix of exogenous shocks during posterior sampling (bug fixed in !1627 (closed))
 Dynare was crashing with a cryptic message if a non estimated parameter was initialized in the
estimated_params_init
block (fixed in e11c374 and caac150; see #1610 (closed))  The
forecast
command crashed if the model was declared as linear and contained deterministic exogenous variables (bug fixed in fda0218 and 14eb831; see #1608)  Block decomposition is broken when used in conjunction with
varexo_det
(bug fixed in fa039b8c)  The model was not correctly specified when
identification
was run without another stochastic command in the.mod
file (e.g.estimation
,stoch_simul
, etc.). See #1631 (closed) (bug fixed in preprocessor@4c71d143)  Realtime annualized shock decompositions added the wrong steady state value (bug fixed in 5badd343)

mh_recover
option crashed when using slice sampler (bug fixed in 4ba9c929)  xaxis values in plots of moment restrictions were wrong for autocovariances (bug fixed in b0e7c47a)
Bugs fixed in version 4.5.6
 TaRB sampler: incorrect last posterior was returned if the last draw was rejected (bug fixed in 433a681).
 Fixed online particle filter by drawing initial conditions in the prior distribution (see ef22c71)
 Fixed evaluation of the likelihood in non linear / particle filters (see 427e88e, 1f08164 and 35c3a9f)
 Added missing documented
montecarlo
option in Gaussian Filter and Nonlinear Kalman Filter (bug fixed in ee6eaa8 and 28f7c76)  Added back a flag to deal with errors on Cholesky decomposition in the Conditional Particle Filter (bug fixed in 43615ce)
 Macroprocessor
length()
operator was returning 1 when applied to a string. Macroprocessor now raises an error whenlength()
operator is called on an integer and return the number of characters when applied to a string (bug fixed in d056df3) 
mode_compute=8
: the error code during modefinding was not correctly handled, resulting in crashes (bug fixed in 9722917)  Identification was not correctly displaying a message for collinear parameters if there was no unidentified parameter present (bug fixed in b8094a2 and 6607d39)
Bugs fixed in version 4.5.5
 Identification was crashing during prior sampling if
ar
was initially too low (bug fixed in 09ac7f6)  The
align
method ondseries
did not return a functional seconddseries
output (bug fixed in 667bfb). 
perfect_foresight_solver
with optionstack_solve_algo=7
was not working correctly when an exogenous variable has a lag greater than 1 (bug fixed in 8913791 and 7948460) 
identification
withprior_mc
option would crash if the number of moments with nonzero derivative is smaller than the number of parameters (bug fixed in 09ac7f6)  Calling several times
normcdf
ornormpdf
with the same arguments in a model with block decomposition (but not bytecode) was leading to incorrect results (bug fixed in 745e3c9)
Bugs fixed in version 4.5.4

The
type
option ofplot_shock_decomposition
is always set toqoq
, regardless of what is specified (bug fixed in ff1ae57). 
Bug in GSA when no parameter is detected below pvalue threshold (fixed in ec35210).

Various bug fixes in shock decompositions (see 45166ab, 5d6b688, a04b287, fd8a69d, 3e589d2, a63bc5b, and f4b25ef).

Bug in reading in macro arrays passed on
dynare
command line via theD
option (see 204d9c, and 3a62273) 
Estimation with missing values was crashing if the
prefilter
option was used (see 92549e4). 
Added a workaround for a difference in behaviour between Octave and Matlab regarding the creation of function handles for functions that do not exist in the path. With Octave 4.2.1, steady state files did not work if no auxiliary variables were created (see 99e4cb6).

The
stoch_simul
command was crashing with a cryptic message if optionorder=3
was used without settingk_order_solver
(see 28b499a). 
In cases where the prior bounds are infinite and the mode is estimated at exactly 0, no
mode_check
graphs were displayed (see ef797ee). 
Parallel execution of MCMC was broken in models without auxiliary variables (see ec3fb76, and bbdde46).

Reading data with column names from Excel might crash (see 8e73289).

The multivariate Kalman smoother was crashing in case of missing data in the observations and
Finf
became singular (see cbc0cdf). 
The
plot_shock_decomposition
command ignored various userdefined options likefig_name
,use_shock_groups
orinteractive
and instead used the default options (see 5e7256d and b3bcd2c). 
Nested
@#ifdef
and@#ifndef
statements don't work in the macroprocessor (see 047597)
Bugs fixed in version 4.5.3
Bugs fixed in version 4.5.2

perfect_foresight_solver
. If expected shocks were declared after the terminal period, as specified by theperiods
option, Dynare was crashing (see commits 97b894a, 10047fe, and 131a68e). 
perfect_foresight_solver
. Models declared with thelinear
option were crashing if exogenous variables were present with a lead or lag (see commits a1c3497, 1a4257a, and 5429821). 
After ML, Bayesian estimation when not specifying the smoother option or
mh_replic=0
not all smoothed measurement errors were displayed (see commit 4cd259b). 
conditional_forecasts
. Fixed error in reference manual (see commit b4a52b8). 
Smoother. Provide informative error instead of crashing when model cannot be solved (see commit 8ccebd9).

The
nopathchange
preprocessor option was always triggered, regardless of whether it was passed or not (see commit 41e6eca). 
When
ramsey_policy
is used, allow state variables to be set inhistval
block. (#1193) 
histval
erroneously accepts leads, leading to cryptic crashes (#1510) 
The prior MC draws from previous runs were not deleted, potentially resulting in loading stale files (#1515)

estim_params_
was being declaredglobal
more than once. (#1518) 
Fixed crashes happening when simulating linear models with order>1 (see commit 0f84dad).

Make empirical moments independent of
simul_replic
, as stated in the reference manual, by outputting moments computed with the first simulated sample (see commit f0b9f45). 
The
prior_function
required a precedingestimation
command to properly set up the prior (see commit 802536d). 
If the mode for a parameter was at exactly 0,
mode_check
was crashing (see commit 86e6464) 
Fixed
get_posterior_parameters
routine which should not do more than getting parameters (see commit 0f3b68e and #1506). As a consequecence, theshock_decomposition
command does not correctly set theparameter_set
for use in subsequent function calls if shocks are correlated or measurement error is present. 
Fixed bug in Ramsey problem with constraints both on a policy instrument and another variable. (see commit b1fc34e). Note that the constraint on a variable that is not an instrument of the Ramsey problem must be written with an equation tag in the model block.

Fixed bug in Ramsey problem with constraints on policy instrument (see commit 0068f9f).

Fixed crash with optimizer 5 ('newrat') when not used with DSGE model at order 1 (see issue #1494 and commit da063b2)
Bugs fixed in version 4.5.1

Fixed out of memory issue with simpsa algorithm (commit).

Added missing plots for measurement errors with
generate_trace_plot
command (commit) 
Posterior moments after MCMC for very big models (
size_of_the_reduced_form_model(oo_.dr)*options_.sub_draws>options_.MaximumNumberOfMegaBytes
) were not correctly computed and their plotting might crash Dynare (commit) 
Results of the posterior conditional variance decomposition after MCMC were not correctly computed (commit)

Options
use_shock_groups
andcolormap
of theshock_decomposition
command were not working (see #1470) (commit) 
Added a clean error message if sensitivity toolbox is used with recursive estimation (commit)

Computation of posterior filtered variables was crashing in models with only one variable (commit)

Fixed various typos and errors in the reference manual
Bugs fixed in version 4.5.0

BVAR models

Conditional forecasts

The
conditional_forecast
command produced wrong results in calibrated models when used at initial values outside of the steady state (given withinitval
) (#665), 
The
plot_conditional_forecast
option could produce unreadable figures if the areas overlap (#1155), 
The
conditional_forecast
command after MLE crashed (#1220), 
In contrast to what is stated in the manual, the confidence interval size
conf_sig
was 0.6 by default instead of 0.8 (#338). 
Conditional forecasts were wrong when the declaration of endogenous variables was not preceeding the declaration of the exogenous variables and parameters (#1276, fixed in #1277).


Discretionary policy

Dynare allowed running models where the number of instruments did not match the number of omitted equations (#1042),

Dynare could crash in some cases when trying to display the solution (#1042),

Parameter dependence embedded via a
steady_state
was not taken into account, typically resulting in crashes (#1241).


dseries class
 When subtracting a dseries object from a number, the number was instead subtracted from the dseries object (link).

DSGEVAR models

Dynare crashed when estimation encountered nonfinite values in the Jacobian at the steady state (#1190),

The presence of a constant was not considered for degrees of freedom computation of the Gamma function used during the posterior computation; due to only affecting the constant term, results should be be unaffected, except for model_comparison when comparing models with and without (#1212).


Estimation command

In contrast to what was stated in the manual, the confidence interval size
conf_sig
forforecast
without MCMC was 0.6 by default instead of 0.9 (#338), 
Calling estimation after identification could lead to crashes (#675),

When using recursive estimation/forecasting and setting some elements of
nobs
to be larger than the number of observations T in the data,oo_recursive_
contained additional cell entries that simply repeated the results obtained foroo_recursive_T
, 
Computation of Bayesian smoother could crash for larger models when requesting
forecast
orfiltered_variables
, 
Geweke convergence diagnostics were not computed on the full MCMC chain when the
load_mh_file
option was used, 
The Geweke convergence diagnostics always used the default
taper_steps
andgeweke_interval
(#1341), 
Bayesian IRFs (
bayesian_irfs
option) could be displayed in an unreadable way when they move from negative to positive values, 
If
bayesian_irfs
was requested whenmh_replic
was too low to compute HPDIs, plotting was crashing (#1326), 
The xaxis value in
oo_.prior_density
for the standard deviation and correlation of measurement errors was written into a fieldmearsurement_errors_*
instead ofmeasurement_errors_*
(#1353), 
Using a userdefined
mode_compute
crashed estimation, 
Option
mode_compute=10
did not work with infinite prior bounds, 
The posterior variances and covariances computed by
moments_varendo
were wrong for very large models due to a matrix erroneously being filled up with zeros (#1423), 
Using the
forecast
option withloglinear
erroneously added the unlogged steady state (#852), 
When using the
loglinear
option the check for the presence of a constant was erroneously based on the unlogged steady state (#852), 
Estimation of
observation_trends
was broken as the trends specified as a function of deep parameters were not correctly updated during estimation (#852), 
When using
analytic_derivation
, the parameter values were not set before testing whether the steady state file changes parameter values, leading to subsequent crashes, 
If the steady state of an initial parameterization did not solve, the observation equation could erroneously feature no constant when the
use_calibration
option was used (#698), 
When computing posterior moments, Dynare falsely displayed that moment computations are skipped, although the computation was performed correctly,

If
conditional_variance_decomposition
was requested, although all variables contain unit roots, Dynare crashed instead of providing an error message (#691), 
Computation of the posterior parameter distribution was erroneously based on more draws than specified (there was one additional draw for every Markov chain),

The estimation option
lyapunov=fixed_point
was broken, 
Computation of
filtered_vars
with only one requested step crashed Dynare, 
Option
kalman_algo=3
was broken with nondiagonal measurement error (#1235), 
When using the diffuse Kalman filter with missing observations, an additive factor log(2*pi) was missing in the last iteration step (#1235),

Passing of the
MaxFunEvals
andInitialSimplexSize
options tomode_compute=8
was broken, 
Bayesian forecasts contained initial conditions and had the wrong length in both plots and stored variables,

Filtered variables obtained with
mh_replic=0
, ML, orcalibrated_smoother
were padded with zeros at the beginning and end and had the wrong length in stored variables, 
Computation of smoothed measurement errors in Bayesian estimation was broken,

The
selected_variables_only
option (mh_replic=0
, ML, orcalibrated_smoother
) returned wrong results for smoothed, updated, and filtered variables (#1161), 
Combining the
selected_variables_only
option with forecasts obtained usingmh_replic=0
, ML, orcalibrated_smoother
leaded to crashes, 
oo_.UpdatedVariables
was only filled when thefiltered_vars
option was specified (#1366), 
When using Bayesian estimation with
filtered_vars
, but withoutsmoother
, thenoo_.FilteredVariables
erroneously also contained filtered variables at the posterior mean as withmh_replic=0
(#738), 
Running an MCMC a second time in the same folder with a different number of iterations could result in crashes due to the loading of stale files,

Results displayed after Bayesian estimation when not specifying the
smoother
option were based on the parameters at the mode from mode finding instead of the mean parameters from the posterior draws. This affected the smoother results displayed, but also calls to subsequent command relying on the parameters stored inM_.params
likestoch_simul
, 
The content of
oo_.posterior_std
after Bayesian estimation was based on the standard deviation at the posterior mode, not the one from the MCMC, this was not consistent with the reference manual (#1013), 
When the initialization of an MCMC run failed, the metropolis.log file was locked, requiring a restart of Matlab to restart estimation (#1155),

If the posterior mode was right at the corner of the prior bounds, the initialization of the MCMC erroneously crashed (#1155),

If the number of dropped draws via
mh_drop
coincided with the number of draws in a_mh'file
,oo_.posterior.metropolis.mean
andoo_.posterior.metropolis.Variance
were NaN (#1297).


Estimation and calibrated smoother

When using
observation_trends
with theprefilter
option, the mean shift due to the trend was not accounted for (#852), 
When using
first_obs
>1, the higher trend starting point ofobservation_trends
was not taken into account, leading, among other things, to problems in recursive forecasting (#852), 
The diffuse Kalman smoother was crashing if the forecast error variance matrix became singular (link),

The multivariate Kalman smoother provided incorrect state estimates when all data for one observation are missing (#1324),

The multivariate diffuse Kalman smoother provided incorrect state estimates when the
Finf
matrix becomes singular (#1324), 
The univariate diffuse Kalman filter was crashing if the initial covariance matrix of the nonstationary state vector is singular (#1324),


Forecasts

In contrast to what is stated in the manual, the confidence interval size
conf_sig
was 0.6 by default instead of 0.9 (#338), 
Forecasting with exogenous deterministic variables provided wrong decision rules, yielding wrong forecasts (#711),

Forecasting with exogenous deterministic variables crashed when the
periods
option was not explicitly specified (#1325), 
Option
forecast
when used withinitval
was using the initial values in theinitval
block and not the steady state computed from these initial values as the starting point of forecasts (#692).


Global Sensitivity Analysis

Identification

Identification did not correctly pass the
lik_init
option, requiring the manual setting ofoptions_.diffuse_filter=1
in case of unit roots , 
Testing identification of standard deviations as the only parameters to be estimated with ML leaded to crashes,

Automatic increase of the lag number for autocovariances when the number of parameters is bigger than the number of nonzero moments was broken,

When using ML, the asymptotic Hessian was not computed (#1238),

Checking for singular values when the eigenvectors contained only one column did not work correctly (#1238),


Model comparison
 Selection of the
modifiedharmonicmean
estimator was broken (#1015).
 Selection of the

Optimal Simple Rules

When covariances were specified, variables that only entered with their variance and no covariance term obtained a wrong weight, resulting in wrong results (#767),

Results reported for stochastic simulations after
osr
were based on the last parameter vector encountered during optimization, which does not necessarily coincide with the optimal parameter vector (#767), 
Using only one (co)variance in the objective function resulted in crashes (#767),

For models with nonstationary variables the objective function was computed wrongly (#767).


Ramsey policy

If a Lagrange multiplier appeared in the model with a lead or a lag of more than one period, the steady state could be wrong (#633).

When using an external steady state file, incorrect steady states could be accepted,

When using an external steady state file with more than one instrument, Dynare crashed (#696),

When using an external steady state file and running
stoch_simul
afterramsey_planner
, an incorrect steady state was used, 
When the number of instruments was not equal to the number of omitted equations, Dynare crashed with a cryptic message (#1241),

The
planner_objective
acceptedvarexo
, but ignored them for computations,


Shock decomposition

Perfect foresight models

The perfect foresight solver could accept a complex solution instead of continuing to look for a realvalued one (#896),

The
initval_file
command only accepted column and not row vectors (link), 
The
initval_file
command did not work with Excel files (link), 
Deterministic simulations with one boundary condition crashed in
solve_one_boundary
due to a missing underscore when passingoptions_.simul.maxit
, 
Deterministic simulation with exogenous variables lagged by more than one period crashed (#617),

Termination criterion
maxit
was hardcoded forsolve_algo=0
and could no be changed, 
When using
block
/bytecode
, relational operators could not be enforced (#439), 
When using
block
some exceptions were not properly handled, leading to code crashes (#1245), 
Using
periods=1
crashed the solver (bug only partially fixed) (#1205).


Smoothing

Perturbation reduced form

In contrast to what is stated in the manual, the results of the unconditional variance decomposition were only stored in
oo_.gamma_y(nar+2)
, not inoo_.variance_decomposition
, 
Dynare could crash when the steady state could not be computed when using the
loglinear
option, 
Using
bytcode
when declared exogenous variables were not used in the model leaded to crashes in stochastic simulations (#841), 
Displaying decision rules involving lags of auxiliary variables of type 0 (leads>1) crashed (#1367).

The
relative_irf
option resulted in wrong output atorder>1
as it implicitly relies on linearity (#740).


Displaying of the MHhistory with the
internals
command crashed if parameter names did not have same length (link). 
Dynare crashed when the userdefined steady state file returned an error code, but not an conformablesized steady state vector (#1001).

Due to a bug in
mjdgges.mex
unstable parameter draws with eigenvalues up to 1+1e6 could be accepted as stable for the purpose of the BlanchardKahn conditions, even ifqz_criterium<1
(link). 
The
use_dll
option on Octave for Windows required to pass a compiler flag at the command line, despite the manual stating this was not necessary (#1314). 
Dynare crashed for models with
block
option if the BlanchardKahn conditions were not satisfied instead of generating an error message. 
The
verbose
option did not work withmodel(block)
. 
When falsely specifying the
model(linear)
for nonlinear models, incorrect steady states were accepted instead of aborting (#726). 
The
STEADY_STATE
operator called on model local variables (socalled pound variables) did not work as expected. 
The substring operator in macroprocessor was broken. The characters of the substring could be mixed with random characters from the memory space.

Block decomposition could sometimes cause the preprocessor to crash.

A bug when external functions were used in model local variables that were contained in equations that required auxiliary variable/equations led to crashes of Matlab (link).

Sampling from the prior distribution for an inverse gamma II distribution when
prior_trunc>0
could result in incorrect sampling (#997). 
Sampling from the prior distribution for a uniform distribution when
prior_trunc>0
was ignoring the prior truncation (#997).