[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When the framework is deterministic, Dynare can be used for models
with the assumption of perfect foresight. Typically, the system is
supposed to be in a state of equilibrium before a period ‘1’ when
the news of a contemporaneous or of a future shock is learned by the
agents in the model. The purpose of the simulation is to describe the
reaction in anticipation of, then in reaction to the shock, until the
system returns to the old or to a new state of equilibrium. In most
models, this return to equilibrium is only an asymptotic phenomenon,
which one must approximate by an horizon of simulation far enough in
the future. Another exercise for which Dynare is well suited is to
study the transition path to a new equilibrium following a permanent
shock. For deterministic simulations, the numerical problem consists of solving
a nonlinar system of simultaneous equations in n
endogenous
variables in T
periods. Dynare offers several algorithms for
solving this problem, which can be chosen via the
stack_solve_algo
-option. By default (stack_solve_algo=0
),
Dynare uses a Newton-type method to solve the simultaneous equation
system. Because the resulting Jacobian is in the order of n
by
T
and hence will be very large for long simulations with many
variables, Dynare makes use of the sparse matrix capacities of
MATLAB/Octave. A slower but potentially less memory consuming alternative
(stack_solve_algo=6
) is based on a Newton-type algorithm first
proposed by Laffargue (1990) and Boucekkine (1995), which
uses relaxation techniques. Thereby, the algorithm avoids ever storing
the full Jacobian. The details of the algorithm can be found in
Juillard (1996). The third type of algorithms makes use of block
decomposition techniques (divide-and-conquer methods) that exploit the
structure of the model. The principle is to identify recursive and
simultaneous blocks in the model structure and use this information to
aid the solution process. These solution algorithms can provide a
significant speed-up on large models.
Description
Triggers the computation of a deterministic simulation of the model
for the number of periods set in the option periods
.
Options
periods = INTEGER
Number of periods of the simulation
maxit = INTEGER
Determines the maximum number of iterations used in the non-linear solver.
The default value of maxit
is 10. The maxit
option is shared with the
steady
command. So a change in maxit
in a simul
command will
also be considered in the following steady
commands.
stack_solve_algo = INTEGER
Algorithm used for computing the solution. Possible values are:
0
Newton method to solve simultaneously all the equations for every period, using sparse matrices (Default).
1
Use a Newton algorithm with a sparse LU solver at each iteration
(requires bytecode
and/or block
option, see section Model declaration).
2
Use a Newton algorithm with a Generalized Minimal Residual (GMRES)
solver at each iteration (requires bytecode
and/or block
option, see section Model declaration; not available under Octave)
3
Use a Newton algorithm with a Stabilized Bi-Conjugate Gradient
(BICGSTAB) solver at each iteration (requires bytecode
and/or
block
option, see section Model declaration).
4
Use a Newton algorithm with a optimal path length at each iteration
(requires bytecode
and/or block
option, see section Model declaration).
5
Use a Newton algorithm with a sparse Gaussian elimination (SPE) solver
at each iteration (requires bytecode
option, see section Model declaration).
6
Use the historical algorithm proposed in Juillard (1996): it is
slower than stack_solve_algo=0
, but may be less memory consuming
on big models (not available with bytecode
and/or block
options).
markowitz = DOUBLE
Value of the Markowitz criterion, used to select the pivot. Only used
when stack_solve_algo = 5
. Default: 0.5
.
minimal_solving_periods = INTEGER
Specify the minimal number of periods where the model has to be
solved, before using a constant set of operations for the remaining
periods. Only used when stack_solve_algo = 5
. Default: 1
.
datafile = FILENAME
If the variables of the model are not constant over time, their initial values, stored in a text file, could be loaded, using that option, as initial values before a deterministic simulation.
Output
The simulated endogenous variables are available in global matrix
oo_.endo_simul
.
This variable stores the result of a deterministic simulation
(computed by simul
) or of a stochastic simulation (computed by
stoch_simul
with the periods
option or by
extended_path
).
The variables are arranged row by row, in order of declaration (as in
M_.endo_names
). Note that this variable also contains initial
and terminal conditions, so it has more columns than the value of
periods
option.
This variable stores the path of exogenous variables during a
simulation (computed by simul
, stoch_simul
or
extended_path
).
The variables are arranged in columns, in order of declaration (as in
M_.endo_names
). Periods are in rows. Note that this convention
regarding columns and rows is the opposite of the convention for
oo_.endo_simul
!
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by Build Daemon user on November 12, 2014 using texi2html 1.82.