Variance Skew Kurtosis Constraints

PortfolioOptimisers.set_risk_constraints! — Method
set_risk_constraints!(
    model::Model,
    i,
    r::VarianceSkewKurtosis,
    opt::Union{AbstractProgrammeAllocationSet, RiskJuMPOptimisationEstimator},
    pr::AbstractPriorResult,
    args...;
    prefix,
    kwargs...
) -> Any

Add the semidefinite relaxation of a VarianceSkewKurtosis to the model, and return its risk expression.

The model is Problem 12 of [219], with the budget homogenised by $k$. One positive semidefinite block, Equation 11 of that work, lifts the products of the weights into the matrices $\mathbf{W}_1$, $\mathbf{W}_2$ and $\mathbf{W}_3$, and each moment becomes a trace that is affine in a block. The block is built once for each namespace, so two measures of one model share it.

Any prior result is accepted. Both tensors must resolve, on their child or on the prior, and assert_high_order_quantity refuses the measure when either resolves on neither. The three vectorisation matrices come from dup_elim_sum_selector, so a container whose sk and kt children hold their own tensors builds against a LowOrderPrior, which carries the sigma that the third child needs.

Algorithm

  1. Check that r.sk.sk or pr holds a coskewness matrix, and that r.kt.kt or pr holds a cokurtosis matrix, with assert_high_order_quantity.
  2. Read w, the weights, sc, the constraint scale, and k, the homogenisation variable.
  3. Select sigma, sk and kt, the matrix of each child, else the matrix of the prior.
  4. Read D2, L2 and S2 for the N assets with dup_elim_sum_selector.
  5. Build W1, W2, W3, L2W1 and the block M once for the namespace, and register the cone row below.
  6. Register vr_risk, sk_risk and kt_risk, the three traces.
  7. Compute the bound of each term with variance_risk_bounds_val. The bound of kt is the square of kt.settings.ub under SOCRiskExpr, because that ub is in the units of $\sqrt{m_4}$.
  8. Bound each term with set_variance_risk_bounds_and_expression!. The skewness bound is a floor, so its row has the opposite sign. The children hold rke = false, so no term enters risk_vec alone. Record r.vr, r.sk and r.kt as the owners of the frontier entries of their terms with set_risk_frontier_owner!, so that a sweep on a term takes its span from that term. expected_risk values r.sk as the third moment of the coskewness matrix, the units of sk.settings.lb, because that is the value of the functor of Skewness.
  9. Register vr_sk_kt_risk, the weighted sum, bound it and add it to risk_vec with set_risk_bounds_and_expression!, and return it.

JuMP formulation

Variables

  • w: read, $\boldsymbol{w}$.
  • k: read, $k$.
  • W1_vr_sk_kt: created, the symmetric $N \times N$ block $\mathbf{W}_1$, which stands for $\boldsymbol{w} \boldsymbol{w}^\intercal / k$.
  • W2_vr_sk_kt: created, the $M \times N$ block $\mathbf{W}_2$, which stands for $\mathbf{L}_2 (\boldsymbol{w} \otimes \boldsymbol{w}) \boldsymbol{w}^\intercal / k^2$.
  • W3_vr_sk_kt: created, the symmetric $M \times M$ block $\mathbf{W}_3$, which stands for $\mathbf{L}_2 (\boldsymbol{w} \otimes \boldsymbol{w}) (\boldsymbol{w} \otimes \boldsymbol{w})^\intercal \mathbf{L}_2^\intercal / k^3$.

