Skip to content
13

Relativistic X at Risk

PortfolioOptimisers.RelativisticValueatRisk Type
julia
struct RelativisticValueatRisk{__T_settings, __T_slv, __T_alpha, __T_kappa, __T_w} <: RiskMeasure

Represents the Relativistic Value-at-Risk (RVaR) risk measure.

RelativisticValueatRisk is a coherent risk measure generalising EVaR via the Tsallis (κ-deformed) entropy. It is parametrised by a deformation parameter κ(0,1) and reduces to EVaR in the limit κ0. It is solved via a conic programme.

Mathematical definition

Define the κ-logarithm κ(u)=uκuκ2κ. The RVaR is:

RVaRα,κ(x)=mint,z{t+κ(αT)z+i=1T(ψi+θi):z0}.

Where:

  • RVaRα,κ(x): Relativistic Value-at-Risk.

  • x: Portfolio returns vector T×1.

  • α: Significance level (left tail probability), α(0,1).

  • T: Number of observations.

  • κ(0,1): Tsallis deformation parameter.

  • κ(u)=uκuκ2κ: κ-logarithm.

  • t, z, ψi, θi, ϵi, ωi: Conic optimisation variables.

subject to the power-cone constraints:

(z(1+κ)2κ,ψi(1+κ)κ,ϵi)Kpow(11+κ)i,(ωi1κ,θiκ,z2κ)Kpow(1κ)i,ϵi+ωixi+ti.

Where:

  • Kpow(p)={(a,b,c):apb1p|c|,a0,b0}: Power cone.

Fields

  • settings: Risk measure settings.

  • slv: Solver or vector of solvers.

  • alpha: Quantile level for the lower tail.

  • kappa: Relativistic deformation parameter.

  • w: Optional observation weights vector observations × 1, or a concrete subtype of DynamicAbstractWeights. If nothing, the computation is unweighted.

Constructors

julia
RelativisticValueatRisk(;
    settings::RiskMeasureSettings = RiskMeasureSettings(),
    slv::Option{<:Slv_VecSlv} = nothing,
    alpha::Number = 0.05,
    kappa::Number = 0.3,
    w::Option{<:ObsWeights} = nothing
) -> RelativisticValueatRisk

Keywords correspond to the struct's fields.

Validation

  • 0 < alpha < 1.

  • 0 < kappa < 1.

  • If slv is a VecSlv: !isempty(slv).

  • If w is not nothing: !isempty(w).

Functor

julia
(r::RelativisticValueatRisk)(x::VecNum)

Computes the RVaR of a portfolio returns vector x.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

julia
julia> RelativisticValueatRisk()
RelativisticValueatRisk
  settings ┼ RiskMeasureSettings
           │   scale ┼ Float64: 1.0
           │      ub ┼ nothing
           │     rke ┴ Bool: true
       slv ┼ nothing
     alpha ┼ Float64: 0.05
     kappa ┼ Float64: 0.3
         w ┴ nothing

Related

source
PortfolioOptimisers.factory Function
julia
factory(
    r::RelativisticValueatRisk,
    pr::AbstractPriorResult;
    ...
) -> RelativisticValueatRisk
factory(
    r::RelativisticValueatRisk,
    pr::AbstractPriorResult,
    slv::Union{Nothing, Solver, AbstractVector{<:Solver}},
    args...;
    kwargs...
) -> RelativisticValueatRisk

Create an instance of RelativisticValueatRisk by selecting observation weights and solver from the risk-measure instance or falling back to the prior result.

Related

source
PortfolioOptimisers.factory Function
julia
factory(
    r::RelativisticValueatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}};
    ...
) -> Union{RelativisticValueatRisk{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, <:AbstractVector{var"#s869"}, <:Number, <:Number} where {__T_scale, __T_ub, __T_rke, var"#s869"<:Solver}, RelativisticValueatRisk{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, Solver{__T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}, <:Number, <:Number} where {__T_scale, __T_ub, __T_rke, __T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}}
factory(
    r::RelativisticValueatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}},
    pr::Union{Nothing, AbstractPriorResult},
    args...;
    kwargs...
) -> RelativisticValueatRisk

