Concentration Constraints

A form of your own for a ConcentrationLimit implements the verb below on the space below. The private page documents the other names of this topic.

PortfolioOptimisers.ConcentrationMIPSpace — Type
struct ConcentrationMIPSpace{__T_cl, __T_i} <: AbstractMIPSpace

MIP space of the positions of one concentration rule.

mip_wx! gives the positions $\boldsymbol{x}$ of the rule, and mip_key writes each key as conc_<name>_i under prefix, so two rules and two blocks do not collide. declare_mip_gate! declares the binary "the position is over t" in this space. The binary is not the held bit of HeldIndicators, because "held" and "over t" are two facts, so the space registers no bundle in Model State and mip_indicators still returns the asset bundle. The space has no method of mip_bounds, because the rule states its cap on the positions.

The positions are the rows of cl.set times the reading cl.pos of the weights, see concentration_positions and position_reading. The first block that admits a short position makes the shared parts lw and sw, see set_weight_parts!, and a RiskBudgeting head declares them itself. When the model has no shared short part, a block on the weights is long-only, and the library reads the weights as their own long part. So every reading is w there. A block after a long-only block can make parts of its own for its budgets, see weight_parts!. The rule does not read them, because the long-only block already gives the reading w.

Fields

  • cl: The resolved rule.
  • i: Index of the rule in the slot, used in key naming.
  • prefix::Symbol: Model State namespace of the block. The weights are read under it.

Related

source
PortfolioOptimisers.set_concentration_rows! — Function
set_concentration_rows!(model::JuMP.Model, alg::ExactConcentration,
                        sp::ConcentrationMIPSpace, x::AbstractVector,
                        wb::WeightBounds, ss::Option{<:Number})
set_concentration_rows!(model::JuMP.Model, alg::SumLargestConcentration,
                        sp::ConcentrationMIPSpace, x::AbstractVector, wb, ss)

Add the rows of one concentration rule in the form alg.

JuMP formulation

Variables

The exact form:

  • conc_z_i: $M \times 1$, binary. $z_j = 1$ says that position $j$ is over $t$.
  • conc_g_i: $M \times 1$, $\geq 0$, when $k$ is a variable. It is the gate $k\, z_j$.
  • conc_y_i: $M \times 1$, $\geq 0$. The part of each position that counts towards the sum.

The linear form:

  • conc_u_i: scalar, $\geq 0$.
  • conc_v_i: $M \times 1$, $\geq 0$.

Constraints

The exact form, with the gate $\boldsymbol{g} = k\, \boldsymbol{z}$ and the rows of declare_mip_gate!:

  • conc_cap_i: $s_c \left(\boldsymbol{x} - t k - (c - t)\, \boldsymbol{g}\right) \leq 0$.
  • conc_ylb_i: $s_c \left(\boldsymbol{y} - \boldsymbol{x} + c k - c\, \boldsymbol{g}\right) \geq 0$.
  • conc_sum_i: $s_c \left(\sum_j y_j - s k\right) \leq 0$.

The linear form, SumLargestConcentration, with $n$ from sum_largest_count:

  • conc_cap_i: $s_c \left(\boldsymbol{x} - c k\right) \leq 0$.
  • conc_vlb_i: $s_c \left(\boldsymbol{v} - \boldsymbol{x} + u\right) \geq 0$.
  • conc_sum_i: $s_c \left(n u + \sum_j v_j - s k\right) \leq 0$.

The minimum of $n u + \sum_j \max(x_j - u, 0)$ over $u \geq 0$ is the sum of the $n$ largest positive parts of $\boldsymbol{x}$, so the last row bounds that sum. The bound $u \geq 0$ makes a negative position add nothing.

Where:

  • $s_c$: Constraint scale. It multiplies both sides of a row, so a positive value leaves the feasible set unchanged.
  • $\boldsymbol{x}$: The positions conc_x_i, $M \times 1$.
  • $k$: Variable that scales the budget in the homogenised problem.
  • $t$, $c$, $s$: The threshold, the cap and the limit of the sum of cl.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • alg: The form of the rule.
  • sp: The space of the rule. sp.cl is the rule, and mip_key names the model keys.
  • x: The positions of the rule.
  • wb: The weight bounds of the block.
  • ss::Option{<:Number}: Big-M scaling constant (computed via get_mip_ss when nothing).

Returns

  • nothing.

Related

source