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 7c5ca5f8, 9dce3b83, and f25ec51f)  Predetermined variables were not properly set when used in model local variables (bug fixed in a07f3fde)
 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 e11c3744 and caac1502; see #1610 (closed))  The
forecast
command crashed if the model was declared as linear and contained deterministic exogenous variables (bug fixed in fda02185 and 14eb831c; see #1608 (closed))  Block decomposition is broken when used in conjunction with
varexo_det
(bug fixed in preprocessor@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 433a6816).
 Fixed online particle filter by drawing initial conditions in the prior distribution (see particles@ef22c716)
 Fixed evaluation of the likelihood in non linear / particle filters (see particles@427e88e6), particles@1f08164b) and particles@35c3a9fc)
 Added missing documented
montecarlo
option in Gaussian Filter and Nonlinear Kalman Filter (bug fixed in particles@ee6eaa84 and particles@28f7c762)  Added back a flag to deal with errors on Cholesky decomposition in the Conditional Particle Filter (bug fixed in particles@43615ce4)
 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 d056df32) 
mode_compute=8
: the error code during modefinding was not correctly handled, resulting in crashes (bug fixed in 97229177)  Identification was not correctly displaying a message for collinear parameters if there was no unidentified parameter present (bug fixed in b8094a2e and 6607d390)
Bugs fixed in version 4.5.5
 Identification was crashing during prior sampling if
ar
was initially too low (bug fixed in 09ac7f62)  The
align
method ondseries
did not return a functional seconddseries
output (bug fixed in 667bfb69). 
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 8913791f79484607) 
identification
withprior_mc
option would crash if the number of moments with nonzero derivative is smaller than the number of parameters (bug fixed in 09ac7f62)  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 745e3c9d)
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 ff1ae57e). 
Bug in GSA when no parameter is detected below pvalue threshold (fixed in ec35210e).

Various bug fixes in shock decompositions (see 45166aba, 5d6b688f, a04b2876, fd8a69d9, 3e589d24, a63bc5b7, and f4b25efc).

Bug in reading in macro arrays passed on
dynare
command line via theD
option (see 204d9cd0, and 3a622738) 
Estimation with missing values was crashing if the
prefilter
option was used (see 92549e48). 
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 99e4cb6e).

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

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

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

isfile
routine was failing with matlab older than R2016b, (bug reported here and fixed in fa26ab10).
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 97b894a1, 10047fee and 131a68ea). 
perfect_foresight_solver
. Models declared with thelinear
option were crashing if exogenous variables were present with a lead or lag (see a1c34979, 1a4257ac and 54298217). 
After ML, Bayesian estimation when not specifying the smoother option or
mh_replic=0
not all smoothed measurement errors were displayed (see 4cd259ba). 
conditional_forecasts
. Fixed error in reference manual (see b4a52b80). 
Smoother. Provide informative error instead of crashing when model cannot be solved (see 8ccebd9e).

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

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

Make empirical moments independent of
simul_replic
, as stated in the reference manual, by outputting moments computed with the first simulated sample (see f0b9f453). 
The
prior_function
required a precedingestimation
command to properly set up the prior (see 802536da). 
If the mode for a parameter was at exactly 0,
mode_check
was crashing (see 86e64648) 
Fixed
get_posterior_parameters
routine which should not do more than getting parameters (see 0f3b68ee and #1506 (closed)). 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 b1fc34ef). 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 0068f9f6).

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

Fixed out of memory issue with simpsa algorithm (see 89326090).

Added missing plots for measurement errors with
generate_trace_plot
command (see aa2a1e4d) 
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 (see 0b9244dc) 
Results of the posterior conditional variance decomposition after MCMC were not correctly computed (see 0b9244dc)

Options
use_shock_groups
andcolormap
of theshock_decomposition
command were not working (see !1470 (merged) and 6de21764) 
Added a clean error message if sensitivity toolbox is used with recursive estimation (see 970feee3)

Computation of posterior filtered variables was crashing in models with only one variable (see 1f20ceb4)

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

BVAR models

bvar_irf
could display IRFs in an unreadable way when they moved from negative to positive values (see bf707c19), 
In contrast to what is stated in the documentation, the confidence interval size
conf_sig
was 0.6 by default instead of 0.9 (see #338 (closed)).


Conditional forecasts

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


Discretionary policy

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

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

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


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 (see !1190 (merged)),

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 (see !1212 (closed)).


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 (see #338 (closed)), 
Calling estimation after identification could lead to crashes (see #675 (closed)),

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
(see !1341 (closed)), 
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 (see !1326 (merged)), 
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_*
(see !1353 (merged)), 
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 (see !1423 (closed)), 
Using the
forecast
option withloglinear
erroneously added the unlogged steady state (see !852 (closed)), 
When using the
loglinear
option the check for the presence of a constant was erroneously based on the unlogged steady state (see !852 (closed)), 
Estimation of
observation_trends
was broken as the trends specified as a function of deep parameters were not correctly updated during estimation (see !852 (closed)), 
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 (see !698 (merged)), 
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 (see !691 (merged)), 
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 (see !1235 (closed)), 
When using the diffuse Kalman filter with missing observations, an additive factor log(2*pi) was missing in the last iteration step (see !1235 (closed)),

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 (see #1161 (closed)), 
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 (see #1366 (closed)), 
When using Bayesian estimation with
filtered_vars
, but withoutsmoother
, thenoo_.FilteredVariables
erroneously also contained filtered variables at the posterior mean as withmh_replic=0
(see !738 (merged)), 
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 (see #1013 (closed)), 
When the initialization of an MCMC run failed, the metropolis.log file was locked, requiring a restart of Matlab to restart estimation (see !1155 (merged)),

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

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 (see !1297 (merged)).


Estimation and calibrated smoother

When using
observation_trends
with theprefilter
option, the mean shift due to the trend was not accounted for (see !852 (closed)), 
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 (see !852 (closed)), 
The diffuse Kalman smoother was crashing if the forecast error variance matrix became singular (see 42ecfa38),

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

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


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 (see #338 (closed)), 
Forecasting with exogenous deterministic variables provided wrong decision rules, yielding wrong forecasts (see #711 (closed)),

Forecasting with exogenous deterministic variables crashed when the
periods
option was not explicitly specified (see !1325 (merged)), 
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 (see !692 (merged)).


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 (see !1238 (merged)),

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


Model comparison
 Selection of the
modifiedharmonicmean
estimator was broken (see !1015 (merged)).
 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 (see !767 (merged)),

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 (see !767 (merged)), 
Using only one (co)variance in the objective function resulted in crashes (see !767 (merged)),

For models with nonstationary variables the objective function was computed wrongly (see !767 (merged)).


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 (see #633 (closed)).

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 (see !696 (merged)),

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 (see !1241 (merged)),

The
planner_objective
acceptedvarexo
, but ignored them for computations,


Shock decomposition

Did not work with the
parameter_set=calibration
option if anestimated_params
block is present (link), 
Crashed after MLE (see !1220 (closed)).


Perfect foresight models

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

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 (see #617 (closed)),

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


Smoothing

The univariate Kalman smoother returned wrong results when used with correlated measurement error (see !1235 (closed)),

The diffuse smoother sometimes returned linear combinations of the smoothed stochastic trend estimates instead of the original trend estimates (see #1312 (closed)).


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 (see #841 (closed)), 
Displaying decision rules involving lags of auxiliary variables of type 0 (leads>1) crashed (see #1367 (closed)).

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


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

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
(see e3fbefc6). 
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 (see #1314 (closed)). 
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 (see !726 (merged)). 
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 (see 2ab8e2a1).

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