Create an instance of RelativisticValueatRisk by overriding the solver and optionally selecting observation weights from the prior result.

Related

source
PortfolioOptimisers.RelativisticValueatRiskRange Type
julia
struct RelativisticValueatRiskRange{__T_settings, __T_slv, __T_alpha, __T_kappa_a, __T_beta, __T_kappa_b, __T_w} <: RiskMeasure

Represents the Relativistic Value-at-Risk Range (RVaR Range) risk measure.

RelativisticValueatRiskRange computes the sum of the lower-tail RVaR (at level alpha with deformation kappa_a) and the upper-tail RVaR (at level beta with deformation kappa_b).

Mathematical definition

RVaRRangeα,κa,β,κb(x)=RVaRα,κa(x)+RVaRβ,κb(x).

Where:

  • RVaRRangeα,κa,β,κb(x): Relativistic VaR range.

  • x: Portfolio returns vector T×1.

  • RVaRα,κa(x): Lower-tail RVaR with parameters (α,κa).

  • RVaRβ,κb(x): Upper-tail RVaR with parameters (β,κb).

Fields

  • settings: Risk measure settings.

  • slv: Solver or vector of solvers.

  • alpha: Quantile level for the lower tail.

  • kappa_a: Relativistic deformation parameter for the lower tail.

  • beta: Quantile level for the upper tail.

  • kappa_b: Relativistic deformation parameter for the upper tail.

  • w: Optional observation weights vector observations × 1, or a concrete subtype of DynamicAbstractWeights. If nothing, the computation is unweighted.

Constructors

julia
RelativisticValueatRiskRange(;
    settings::RiskMeasureSettings = RiskMeasureSettings(),
    slv::Option{<:Slv_VecSlv} = nothing,
    alpha::Number = 0.05,
    kappa_a::Number = 0.3,
    beta::Number = 0.05,
    kappa_b::Number = 0.3,
    w::Option{<:ObsWeights} = nothing
) -> RelativisticValueatRiskRange

Keywords correspond to the struct's fields.

Validation

  • 0 < alpha < 1, 0 < kappa_a < 1.

  • 0 < beta < 1, 0 < kappa_b < 1.

  • If slv is a VecSlv: !isempty(slv).

  • If w is not nothing: !isempty(w).

Functor

julia
(r::RelativisticValueatRiskRange)(x::VecNum)

Computes the RVaR Range of a portfolio returns vector x.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

julia
julia> RelativisticValueatRiskRange()
RelativisticValueatRiskRange
  settings ┼ RiskMeasureSettings
           │   scale ┼ Float64: 1.0
           │      ub ┼ nothing
           │     rke ┴ Bool: true
       slv ┼ nothing
     alpha ┼ Float64: 0.05
   kappa_a ┼ Float64: 0.3
      beta ┼ Float64: 0.05
   kappa_b ┼ Float64: 0.3
         w ┴ nothing

Related

source
PortfolioOptimisers.factory Method
julia
factory(
    r::RelativisticValueatRiskRange,
    pr::AbstractPriorResult,
    slv::Union{Nothing, Solver, AbstractVector{<:Solver}},
    args...;
    kwargs...
) -> RelativisticValueatRiskRange

Create an instance of RelativisticValueatRiskRange by selecting observation weights and solver from the risk-measure instance or falling back to the prior result.

Related

source
PortfolioOptimisers.RelativisticDrawdownatRisk Type
julia
struct RelativisticDrawdownatRisk{__T_settings, __T_slv, __T_alpha, __T_kappa, __T_w} <: RiskMeasure

Represents the Relativistic Drawdown-at-Risk (RDDaR) risk measure.

RelativisticDrawdownatRisk applies the Relativistic Value-at-Risk framework to the absolute drawdown series of portfolio returns.

Mathematical definition

Define the absolute drawdown series:

ct=s=1txs,dt=ctmax0stcs0.

Where:

  • x: Portfolio returns vector T×1.

  • ct: Cumulative simple portfolio return at period t.

  • dt0: Absolute drawdown at period t.

