Kurtosis
PortfolioOptimisers.Kurtosis Type
struct Kurtosis{T1, T2, T3, T4, T5, T6, T7} <: RiskMeasure
settings::T1
w::T2
mu::T3
kt::T4
N::T5
alg1::T6
alg2::T7
endRepresents the square root kurtosis risk measure in PortfolioOptimisers.jl.
Computes portfolio risk as the square root of the fourth central moment (kurtosis) of the return distribution, optionally using custom weights, expected returns, and a kurtosis (fourth moment) matrix. This risk measure can be evaluated using either the full or semi (downside) deviations, depending on the algorithm provided.
Fields
settings: Risk measure configuration.w: Optional vector of observation weights.mu: Optional expected returns value, vector, orVecScalarfor the moment target, viacalc_moment_target. Ifnothingit is computed from the returns series using the optional weights inw.kt: Optional cokurtosis (fourth moment) matrix that overrides the priorktwhen provided.N: Optional integer specifying the number of eigenvalues per asset to use from the cokurtosis matrix in an approximate formulation. Ifnothing, the exact formulation is used.alg1: Moment algorithm specifying whether to use all or only downside deviations.alg2: Specifies theJuMPformulation used to encode the risk measure.
Constructors
Kurtosis(; settings::RiskMeasureSettings = RiskMeasureSettings(),
w::Union{Nothing, <:AbstractWeights} = nothing,
mu::Union{Nothing, <:Real, <:AbstractVector{<:Real}, <:VecScalar} = nothing,
kt::Union{Nothing, <:AbstractMatrix} = nothing,
N::Union{Nothing, <:Integer} = nothing,
alg1::AbstractMomentAlgorithm = Full(),
alg2::VarianceFormulation = SOCRiskExpr())Keyword arguments correspond to the fields above.
Validation
If
muis notnothing:::Real:isfinite(mu).::AbstractVector:!isempty(mu)andall(isfinite, mu).
If
wis notnothing,!isempty(w).If
ktis notnothing:!isempty(kt)andsize(kt, 1) == size(kt, 2).If
muis notnothing:::AbstractVector:length(mu)^2 == size(kt, 1).::VecScalar:length(mu.v)^2 == size(kt, 1).
If
Nis provided: must be positive.
JuMP Formulations
Exact
This formulation is used when N is nothing.
Approximate
This formulation is used when N is an integer, the larger the value of N, the more accurate and expensive it becomes.
Examples
julia> Kurtosis()
Kurtosis
settings ┼ RiskMeasureSettings
│ scale ┼ Float64: 1.0
│ ub ┼ nothing
│ rke ┴ Bool: true
w ┼ nothing
mu ┼ nothing
kt ┼ nothing
N ┼ nothing
alg1 ┼ Full()
alg2 ┴ SOCRiskExpr()Related
source