Negative Skewness Constraints: private API

PortfolioOptimisers.get_chol_or_V_pmFunction
get_chol_or_V_pm(model::Model, pr::HighOrderPrior) -> Any

Retrieve or compute and cache the square-root matrix of the co-skewness matrix V.

If model does not yet contain GV, attempts a Cholesky factorisation of pr.V and falls back to sqrt(pr.V) for positive-semidefinite matrices. Stores the result as the :GV Model State entry.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • pr::HighOrderPrior: High-order prior containing V.

Returns

  • GV::Matrix: Square-root factor of the co-skewness matrix.

Related

source
PortfolioOptimisers.set_negative_skewness_risk!Function
set_negative_skewness_risk!(
    model::Model,
    r::NegativeSkewness{<:Any, <:Any, <:Any, <:Any, <:SOCRiskExpr},
    opt::RiskJuMPOptimisationEstimator,
    nskew_risk::AbstractJuMPScalar,
    i,
    args...;
    prefix
) -> AbstractJuMPScalar

Finalise the negative-skewness risk expression and apply bounds according to the formulation.

The SOCRiskExpr overload passes the SOC variable directly to set_risk_bounds_and_expression!. The SquaredSOCRiskExpr overload squares it. The QuadRiskExpr overload encodes skewness as the quadratic form w' * V * w.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • r::NegativeSkewness: Negative-skewness risk measure instance.
  • opt::RiskJuMPOptimisationEstimator: Risk-based optimisation estimator.
  • nskew_risk: SOC variable for negative-skewness risk.
  • i: Constraint index for unique variable and constraint naming.
  • V::MatNum: Co-skewness matrix (used only by the Quad overload).

Returns

  • The negative-skewness risk JuMP expression.

Related

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

Add negative-skewness risk constraints to model.

Selects the co-skewness matrix (from r.V or pr.V), creates a scalar variable, adds the SOC constraint [sc * nskew_risk; sc * G * w] in SOC, and dispatches to set_negative_skewness_risk! for bounding.

Any prior result is accepted. V must resolve on one side or the other, and assert_high_order_quantity refuses the measure when it resolves on neither. V travels with sk out of one fit, so a measure that holds its own pair takes nothing else from the prior.

Mathematical definition

\[\begin{align} \mathrm{NSkew}(\boldsymbol{w}) &= \lVert \mathbf{G}_V \boldsymbol{w} \rVert_2\,, \\ \mathbf{G}_V &= \mathrm{chol}(\mathbf{V})\,. \end{align}\]

Where:

  • $\mathrm{NSkew}(\boldsymbol{w})$: Negative skewness risk measure.
  • $\mathbf{G}_V$: Cholesky factor of the projected co-skewness matrix $\mathbf{V}$.
  • $\boldsymbol{w}$: Portfolio weights vector $N \times 1$.

where $\mathbf{V}$ is the co-skewness matrix projected onto the weight space.

Arguments

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

Returns

  • nothing.

Related

source