⇤ ← Revision 1 as of 2008-02-07 21:48:04
Size: 1789
Comment:
|
Size: 2115
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
Here is the syntax for a future homotopy mechanism for steady state computation | Here is the syntax of the new homotopy mechanism for steady state computation. |
Line 6: | Line 6: |
Two new ptions in {{{steady}}} command: * homotopy_mode = 1,2 or 3 (see below) * homotopy_steps = Integer (sets the number of steps used in the homotopy procedure) |
The corresponding options in {{{steady}}} command are: * {{{homotopy_mode = 1,2 or 3}}} (see below) * {{{homotopy_steps = Integer}}} (sets the number of steps used in the homotopy procedure) |
Line 12: | Line 12: |
Each line of this block has the form | Each line of this block has the form: |
Line 19: | Line 19: |
Example | Example: |
Line 29: | Line 29: |
===== Homotopy mode 1 ===== In this mode, the distance between the boudaries for each parameter are divided in as many intervals as there are steps and the problem is solved as many time |
Note that parameters and exogenous that are declared in {{{homotopy_setup}}} need not be initialized elsewhere (parameters need not be set elsewhere, and exogenous need not be declared in {{{initval}}} block). |
Line 32: | Line 31: |
===== Homotopy mode 2 ===== Same as above, but only one parameter is changed at a time. The problem is solved nbr of parameters time nbr of steps times |
== Homotopy mode 1 == In this mode, the distance between the boudaries for each parameter is divided in as many intervals as there are steps and the problem is solved as many times. |
Line 35: | Line 34: |
===== Homotopy mode 3 ===== Dynare tries first the most extreme values, if it fails to compute the steady state, the interval between initial and desired values is divided by two for each parameters. Every time, that it is impossible to find a steady state, the previous interval is divided by two. When one succeed to find an steady state, the previous interval is multiplied by two. In that last case {{{homotopy_steps}}} contains the maximum number of computations attempted before giving up. |
== Homotopy mode 2 == Same as above, but only one parameter/exogenous is changed at a time. Variables are processed in the order of their declaration in {{{homotopy_setup}}}. The problem is solved nbr of parameters/exogenous times nbr of steps times. == Homotopy mode 3 == Dynare tries first the most extreme values. If it fails to compute the steady state, the interval between initial and desired values is divided by two for each parameter. Every time that it is impossible to find a steady state, the previous interval is divided by two. When one succeed to find a steady state, the previous interval is multiplied by two. In that last case {{{homotopy_steps}}} contains the maximum number of computations attempted before giving up. |
Homotopy
Here is the syntax of the new homotopy mechanism for steady state computation.
The corresponding options in steady command are:
homotopy_mode = 1,2 or 3 (see below)
homotopy_steps = Integer (sets the number of steps used in the homotopy procedure)
Parameters or exogenous variables (in deterministic models) for which we need to change values are declared in a homotopy_setup block.
Each line of this block has the form:
name , expresssion 1, expression 2
expression 1 must return the initial value (for which it is easy to compute the steady state)
expression 2 must return the desired value for the parameter or exogenous variables.
Example:
steady(homotopy_mode=1,homotopy_steps=3); homotopy_setup; alpha, 0.3, 0.3^2; psi, 0.05, 2*0.5; end;
Note that parameters and exogenous that are declared in homotopy_setup need not be initialized elsewhere (parameters need not be set elsewhere, and exogenous need not be declared in initval block).
Homotopy mode 1
In this mode, the distance between the boudaries for each parameter is divided in as many intervals as there are steps and the problem is solved as many times.
Homotopy mode 2
Same as above, but only one parameter/exogenous is changed at a time. Variables are processed in the order of their declaration in homotopy_setup. The problem is solved nbr of parameters/exogenous times nbr of steps times.
Homotopy mode 3
Dynare tries first the most extreme values. If it fails to compute the steady state, the interval between initial and desired values is divided by two for each parameter. Every time that it is impossible to find a steady state, the previous interval is divided by two. When one succeed to find a steady state, the previous interval is multiplied by two. In that last case homotopy_steps contains the maximum number of computations attempted before giving up.