Kurtosis Constraints: private API

PortfolioOptimisers.get_chol_or_Gkt_pmFunction
get_chol_or_Gkt_pm(model::Model, pr::HighOrderPrior) -> Any

Retrieve or compute and cache the Cholesky factor of the co-kurtosis matrix.

If model does not yet contain Gkt, computes the upper Cholesky factor of pr.S2 * pr.kt * pr.S2' and stores it as the :Gkt Model State entry.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • pr::HighOrderPrior: High-order prior containing kt and S2.

Returns

  • Gkt::Matrix: Upper Cholesky factor of the co-kurtosis projected matrix.

Related

source
PortfolioOptimisers.get_kt_Akt_pmFunction
get_kt_Akt_pm(
    model::Model,
    pr::HighOrderPrior
) -> Tuple{Any, Any}

Retrieve or compute and cache the eigendecomposition of the co-kurtosis matrix.

Builds the block-vectorised kurtosis matrix A, clamps its eigenvalues to be non-negative, and stores vals_Akt and vecs_Akt in model.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • pr::HighOrderPrior: High-order prior containing kt and mu.

Returns

  • A 2-tuple (vals_Akt, vecs_Akt) of eigenvalues and eigenvectors.

Related

source
PortfolioOptimisers.set_kurtosis_risk!Function
set_kurtosis_risk!(
    model::Model,
    r::Kurtosis{<:Any, <:Any, <:Any, <:Any, <:Any, <:Any, <:SOCRiskExpr},
    opt::RiskJuMPOptimisationEstimator,
    sqrt_kurtosis_risk::AbstractJuMPScalar,
    ,
    i;
    prefix
) -> AbstractJuMPScalar

Finalise the kurtosis risk expression and apply bounds according to the chosen formulation.

The SOCRiskExpr overload passes the SOC variable directly to set_risk_bounds_and_expression!. The SquaredSOCRiskExpr overload squares the variable and bounds the original variable. The QuadRiskExpr overload uses a quadratic dot product of x_kurt. The RSOCRiskExpr overload adds a rotated second-order cone constraint.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • r::Kurtosis: Kurtosis risk measure instance.
  • opt::RiskJuMPOptimisationEstimator: Risk-based optimisation estimator.
  • sqrt_kurtosis_risk: SOC variable representing the square root of kurtosis risk.
  • x_kurt: Auxiliary vector expression used in Quad/RSOC formulations.
  • i: Constraint index for unique variable and constraint naming.

Returns

  • The kurtosis risk JuMP expression.

Related

source
PortfolioOptimisers.set_risk_constraints!Method
set_risk_constraints!(
    model::Model,
    i,
    r::Kurtosis{<:Any, <:Any, <:Any, <:Any, <:Integer},
    opt::RiskJuMPOptimisationEstimator,
    pr::AbstractPriorResult,
    args...;
    prefix,
    kwargs...
) -> Any

Add kurtosis risk constraints to model.

The Integer N overload uses an approximate spectral decomposition of the co-kurtosis tensor to build N eigen-directions and encodes kurtosis via SOC and equality constraints. The Nothing N overload uses the full Cholesky-based formulation with the duplication matrix.

Both accept any prior result. The cokurtosis matrix must resolve on one side or the other, and assert_high_order_quantity refuses the measure when it resolves on neither.

Mathematical definition

\[\begin{align} \sqrt{\mathrm{Kurt}(\boldsymbol{w})} &= \lVert \mathbf{G}_{kt}(\boldsymbol{w} \otimes \boldsymbol{w}) \rVert_2\,, \\ \mathbf{G}_{kt} &= \mathrm{chol}(\mathbf{S}_2 \mathbf{K} \mathbf{S}_2^\intercal)\,. \end{align}\]

Where:

  • $\mathrm{Kurt}(\boldsymbol{w})$: Portfolio kurtosis risk measure.
  • $\mathbf{G}_{kt}$: Cholesky factor of the projected co-kurtosis matrix.
  • $\mathbf{K}$: Co-kurtosis matrix.
  • $\mathbf{S}_2$: Duplication matrix.
  • $\boldsymbol{w}$: Portfolio weights vector $N \times 1$.
  • $\otimes$: Kronecker product.

where $\mathbf{K}$ is the co-kurtosis matrix and $\mathbf{S}_2$ is the duplication matrix.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • i: Constraint index for unique variable and constraint naming.
  • r::Kurtosis: Kurtosis risk measure instance.
  • opt::RiskJuMPOptimisationEstimator: Risk-based optimisation estimator.
  • pr::AbstractPriorResult: Prior result. It supplies kt when the measure states none.

Returns

  • nothing.

Related

source
PortfolioOptimisers.set_risk_constraints!Method
set_risk_constraints!(
    model::Model,
    i,
    r::Kurtosis{<:Any, <:Any, <:Any, <:Any, Nothing},
    opt::RiskJuMPOptimisationEstimator,
    pr::AbstractPriorResult,
    args...;
    prefix,
    kwargs...
) -> Any

Add JuMP risk constraints for Kurtosis with a continuous Nothing truncation parameter to model.

Uses the full Cholesky-based SDP formulation to compute the portfolio kurtosis risk as a second-order cone constraint over the vectorised weight matrix W. This overload applies when the kurtosis truncation rank is Nothing (no truncation).

The elimination and summation matrices come from dup_elim_sum_selector, so this formulation is reachable under a LowOrderPrior whenever the measure holds its own cokurtosis matrix: those two were the only other thing the kernel took from the prior, and they are a pure function of the asset count.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • i: Constraint index for unique variable and constraint naming.
  • r::Kurtosis{<:Any, <:Any, <:Any, <:Any, Nothing, <:Any, <:Any}: The kurtosis risk measure with no truncation.
  • opt::RiskJuMPOptimisationEstimator: Risk-based optimisation estimator.
  • pr::AbstractPriorResult: Prior result. It supplies kt when the measure states none.

Returns

  • nothing.

Related

source