Commit e0952b3f authored by MichelJuillard's avatar MichelJuillard
Browse files

manual: adding option lmmcp to extend_path command

parent 5e36b688
Pipeline #5331 passed with stages
in 110 minutes and 18 seconds
......@@ -4307,6 +4307,61 @@ which is described below.
to correct the paths generated by the (stochastic) extended
path algorithm.
.. option:: lmmcp
Solves the perfect foresight model with a Levenberg-Marquardt
mixed complementarity problem (LMMCP) solver (*Kanzow and Petra
(2004)*), which allows to consider inequality constraints on
the endogenous variables (such as a ZLB on the nominal interest
rate or a model with irreversible investment).
Using the LMMCP solver requires a particular
model setup as the goal is to get rid of any min/max operators
and complementary slackness conditions that might introduce a
singularity into the Jacobian. This is done by attaching an
equation tag (see :ref:`model-decl`) with the ``mcp`` keyword
to affected equations. This tag states that the equation to
which the tag is attached has to hold unless the expression
within the tag is binding. For instance, a ZLB on the nominal
interest rate would be specified as follows in the model
block::
model;
...
[mcp = 'r > -1.94478']
r = rho*r(-1) + (1-rho)*(gpi*Infl+gy*YGap) + e;
...
end;
where ``1.94478`` is the steady state level of the nominal
interest rate and ``r`` is the nominal interest rate in
deviation from the steady state. This construct implies that
the Taylor rule is operative, unless the implied interest rate
``r<=-1.94478``, in which case the ``r`` is fixed at
``-1.94478`` (thereby being equivalent to a complementary
slackness condition). By restricting the value of ``r`` coming
out of this equation, the ``mcp`` tag also avoids using
``max(r,-1.94478)`` for other occurrences of ``r`` in the rest
of the model. It is important to keep in mind that, because the
``mcp`` tag effectively replaces a complementary slackness
condition, it cannot be simply attached to any
equation. Rather, it must be attached to the correct affected
equation as otherwise the solver will solve a different problem
than originally intended. Also, since the problem to be solved
is nonlinear, the sign of the residuals of the dynamic equation
matters. In the previous example, for the nominal interest rate
rule, if the LHS and RHS are reversed the sign of the residuals
(the difference between the LHS and the RHS) will change and it
may happen that solver fails to identify the solution path. More
generally, convergence of the nonlinear solver is not guaranteed
when using mathematically equivalent representations of the same
equation.
Note that in the current implementation, the content of the
``mcp`` equation tag is not parsed by the preprocessor. The
inequalities must therefore be as simple as possible: an
endogenous variable, followed by a relational operator,
followed by a number (not a variable, parameter or expression).
Typology and ordering of variables
----------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment