Negative Skewness
PortfolioOptimisers.NegativeSkewness — Type
struct NegativeSkewness{__T_settings, __T_mp, __T_sk, __T_V, __T_alg, __T_window} <: RiskMeasureRepresents the Negative Skewness risk measure.
NegativeSkewness quantifies the portfolio's exposure to negative asymmetry in returns by computing a quadratic or SOC (second-order cone) form of the coskewness matrix. It penalises portfolio constructions that exhibit heavy left-tail behaviour.
Mathematical definition
Let $\boldsymbol{w}$ be the portfolio weight vector and $\mathbf{V}$ the negative semi-definite coskewness matrix (spectral decomposition of the negative part of the sample coskewness tensor). The Negative Skewness risk measure is:
\[\begin{align} \mathrm{NSke}(\boldsymbol{w}) &= \begin{cases} \sqrt{\boldsymbol{w}^\intercal \mathbf{V} \boldsymbol{w}} & \text{(SOC formulation)} \\ \boldsymbol{w}^\intercal \mathbf{V} \boldsymbol{w} & \text{(Quadratic formulation)} \end{cases}\,. \end{align}\]
Where:
- $\mathrm{NSke}(\boldsymbol{w})$: Negative Skewness risk measure.
- $\boldsymbol{w}$: Portfolio weights vector $N \times 1$.
- $\mathbf{V}$: Negative semi-definite coskewness matrix (spectral decomposition of the negative part of the sample coskewness tensor).
Fields
settings: Risk measure settings.
mp: Matrix processing estimator.
sk: Optional coskewness matrixassets × assets^2. Also admits a Deferred Quantity — a coskewness estimator or a prior estimator that computes the matrix against the optimisation's own prior, atfactorytime (seeSkSlotandresolve_deferred_quantities). A coskewness estimator suppliesmuas well, from its ownme, so that the tensor and the centre it was taken about come out of one object. Ifnothing, the prior supplies it.
V: Optional sum of the negative spectral slices of the coskewness matrixassets × assets. Derived fromsk, so it never defers: it arrives as one pair with whateverskresolves to, and the matrix processing estimator that built it travels with it and replacesmp. Give it with a matrixskand with neither otherwise. Stating it whileskholds a Deferred Quantity is refused at construction.
alg: Risk measure optimisation formulation algorithm.
window: Observation window. An integer selects the lastwindowobservations, and a vector of indices selects those observations.
Constructors
NegativeSkewness(; settings::RiskMeasureSettings = RiskMeasureSettings(), mp::AbstractMatrixProcessingEstimator = MatrixProcessing(), sk::Option{<:SkSlot} = nothing, V::Option{<:MatNum} = nothing, alg::NSkeFormulations = SOCRiskExpr(), window::Option{<:Int_VecInt} = nothing) -> NegativeSkewnessKeywords correspond to the struct's fields.
Validation
- If
skis a matrix,Vmust be given as well, and the reverse. Both must be non-empty, withsize(sk, 1)^2 == size(sk, 2)andVsquare. - If
skholds a Deferred Quantity,Vmust benothing. The fit supplies the pair. windowis validated withassert_nonempty_nonneg_finite_val.
sk and V are a pair, and a stated V factors the sk beside it. A caller who wants one consistent pair names sk alone — a Deferred Quantity there supplies both from one fit, together with the mp that built them. A caller who states both by hand must make sure that they agree. A stated matrix is also pinned: it crosses a Cross-Validation fold or a subset view as the whole universe's answer, while a Deferred Quantity crosses unresolved and refits on the subset.
sk also admits a CoskewnessEstimator or an AbstractPriorEstimator, resolved against the optimisation's own prior — see resolve_deferred_quantities. V never defers: it is derived from sk, so it travels out of that same fit. The processor that built it travels with it and replaces mp, so a later rebuild uses the same one. The measure carries one deferrable slot, so it takes no pe.
Functor
(r::NegativeSkewness)(w::VecNum)Computes the Negative Skewness risk of a portfolio weight vector w.
Arguments
w::VecNum: Portfolio weights vector.
Examples
julia> NegativeSkewness()NegativeSkewness settings ┼ RiskMeasureSettings │ scale ┼ Float64: 1.0 │ ub ┼ nothing │ rke ┴ Bool: true mp ┼ MatrixProcessing │ pdm ┼ Posdef │ │ alg ┼ UnionAll: NearestCorrelationMatrix.Newton │ │ kwargs ┴ @NamedTuple{}: NamedTuple() │ dn ┼ nothing │ dt ┼ nothing │ alg ┼ nothing │ order ┴ NTuple{4, Symbol}: (:pdm, :dn, :dt, :alg) sk ┼ nothing V ┼ nothing alg ┼ SOCRiskExpr() window ┴ nothingRelated
References
- [31] D. Cajas. On the Spectral Decomposition of Portfolio Skewness and its Application to Portfolio Optimization. Available at SSRN 4540021 (2023).
PortfolioOptimisers.factory — Method
factory(
r::NegativeSkewness,
pr::HighOrderPrior,
args...;
kwargs...
) -> NegativeSkewness{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, <:AbstractMatrixProcessingEstimator} where {__T_scale, __T_ub, __T_rke}
Create an instance of NegativeSkewness by resolving a Deferred Quantity in sk, then falling back to a HighOrderPrior result for the coskewness matrix and its spectral decomposition.
The two are selected field by field rather than as a pair, because the constructor already refuses every mixed state: a stated sk always carries its own V, and a deferred sk always resolves to both at once. So the fallback is reached only when the measure names neither.
Related
PortfolioOptimisers.factory — Method
factory(
r::NegativeSkewness,
pr::LowOrderPrior,
args...;
kwargs...
) -> NegativeSkewness
Resolve a Deferred Quantity in NegativeSkewness's sk slot against a LowOrderPrior result, and otherwise return r unchanged.
Coskewness is not available on a LowOrderPrior, so there is no fallback to make. A coskewness estimator in sk needs only the returns matrix the result carries, so it resolves here all the same.
Related
References
- [31]
- D. Cajas. On the Spectral Decomposition of Portfolio Skewness and its Application to Portfolio Optimization. Available at SSRN 4540021 (2023).