The Relativistic Drawdown-at-Risk is the RVaR of the drawdown series:

RDDaRα,κ(x)=RVaRα,κ(d(x)).

Where:

  • RDDaRα,κ(x): Relativistic Drawdown-at-Risk.

  • α: Significance level (left tail probability), α(0,1).

  • κ(0,1): Tsallis deformation parameter.

  • d(x): Absolute drawdown series vector T×1.

Fields

  • settings: Risk measure settings.

  • slv: Solver or vector of solvers.

  • alpha: Quantile level for the lower tail.

  • kappa: Relativistic deformation parameter.

  • w: Optional observation weights vector observations × 1, or a concrete subtype of DynamicAbstractWeights. If nothing, the computation is unweighted.

Constructors

julia
RelativisticDrawdownatRisk(;
    settings::RiskMeasureSettings = RiskMeasureSettings(),
    slv::Option{<:Slv_VecSlv} = nothing,
    alpha::Number = 0.05,
    kappa::Number = 0.3,
    w::Option{<:ObsWeights} = nothing
) -> RelativisticDrawdownatRisk

Keywords correspond to the struct's fields.

Validation

  • 0 < alpha < 1.

  • 0 < kappa < 1.

  • If slv is a VecSlv: !isempty(slv).

  • If w is not nothing: !isempty(w).

Functor

julia
(r::RelativisticDrawdownatRisk)(x::VecNum)

Computes the Relativistic Drawdown-at-Risk of a portfolio returns vector x.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

julia
julia> RelativisticDrawdownatRisk()
RelativisticDrawdownatRisk
  settings ┼ RiskMeasureSettings
           │   scale ┼ Float64: 1.0
           │      ub ┼ nothing
           │     rke ┴ Bool: true
       slv ┼ nothing
     alpha ┼ Float64: 0.05
     kappa ┼ Float64: 0.3
         w ┴ nothing

Related

source
PortfolioOptimisers.factory Function
julia
factory(
    r::RelativisticDrawdownatRisk,
    pr::AbstractPriorResult;
    ...
) -> RelativisticDrawdownatRisk
factory(
    r::RelativisticDrawdownatRisk,
    pr::AbstractPriorResult,
    slv::Union{Nothing, Solver, AbstractVector{<:Solver}},
    args...;
    kwargs...
) -> RelativisticDrawdownatRisk

Create an instance of RelativisticDrawdownatRisk by selecting observation weights and solver from the risk-measure instance or falling back to the prior result.

Related

source
PortfolioOptimisers.factory Function
julia
factory(
    r::RelativisticDrawdownatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}};
    ...
) -> Union{RelativisticDrawdownatRisk{_A, <:AbstractVector{var"#s869"}, <:Number, <:Number} where {_A, var"#s869"<:Solver}, RelativisticDrawdownatRisk{_A, Solver{__T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}, <:Number, <:Number} where {_A, __T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}}
factory(
    r::RelativisticDrawdownatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}},
    pr::Union{Nothing, AbstractPriorResult},
    args...;
    kwargs...
) -> RelativisticDrawdownatRisk

Create an instance of RelativisticDrawdownatRisk by overriding the solver and optionally selecting observation weights from the prior result.

Related

source
PortfolioOptimisers.RelativeRelativisticDrawdownatRisk Type
julia
struct RelativeRelativisticDrawdownatRisk{__T_settings, __T_slv, __T_alpha, __T_kappa, __T_w} <: HierarchicalRiskMeasure

Represents the Relative Relativistic Drawdown-at-Risk (Relative RDDaR) risk measure for hierarchical optimisation.

RelativeRelativisticDrawdownatRisk applies the Relativistic Value-at-Risk framework to the relative (compounded) drawdown series of portfolio returns.

Mathematical definition

Define the compounded wealth process and relative drawdown series:

Ct=s=1t(1+xs),rdt=Ctmax0stCs10.

Where:

  • x: Portfolio returns vector T×1.

  • Ct: Compound wealth process at period t.

  • rdt0: Relative drawdown at period t.

The Relative Relativistic Drawdown-at-Risk is the RVaR of the relative drawdown series:

