This page is frozen and has been moved to https://github.com/DynareTeam/dynare/wiki

This page documents new or previously undocumented features. It is mostly for internal use by Dynare developers. Users should rather read the Release Notes.

# New in Dynare unstable (to be released as 4.5)

Added command

`ramsey_model`that builds the expanded model with FOC conditions for the planner's problem but doesn't perform any computation. Usefull to compute Ramsey policy in a perfect foresight model.`ramsey_policy`accepts multipliers in its variable list and displays results for them (see issue #1355).- Changes for perfect foresight / determistic simulations:
New commands

`perfect_foresight_setup`(for preparing the simulation) and`perfect_foresight_solver`(for computing it)The old

`simul`command still exist and is now an alias for`perfect_foresight_setup`+`perfect_foresight_solver`It is no longer possible to manipulate by hand the contents of

`oo_.exo_simul`when using`simul`. People who want to do it must first call`perfect_foresight_setup`, then do the manipulations, then call`perfect_foresight_solver`

By default, the perfect foresight solver will try a homotopy method if it fails to converge at the first try. The old behavior can be restored with the

`no_homotopy`option`perfect_foresight_solver`: new`stack_solve_algo`-option`7`that allows specifying a`solve_algo`-solver for solving the model`perfect_foresight_solver`: new option`solve_algo`that allows specifying a solver for solving the model when using`stack_solve_algo=7`-option`7``perfect_foresight_solver`: new option`lmmcp`that solves the model via a Levenberg-Marquardt mixed complementarity problem (LMMCP) solver`perfect_foresight_solver`: new option`robust_lin_solve`that triggers the use of a robust linear solver for the default`solve_algo=4``perfect_foresight_solver`: new options`tolf`and`tolx`to control termination criteria of solver- Added the possibility to set the initial condition of the (stochastic) extended path simulations with the histval block
`osr`:`osr`saves the optimal value of parameters to`oo_.osr.optim_params``osr`: new block`osr_params_bounds`allows specifying bounds for estimated parameters`osr`: new option`opt_algo`allows selecting different optimizers while the new option`optim`allows specifying the optimizer options`osr`: the command now saves the names, bounds, and indices for the estimated parameters as well as the indices and weights of the variables entering the objective function into`M_.osr`The smoother and forecasts take uncertainty about trends and means into account (see issue #679)

Forecasts accounting for measurement error are now saved in fields of the form

`HPDinf_ME`and`HPDsup_ME`(see issue #853)New fields

`oo_.Smoother.Trend`and`oo_.Smoother.Constant`that save the trend and constant parts of the smoothed variables; new field`oo_.Smoother.TrendCoeffs`that stores the trend coefficientsNew estimation options:

`logdata`,`consider_all_endogenous`,`consider_only_observed`The

`conditional_variance_decomposition`-option of`estimation`now displays output and stores it as a LaTeX-table when the`TeX`-option is invokedNew method

`abs`to`dates`classNew methods

`cumprod`and`chain`to`dseries`classNew estimation option

`posterior_max_subsample_draws`(see issue #567)New estimation option

`mh_conf_sig`(see issue #598)New estimation option

`diffuse_kalman_tol`(see issue #865)New estimation option

`dirname`(see issue #910)`load_mh_file`and`mh_recover`now try to load chain's proposal density (see issue #1230)New estimation option

`load_results_after_load_mh`that allows loading some posterior results from a previous run if no new MCMC draws are added (see issue #1352)New estimation option

`posterior_nograph`that suppresses the generation of graphs associated with Bayesian IRFs, posterior smoothed objects, and posterior forecasts (see issue #1356)`estimation`save the posterior density at the mode in`oo_.posterior.optimization.log_density`The

`filter_covariance`-option now also works with posterior sampling like Metropolis-HastingsNew option

`endogenous_terminal_period`to`simul`New option

`tableRowIndent`to`addTable``steady`: The default solver for finding the steady state is now a trust-region solver (can be triggered explicitly with option`solve_algo=4`)`steady`: new options`tolf`and`tolx`to control termination criteria of solver- Reporting system revamped and made more efficient; dependency on matlab2tikz has been dropped
New option

`nodecomposition`to`estimation`and`stoch_simul`New options

`diffuse_filter`and`prior_trunc`to`identification`New option

`contemporaneous_correlation`that allows saving contemporaneous correlations in addition to the covariancesNew option

`no_posterior_kernel_density`to suppress computation of kernel density of posterior objectsNew

`stoch_simul`option`bandpass_filter`to compute bandpass-filtered theoretical and simulated momentsNew

`stoch_simul`option`one_sided_hp_filter`to compute one-sided HP-filtered simulated moments`stoch_simul`now displays a simulated variance decomposition when simulated moments are requested`stoch_simul`now saves skewness and kurtosis into respective fields of`oo_`when simulated moments have been requested (see issue #1155)`stoch_simul`now saves the unconditional variance decomposition in`oo_.variance_decomposition`New command blocks

`irf_calibration`and`moment_calibration`for sensitivity analysisNew command line option

`onlyclearglobals`New command line option

`params_derivs_order`allows limiting the order of the derivatives with respect to the parameters that are calculated by the preprocessorThe

`all_values_required`-option now also works with`histval`Recursive estimation and forecasting now provides the individual

`oo_`structures for each sample in`oo_recursive_`Can now pass a macro-variable to the

`@#include`macro directiveNew preprocessor flag

`-I`, macro directive`@#includepath`, and dynare config file block`[paths]`to pass a search path to the macroprocessor to be used for file inclusion via`@#include`New parallel option

`NumberOfThreadsPerJob`for Windows nodes that sets the number of threads assigned to each remote MATLAB/Octave run (see issue #1357)- Full compatibility with Matlab 2014b's new graphic interface
Improved numerical performance of

`schur_statespace_transformation`for very large models- Improved initial estimation checks
- Introduces new path management to avoid conflicts with other toolboxes
- Provides 64bit preprocessor
- New optimizers for the mode
`mode_compute=2`: Uses the simulated annealing as described by Corana et al. (1987)`mode_compute=101`: Uses SOLVEOPT as described by Kuntsevich and Kappel (1997)`mode_compute=102`: Uses`simulannealbnd`from Matlab's Global Optimization Toolbox

The

`trace_plot`command can now plot the posterior densityNew command

`generate_trace_plots`allows generating all trace plots for one chain (see issue #1239)New commands

`prior_function`and`posterior_function`that execute a user-defined function on parameter draws from the prior/posterior distribution (see issue #871)New option

`dr_display_tol`that governs omission of small terms in display of decision rulesNew option

`huge_number`for replacement of infinite bounds with large number during`mode_compute`New dynare option

`minimal_workspace`to use fewer variables in the current workspaceCommand

`conditional_forecast`now takes into account`histval`block if presentNew estimation option

`posterior_sampling_method`allows selecting the new posterior sampling options`tailored_random_block_metropolis_hastings`(Tailored randomized block (TaRB) Metropolis-Hastings)`slice`(Slice sampler)`independent_metropolis_hastings`(Independent Metropolis-Hastings)

New estimation option

`posterior_sampler_options`that allow controlling the options of the`posterior_sampling_method`its

`scale_file`-option pair allows loading the`_mh_scale.mat`-file storing the tuned scale factor from a previous run of`mode_compute=6`(see issue 1223)

New estimation option

`raftery_lewis_diagnostics`that computes Raftery/Lewis (1992) (link) convergence diagnosticsNew option

`silent_optimizer`to shut off output from mode computing/optimizationNew optimizer options

`verbosity`and`SaveFiles`to control output and saving of files during mode computing/optimizationThe

`use_calibration`to`estimated_params_init`now also works with MLNew command

`write_latex_original_model`New option

`write_equation_tags`to`write_latex_dynamic_model`that allows printing the specified equation tags to the generate LaTeX code (#477)New command

`write_latex_parameter_table`that writes the names and values of model parameters to a LaTeX tableNew command

`write_latex_prior_table`that writes the descriptive statistics about the prior distribution to a LaTeX tableNew command

`collect_latex_files`that creates one compilable LaTeX file containing all TeX-outputThe

`stoch_simul`-command now accepts the`TeX`option`stoch_simul`now prints the displayed tables as LaTeX code when the`TeX`-option is enabledThe

`dynare_sensitivity`-command now outputs LaTeX-tables if the`TeX`option is usedThe

`loglinear`-option now works with lagged and leaded exogenous variables like news shocks- The debugging mode now provides the termination values in steady state finding
Estimation now allows for rolling window forecasts by passing a vector to

`first_obs`The

`dsge_var`-option now saves results at the posterior mode into`oo_.dsge_var`New option

`relative_irf`to`irf_calibration`blockAdd missing

`horizon`option to`ms_forecast`New option

`fast_kalman_filter`that provides fast Kalman filter using Chandrasekhar recursions as described in Ed Herbst 2015 linkNew option

`smoothed_state_uncertainty`to provide the uncertainty estimate for the smoothed state estimate from the Kalman smoother #1324- New prior density: generalized Weibull distribution
`mh_recover`now allows continuing a crashed chain at the last save mh-fileBVAR now saves the marginal data density in

`oo_.bvar.log_marginal_data_density`and stores prior and posterior information in`oo_.bvar.prior`and`oo_.bvar.posterior`The

`calib_smoother`command now accepts the`loglinear, prefilter, first_obs`and`filter_decomposition`-optionsNew option

`spectral_density`to`stoch_simul`that allows displaying the spectral density of (filtered) endogenous variablesNew block

`shock_groups`for regrouping exogenous variables before running`shocks_decomposition`. See the manual.New option

`colormap`to`shocks_decomposition`for controlling the color map used in the shocks decomposition graphs.`shocks_decomposition`now accepts the`nograph`optionThe

`identification`-command now supports correlations via simulated momentsWhen using

`model(linear)`, Dynare automatically checks whether the model is truly linear`use_dll`: New command line option`mingw`to support the MinGW-w64 C/C++ Compiler from TDM-GCC for`use_dll`(see issue #1226)`use_dll`: the`msvc`-option now supports`normcdf`,`acosh, asinh`, and`atanh`(see issue #1259)New command

`realtime_shock_decomposition`that for each period`T = [presample,...,nobs]`allows computing therealtime historical shock decomposition

`Y(t|T)`, i.e. without observing data in`[T+1,...,nobs]`forecast shock decomposition

`Y(T+k|T)`realtime conditional shock decomposition

`Y(T+k|T+k)-Y(T+k|T)`

New command

`plot_shock_decomposition`that allows plotting the results from`shock_decomposition`and`realtime_shock_decomposition`for different vintages and shock groupingsNew block

`shock_groups`that allows grouping shocks for the`shock_decomposition`and`realtime_shock_decomposition`-commandsNew option

`nonlinear_filter_initialization`for the`estimation`command. Controls the initial covariance matrix of the state variables in nonlinear filters. Default value is 1, the initial covariance matrix is the unconditional covariance matrix of the reduced form solution of the model approximated at order one. If the model has unit roots, the user must set this option equal to 3, the initial covariance matrix is then an identity matrix.

# New in Dynare 4.4

Extended path at order > 0, aka Stochastic Extended Path

Alternative algorithms for computing decision rules of a stochastic model, based on the cycle reduction and logarithmic reduction algorithms; available with options

`dr`,`dr_cycle_reduction_tol`,`dr_logarithmic_reduction_tol`,`dr_logarithmic_reduction_maxiter`of`stoch_simul`- Pruning now works with 3rd order approximation
`@#ifndef`directive for macro processor (feature backported to Dynare 4.3.1)New macro processor operator:

`length`Possibility of specifying several graph format outputs as in

`stoch_simul(graph_format = (eps, pdf));`(feature backported to Dynare 4.3.1)Possibility of displaying but not saving graphs (by setting

`graph_format = none`)- Support for XLSX datafiles (feature backported to Dynare 4.3.1)
New option

`all_values_required`to`initval`and`endval`enforces initialization of endogs and exogs within the blockConsole mode implies

`nodisplay`optionNew command

`model_diagnostics`to perform various sanity checks on the model. With this new syntax, you shouldn't pass any argument to model_diagnostics (contrarily to the similar Matlab function that some of you may have already used).Option

`ar`can be given in the`estimation`commandComputation of conditional forecast using extended path method. In this case the

`expectation`command in the shock block has to be used to indicate the nature of expectation (`surprise`or`perfect_foresight`) and the options`simulation_type`has to be set equal to`deterministic`.New option

`nowarn`to suppress warningsThe deciles of some posterior moments were erroneously saved in a field

`Distribution`: this field is now called`deciles`, for consistency with other posterior moments and with the manual. Similarly, the fields`Mean`,`Median`,`HPDsup`,`HPDinf`, and`Variance`are now consistently capitalized to be consistent with the documentation.The information on MCMC acceptance rates, seeds, last log posterior likelihood, and last parameter draw are now saved on disk and accessible with the

`internals`command- MCMC diagnostics now also display inefficiency factors
New option

`endogenous_prior`to`estimation`commandAutomatic detrending engine extended to work on models written in logs (see RemovingTrends)

- Estimation with CSV datafiles
New option

`differentiate_forward_vars`New options

`mode_check_neighbourhood_size`,`mode_check_symmetric_plots`and`mode_check_number_of_points`New option

`parallel_local_files`of`model`block, for transferring extra files during parallel computationsNew option

`clock`of`set_dynare_seed`Possibility of creating PDF reports from CSV datafiles and

`dynSeries`New option

`qz_zero_threshold`New command line options:

`nograph`,`nointeractive`,`nostrict`New

`verbatim`block for inclusion of text that should pass through the preprocessor and be placed in the`modfile.m`file- Geweke (1992) convergence diagnostics for single chain MCMC
New optimizer for the mode (

`mode_compute=10`): Uses the simpsa algorithm, based on the combination of the non-linear simplex and simulated annealing algorithms and proposed by Cardoso, Salcedo and Feyo de Azevedo (1996)New option

`mcmc_jumping_covariance`to`estimation`New option

`use_calibration`to`estimated_params_init`New option

`save_draws`to`ms_simulation`New option

`irf_plot_threshold`to`stoch_simul`and`estimation`New option

`long_name`for endogenous, exogenous and parameter declarations

# New in Dynare 4.3

Particle filter triggered with

`order=2`in`estimation`- Support for Markov-Switching SBVARs, along the lines of Sims, Waggoner and Zha (2008) (see the dedicated section in the reference manual)
- Extended path
New command for computing optimal policy under discretion:

`discretionary_policy`New command for identification analysis:

`identification`Stochastic simulation and estimation can benefit from block decomposition (with the

`block`option, only at 1st order)- Global Sensitivity Analysis toolbox now part of official Dynare distribution
New command for computing smoother/filter on calibrated model:

`calib_smoother`The default algorithm for deterministic simulations (available under

`stack_solve_algo=0`) has changed and is faster than the former algorithm (LBJ) (which is still available under`stack_solve_algo=6`)New option

`analytic_derivation`for`estimation`command: currently it works only for stationary models without missing observations;ParallelDynare: possibility of assigning different weights to nodes in the cluster and creating clusters comprised of nodes with different operating systems

Possibility of globally altering the defaults of options by providing a file in the GlobalInitFile field of the configuration file

Dynare++: new option

`--burn`to discard initial simulation pointsNew option

`IRF_SHOCKS`to allow irfs to be created only for certain exogenous variables- New optimizers for the mode:
`mode_compute=8`. This is a Dynare implementation of the Nelder-Mead simplex based optimization routine (generally more efficient than the MATLAB or Octave implementation available with`mode_compute=7`)`mode_compute=9`: CMA Evolution Strategy algorithm

- Behavior with respect to graphs has changed:
- By default, Dynare displays graphs and saves them to disk in EPS format only
Format can be changed to PDF or FIG with the new

`graph_format`optionIt is possible to save graphs to disk without displaying them with the new

`nodisplay`option

`unit_root_vars`is now obsolete; use`diffuse_filter`option of`estimation`insteadNew option

`nocheck`to`steady`: tells not to check the steady state and accept values given by the user, useful for models with unit roots`ramsey_policy`now displays the planner objective value function under Ramsey policy and stores it in`oo_.planner_objective_value`(not fully working yet)New option value

`parameter_set=calibration`to the`conditional_forecast`option: to be used for calibrated models (previously, conditional forecast was only possible for estimated models)Theoretical autocovariances are now computed when

`block`option is presentThe

`linear`option is now compatible with`block`and`bytecode`optionsNew primitives allowed in model block:

`abs()`,`sign()``use_dll`now creates a mex file for the static model in addition to that for the dynamic modelNew option

`maxit`in simul and steady commands to determines the maximum number of iterations of the non-linear solver. The default value of maxit is 10. The`maxit`option is shared with the`simul`and`steady`commands. So a change in`maxit`option will be considered in both`simul`and`steady`commands.New top-level MATLAB/Octave command

`internals`for internal documentation and unitary tests`steady_state_model`lets you redefine a parameter`shocks`: a series of deterministic shocks can be passed as a pre-defined vector in the`values`sub-commandNew option

`sub_draws`in estimation for controlling the number of draws used in computing the posterior distributions of various objectsNew macroprocessor command:

`@#ifdef`Macro variables can be defined on the dynare command line with the

`-D`option`loglinear`option works with purely backward or forward models at order 1New option

`homotopy_force_continue`for steadyNew preprocessor option

`nolog`to tell Dynare not to create a logfile- New solvers for Lyapunov and Sylvester equations

# New in Dynare 4.2

- New solution algorithms:
Pruning for second order simulations has been added, as described in Kim, Kim, Schaumburg and Sims (JEDC, 2008). It is triggered by option

`pruning`of`stoch_simul`(only 2nd order, not available at 3rd order)Models under PartialInformation can be solved, as in Pearlman, Currie and Levine (Economic Modeling, 1986)

New nonlinear solvers for FastDeterministicSimulationAndSteadyStateComputation

Dynare can now use the power of multi-core computers or of a cluster of computer using parallelization. See ParallelDynare for the list of tasks which can be parallelized and for configuration instructions

- New features in the user interface:
A steady state file can now be automatically generated, provided that the model can be solved analytically, and that the steady state as a function of the parameters is declared with the

`steady_state_model`command (see the entry in the reference manual for more details and an example)For non-stationary models, Dynare is now able of automatically RemovingTrends in all the equations: the user writes the equations in non-stationary form and declares the deflator of each variable. Then Dynare perform a check to determine if the proposed deflators are compatible with balanced growth path, and, if yes, then it computes the detrended equations

It is now possible to use arbitrary functions in the model block: see ExternalFunctions

- Other minor changes to the user interface:
New primitives allowed in model block:

`normpdf()`,`erf()`New syntax for DsgeVar

Syntax of deterministic shocks has changed: after the

`values`keyword, arbitrary expressions must be enclosed within parentheses (but numeric constants are still accepted as is)

- Various improvements:
- Third order simulations now work without the USE_DLL option: installing a C++ compiler is no longer necessary for 3rd order
- The HP filter works for empirical moments (previously it was only available for theoretical moments)
Estimation: if the

`selected_variables_only`option is present, then the smoother will only be run on variables listed just after the`estimation`commandEstimation: in the

`shocks`block, it is now possible to calibrate measurement errors on endogenous variables (using the same keywords than for calibrating variance/covariance matrix of exogenous shocks)It is possibile to choose the parameter set for ShockDecomposition

- The diffuse filter now works under Octave
New option

`console`on the Dynare command-line: use it when running Dynare from the console, it will replace graphical waitbars by text waitbars for long computationsSteady option

`solve_algo=0`(uses fsolve()) now works under Octave

- For Emacs users:
- New Dynare mode for Emacs editor (contributed by Yannick Kalantzis)
- Reference manual now available in Info format (distributed with Debian/Ubuntu packages)

- Miscellaneous:
Deterministic models: leads and lags of two or more on endogenous variables are now substituted by AuxiliaryVariables; exogenous variables are left as is

# New in Dynare 4.1

Dynare now accepts leads and lags on exogenous variables (internally it uses AuxiliaryVariables for that purpose)

Dynare can now compute third order approximations with

`stoch_simul(order=3)`. Note that you need to ConfigureMatlabWindowsForMexCompilation in order to be able to use that option; under Linux with Octave, you need to install utilities for compiling MEX files (under Ubuntu or Debian, in a package called`octave3.2-headers`).- Dynare++ is now distributed along with Dynare
- Dynare can now handle missing observations in estimation
- New operators in model equations:
steady state operator:

`STEADY_STATE(EXPRESSION)`. This operator is used to take the value of the enclosed expression at the steady state. A typical usage is in the Taylor rule, where you may want to use the value of GDP at steady state to compute the output gapexpectation operator:

`EXPECTATION(INTEGER)(EXPRESSION)`. This operator is used to take the expectation of some expression using a different information set than the information available at current period. For example,`EXPECTATION(-1)(x(+1))`is equal to the expected value of variable`x`at next period, using the information set available at the previous period. In practice, Dynare solves this by creating an AuxiliaryVariables equal to`AUX = x(+2)`, and by replacing the expectation operator by`AUX(-1)`. Note that a value of`0`for the time shift component is reserved for partial information models (not yet fully implemented).

The type of a symbol can now be changed after the symbol declaration. In the following example,

`alpha`will be considered as a parameter, and`beta`as an endogenous.

var alpha; parameters beta; ... change_type(parameters) alpha; change_type(var) beta;

Note that the type (parameters, var or varexo) change applies to the *whole* MOD file. This command is mainly useful when symbol declarations are taken from an included file, and you want to change the types of some variables (for example for "variable flipping"). This feature should not be used for dynamic simulations.

The macro-language accepts a new operator

`in`, which tests memberships of an element inside an array. In the following example, the body of the`if`statement will be evaluated:

@#define x = [ 1 3 5 ] @#if 3 in x ... @#endif

- The Dynare command line accepts three new options:
`onlymacro`: only do the macro-processing step and stop there`nolinemacro`: do not include original line numbers in the macro-expanded MOD file`savemacro=filename`: save the macro-expanded file in`filename`(if no filename is specified, a default value is computed: it is obtained by adding`-macroexp`to the name of the MOD file)

Possibility of using the Anderson-Moore Algorithm (AIM) to compute the decision rules, instead of using Dynare's default method based on a generalized Schur decomposition. Use option

`aim_solver`in`stoch_simul`or`estimation`. This option is only valid for first order approximation.

# New in Dynare 4.0

## Preprocessor

- Macro-processing of mod files

## Dynare functions

HomoTopy (using homotopy type methods to compute the steady state)

MonteCarloOptimization (using a Metropolis Hastings to get an estimate of the posterior mode and a good covariance matrix for the jumping distribution)

ConditionalForecast (how to condition the future path of a subset of endogenous variables).