Expressions

  • L2W1_vr_sk_kt: $\mathbf{L}_2 \mathrm{vec}(\mathbf{W}_1)$.
  • M_vr_sk_kt: the block matrix $\mathbf{M}$ below.
  • vr_risk_: $\mathrm{Tr}(\mathbf{\Sigma} \mathbf{W}_1)$.
  • sk_risk_: $\mathrm{Tr}(\mathbf{M}_3 \mathbf{D}_2 \mathbf{W}_2)$.
  • kt_risk_: $\mathrm{Tr}(\mathbf{S}_2 \mathbf{K} \mathbf{S}_2^\intercal \mathbf{W}_3)$.
  • vr_sk_kt_risk_: $s_{\sigma^2} \mathrm{Tr}(\mathbf{\Sigma} \mathbf{W}_1) - s_{\mathrm{sk}} \mathrm{Tr}(\mathbf{M}_3 \mathbf{D}_2 \mathbf{W}_2) + s_{\kappa} \mathrm{Tr}(\mathbf{S}_2 \mathbf{K} \mathbf{S}_2^\intercal \mathbf{W}_3)$.

\[\begin{align} \mathbf{M} &= \begin{bmatrix} k & \boldsymbol{w}^\intercal & \left(\mathbf{L}_2 \mathrm{vec}(\mathbf{W}_1)\right)^\intercal \\ \boldsymbol{w} & \mathbf{W}_1 & \mathbf{W}_2^\intercal \\ \mathbf{L}_2 \mathrm{vec}(\mathbf{W}_1) & \mathbf{W}_2 & \mathbf{W}_3 \end{bmatrix}\,. \end{align}\]

Constraints

  • M_vr_sk_kt_PSD: $s_c \mathbf{M} \succeq 0$.
  • vr_risk_<i>_ub: $s_c \left(\mathrm{Tr}(\mathbf{\Sigma} \mathbf{W}_1) - u_{\sigma^2} k\right) / |u_{\sigma^2}| \leq 0$, when vr.settings.ub is a number.
  • sk_risk_<i>_ub: $-s_c \left(\mathrm{Tr}(\mathbf{M}_3 \mathbf{D}_2 \mathbf{W}_2) - l_{\mathrm{sk}} k\right) / |l_{\mathrm{sk}}| \leq 0$, when sk.settings.lb is a number.
  • kt_risk_<i>_ub: $s_c \left(\mathrm{Tr}(\mathbf{S}_2 \mathbf{K} \mathbf{S}_2^\intercal \mathbf{W}_3) - u_{\kappa} k\right) / |u_{\kappa}| \leq 0$, when kt.settings.ub is a number.
  • vr_sk_kt_risk_<i>_ub: the bound of settings.ub on vr_sk_kt_risk_, from set_risk_bounds_and_expression!.

set_risk_upper_bound! registers the four bound rows. It divides each row by the bound_scale of its bound, the absolute value of the bound, or one for a zero bound, so the trace of the cokurtosis keeps coefficients of order one. A frontier in a bound replaces its row with the frontier variable of that function. Each name except those of the block carries the index i of the measure, and every name carries the namespace prefix.

Where:

  • $\boldsymbol{w}$: Portfolio weights vector $N \times 1$.
  • $k$: Variable that scales the budget in the homogenised problem.
  • $s_c$: Constraint scale. It multiplies both sides of a row, so a positive value leaves the feasible set unchanged.
  • $M = N(N+1)/2$: Number of entries on and below the diagonal of an $N \times N$ matrix.
  • $\mathbf{\Sigma}$: Covariance matrix of the risk measure, $N \times N$. It is the measure's own matrix when the measure states one, and the prior's otherwise.
  • $\mathbf{M}_3$: Coskewness matrix of the risk measure, $N \times N^2$. It is the measure's own sk when the measure states one, and the prior's otherwise.
  • $\mathbf{K}$: Cokurtosis matrix of the risk measure, $N^2 \times N^2$. It is the measure's own kt when the measure states one, and the prior's otherwise.
  • $\mathbf{D}_2$: Duplication matrix, $N^2 \times N(N+1)/2$. For a symmetric $\mathbf{A}$, $\mathbf{D}_2 \mathbf{L}_2 \mathrm{vec}(\mathbf{A}) = \mathrm{vec}(\mathbf{A})$.
  • $\mathbf{L}_2$: Elimination matrix, $N(N+1)/2 \times N^2$, which dup_elim_sum_matrices builds. $\mathbf{L}_2 \mathrm{vec}(\mathbf{A})$ holds the entries on and below the diagonal of $\mathbf{A}$, column by column.
  • $\mathbf{S}_2$: Summation matrix, $N(N+1)/2 \times N^2$, which dup_elim_sum_matrices builds. For a symmetric $\mathbf{A}$, $\mathbf{S}_2 \mathrm{vec}(\mathbf{A})$ holds each entry on and below the diagonal of $\mathbf{A}$, times the number of times it occurs in $\mathbf{A}$.
  • $s_{\sigma^2}$, $s_{\mathrm{sk}}$, $s_{\kappa}$: The settings.scale of vr, sk and kt.
  • $u_{\sigma^2}$: vr.settings.ub.
  • $l_{\mathrm{sk}}$: sk.settings.lb.
  • $u_{\kappa}$: kt.settings.ub, squared under SOCRiskExpr.

