Update Auxiliary variables authored by Normann Rion's avatar Normann Rion
......@@ -108,3 +108,40 @@ This kind of aux var has `M_.aux_vars(i).type = 12` accounts for applying the `p
## Type 13: `pac_target_nonstationary` operator (since Dynare 5)
This kind of aux var has `M_.aux_vars(i).type = 13` accounts for applying the `pac_target_nonstationary`-operator to a `pac_model`.
Here is a proposed addition to the Dynare auxiliary variables wiki, describing **Type 15: Heterogeneous Multipliers** in the same style and level of detail as the other types:
## Type 15: Heterogeneous model multipliers (since Dynare 7)
This kind of auxiliary variable has `M_.aux_vars(i).type = 15` and is introduced to represent Lagrange multipliers associated with complementarity constraints in heterogeneous-agent models. These arise when an agent's decision is constrained by inequality bounds, such as borrowing constraints, portfolio limits, or non-negativity requirements.
When a policy variable `x` is subject to bounds `x ∈ [x_min, x_max]`, Dynare unfolds the complementarity condition into a pair of auxiliary variables and equations:
* `MULT_L_x`: the Lagrange multiplier associated with the lower bound `x ≥ x_min`,
* `MULT_U_x`: the Lagrange multiplier associated with the upper bound `x ≤ x_max`,
Dynare adds two residual equations, one for each side of the bound:
* `MULT_L_x · (x − x_min) = 0` (lower bound),
* `MULT_U_x · (x_max − x) = 0` (upper bound),
ensuring that at most one of the two is active in equilibrium, and that complementarity slackness is satisfied:
* if the bound is not binding, the multiplier is zero;
* if the multiplier is strictly positive, the bound is tight.
These multipliers are automatically inserted into the **first-order conditions** of the agent's problem. For instance, an Euler equation might become:
```
u′(cₜ) = β · (1 + rₜ₊₁) · u′(cₜ₊₁) − MULT_L_a + MULT_U_a
```
where both the lower and upper multipliers appear with appropriate signs.
* `M_.aux_vars(i).endo_index` gives the position of the multiplier in `M_.endo_names`.
* `M_.aux_vars(i).eq_nbr` gives the index of the equation where the complementarity condition applies.
For example, suppose a household chooses `aₜ₊₁ ∈ [a_min, a_max]`. The preprocessor introduces:
* `MULT_L_a` and the residual `MULT_L_a · (aₜ₊₁ − a_min) = 0`,
* `MULT_U_a` and the residual `MULT_U_a · (a_max − aₜ₊₁) = 0`,
* and adjusts the Euler equation to include `−MULT_L_a + MULT_U_a`.
\ No newline at end of file