RRDDaRα,κ(x)=RVaRα,κ(rd(x)).

Where:

  • RRDDaRα,κ(x): Relative Relativistic Drawdown-at-Risk.

  • α: Significance level (left tail probability), α(0,1).

  • κ(0,1): Tsallis deformation parameter.

  • rd(x): Relative drawdown series vector T×1.

Fields

  • settings: Risk measure settings.

  • slv: Solver or vector of solvers.

  • alpha: Quantile level for the lower tail.

  • kappa: Relativistic deformation parameter.

  • w: Optional observation weights vector observations × 1, or a concrete subtype of DynamicAbstractWeights. If nothing, the computation is unweighted.

Constructors

julia
RelativeRelativisticDrawdownatRisk(;
    settings::HierarchicalRiskMeasureSettings = HierarchicalRiskMeasureSettings(),
    slv::Option{<:Slv_VecSlv} = nothing,
    alpha::Number = 0.05,
    kappa::Number = 0.3,
    w::Option{<:ObsWeights} = nothing
) -> RelativeRelativisticDrawdownatRisk

Keywords correspond to the struct's fields.

Validation

  • 0 < alpha < 1.

  • 0 < kappa < 1.

  • If slv is a VecSlv: !isempty(slv).

  • If w is not nothing: !isempty(w).

Functor

julia
(r::RelativeRelativisticDrawdownatRisk)(x::VecNum)

Computes the Relative Relativistic Drawdown-at-Risk of a portfolio returns vector x.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

julia
julia> RelativeRelativisticDrawdownatRisk()
RelativeRelativisticDrawdownatRisk
  settings ┼ HierarchicalRiskMeasureSettings
           │   scale ┴ Float64: 1.0
       slv ┼ nothing
     alpha ┼ Float64: 0.05
     kappa ┼ Float64: 0.3
         w ┴ nothing

Related

source
PortfolioOptimisers.factory Function
julia
factory(
    r::RelativeRelativisticDrawdownatRisk,
    pr::AbstractPriorResult;
    ...
) -> RelativeRelativisticDrawdownatRisk
factory(
    r::RelativeRelativisticDrawdownatRisk,
    pr::AbstractPriorResult,
    slv::Union{Nothing, Solver, AbstractVector{<:Solver}},
    args...;
    kwargs...
) -> RelativeRelativisticDrawdownatRisk

Create an instance of RelativeRelativisticDrawdownatRisk by selecting observation weights and solver from the risk-measure instance or falling back to the prior result.

Related

source
PortfolioOptimisers.factory Function
julia
factory(
    r::RelativeRelativisticDrawdownatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}};
    ...
) -> Union{RelativeRelativisticDrawdownatRisk{HierarchicalRiskMeasureSettings{__T_scale}, <:AbstractVector{var"#s869"}, <:Number, <:Number} where {__T_scale, var"#s869"<:Solver}, RelativeRelativisticDrawdownatRisk{HierarchicalRiskMeasureSettings{__T_scale}, Solver{__T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}, <:Number, <:Number} where {__T_scale, __T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}}
factory(
    r::RelativeRelativisticDrawdownatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}},
    pr::Union{Nothing, AbstractPriorResult},
    args...;
    kwargs...
) -> RelativeRelativisticDrawdownatRisk

Create an instance of RelativeRelativisticDrawdownatRisk by overriding the solver and optionally selecting observation weights from the prior result.

Related

source
PortfolioOptimisers.RRM Function
julia
RRM(x, slv, alpha = 0.05, kappa = 0.3, ...; kwargs...)

Compute the Relativistic Risk Measure (RRM) for a vector of portfolio returns.

Solves a convex optimisation problem to compute the RRM at confidence level alpha with relativistic parameter kappa, using the specified solver(s).

Arguments

  • x: Vector of portfolio returns.

  • slv: Solver or vector of solvers.

  • alpha: Confidence level (default 0.05).

  • kappa: Relativistic parameter (default 0.3).

  • Additional parameters depending on the specific RRM formulation.

  • kwargs...: Additional keyword arguments passed to the solver.

Returns

  • RRM value (scalar).

Related

source