Relaxation

The encoding is not exact: the entries below bound the quantity instead of reproducing it, and the bound is tight only under the condition stated here.

  • The corner $k$ of $\mathbf{M}$ gives $\mathbf{W}_1 \succeq \boldsymbol{w} \boldsymbol{w}^\intercal / k$, so vr_risk_ lies at or above $\boldsymbol{w}^\intercal \mathbf{\Sigma} \boldsymbol{w} / k$.
  • The same block gives $\mathbf{W}_3 \succeq \mathbf{L}_2 \mathrm{vec}(\mathbf{W}_1) \mathrm{vec}(\mathbf{W}_1)^\intercal \mathbf{L}_2^\intercal / k$. For a sample cokurtosis, kt_risk_ then lies at or above $m_4(\boldsymbol{w}) / k^3$, by the argument of the exact formulation of Kurtosis.
  • No row ties $\mathbf{W}_2$ to the weights, so sk_risk_ bounds $m_3(\boldsymbol{w}) / k^2$ in neither direction. The objective subtracts it, so a minimisation pushes it up, and a large $s_{\mathrm{sk}}$ moves it far from $m_3$.
  • So vr_sk_kt_risk_ bounds the value of the functor in neither direction. All four terms are exact when $\mathbf{M}$ has rank one, and Section 3 of [219] states that the relaxation is tight over a range of skewness values only.
  • The ceilings on vr_risk_ and kt_risk_ hold the weights, because each term lies at or above its moment. The floor on sk_risk_ holds the relaxation and not the weights, so the returned weights can have a third moment below sk.settings.lb.
  • A Frontier sweep binds the relaxation in the same way. The span of a sweep on sk.settings.lb is $m_3$ at the two corner portfolios, and the span of a sweep on settings.ub is the value of the functor at the two corners. Each level is a correct value, but the floor on sk_risk_ binds no weight, so a sweep on it can return one portfolio at every level. A sweep on settings.ub meets each level while the relaxation is tight. When a large $s_{\mathrm{sk}}$ opens the gap, the levels can return one portfolio, whose value of the functor lies far from its level.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • i: Constraint index for unique variable and constraint naming.
  • r::VarianceSkewKurtosis: Composite risk measure.
  • opt::RiskConstraintOwner: The owner of the risk constraint, a risk-based JuMP optimisation estimator or a programme Allocation Set.
  • pr::AbstractPriorResult: Prior result. It supplies sigma, sk and kt where the children state none.

Keyword arguments

  • prefix::Symbol: Model State namespace of the build (default: empty, i.e. the bare key).

Validation

  • r.sk.sk or pr holds a coskewness matrix, and r.kt.kt or pr holds a cokurtosis matrix. assert_high_order_quantity raises an ArgumentError otherwise.

Returns

  • vr_sk_kt_risk: The weighted sum of the three traces.

Related

References

  • [219] D. Cajas. Semidefinite Relaxation of Higher Portfolio Moments. Available at SSRN 5284483 (2025). Section 3, Equation 11 and Problems 12 to 14.
source

References

[219]
D. Cajas. Semidefinite Relaxation of Higher Portfolio Moments. Available at SSRN 5284483 (2025).