Skip to content
13

Entropic X at Risk

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

Represents the Entropic Value-at-Risk (EVaR) risk measure.

EntropicValueatRisk is a coherent risk measure based on the Chernoff bound. It is an upper bound for both CVaR and VaR and is computed by solving a conic optimisation problem via an external solver.

Mathematical definition

The EVaR is defined via the Chernoff bound as the tightest exponential upper bound on VaR and CVaR:

EVaRα(x)=infz>0{zln(ML(1/z)α)}.

Where:

  • EVaRα(x): Entropic Value-at-Risk (tightest exponential upper bound on VaR and CVaR).

  • x: Portfolio returns vector T×1.

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

  • Lt=xt: Loss at period t.

  • ML(u)=E[euL]: Moment-generating function of the loss.

  • z: Exponential tilt parameter.

Computationally, it is solved via the conic programme:

EVaRα(x)=mint,z,u{tzln(αT):z0,i=1Tuiz,(xit,z,ui)Kexpi}.

Where:

  • T: Number of observations.

  • t, z, u: Conic optimisation variables.

  • Kexp={(a,b,c):bea/bc,b>0}: Exponential cone.

Fields

  • settings: Risk measure settings.

  • slv: Solver or vector of solvers.

  • alpha: Quantile level for the lower tail.

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

Constructors

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

Keywords correspond to the struct's fields.

Validation

  • 0 < alpha < 1.

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

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

Functor

julia
(r::EntropicValueatRisk)(x::VecNum)

Computes the EVaR of a portfolio returns vector x.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

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

Related

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

Create an instance of EntropicValueatRisk 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::EntropicValueatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}};
    ...
) -> Union{EntropicValueatRisk{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, <:AbstractVector{var"#s869"}, <:Number} where {__T_scale, __T_ub, __T_rke, var"#s869"<:Solver}, EntropicValueatRisk{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, Solver{__T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}, <:Number} where {__T_scale, __T_ub, __T_rke, __T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}}
factory(
    r::EntropicValueatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}},
    pr::Union{Nothing, AbstractPriorResult},
    args...;
    kwargs...
) -> EntropicValueatRisk

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

Related

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

Represents the Entropic Value-at-Risk Range (EVaR Range) risk measure.

EntropicValueatRiskRange computes the difference between the lower-tail EVaR (at level alpha) and the upper-tail EVaR (at level beta).

Mathematical definition

EVaRRangeα,β(x)=EVaRα(x)+EVaRβ(x).

Where:

  • EVaRRangeα,β(x): EVaR range (entropic tail spread).

  • x: Portfolio returns vector T×1.

  • EVaRα(x): Lower-tail entropic risk at level α.

  • EVaRβ(x): Upper-tail entropic risk at level β.

Fields

  • settings: Risk measure settings.

  • slv: Solver or vector of solvers.

  • alpha: Quantile level for the lower tail.

  • beta: Quantile level 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
EntropicValueatRiskRange(;
    settings::RiskMeasureSettings = RiskMeasureSettings(),
    slv::Option{<:Slv_VecSlv} = nothing,
    alpha::Number = 0.05,
    beta::Number = 0.05,
    w::Option{<:ObsWeights} = nothing
) -> EntropicValueatRiskRange

Keywords correspond to the struct's fields.

Validation

  • 0 < alpha < 1, 0 < beta < 1.

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

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

Related

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

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

Related

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

Represents the Entropic Drawdown-at-Risk (EDaR) risk measure.

EntropicDrawdownatRisk applies the Entropic Value-at-Risk framework to the absolute drawdown series of portfolio returns. It is a coherent risk measure providing an upper bound on both the Drawdown-at-Risk and Conditional Drawdown-at-Risk.

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 EDaR is the EVaR of the drawdown series:

EDaRα(x)=EVaRα(d(x)).

Where:

  • EDaRα(x): Entropic Drawdown-at-Risk.

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

  • 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.

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

Constructors

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

Keywords correspond to the struct's fields.

Validation

  • 0 < alpha < 1.

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

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

Functor

julia
(r::EntropicDrawdownatRisk)(x::VecNum)

Computes the EDaR of a portfolio returns vector x.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

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

Related

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

Create an instance of EntropicDrawdownatRisk 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::EntropicDrawdownatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}};
    ...
) -> Union{EntropicDrawdownatRisk{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, <:AbstractVector{var"#s869"}, <:Number} where {__T_scale, __T_ub, __T_rke, var"#s869"<:Solver}, EntropicDrawdownatRisk{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, Solver{__T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}, <:Number} where {__T_scale, __T_ub, __T_rke, __T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}}
factory(
    r::EntropicDrawdownatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}},
    pr::Union{Nothing, AbstractPriorResult},
    args...;
    kwargs...
) -> EntropicDrawdownatRisk

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

Related

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

Represents the Relative Entropic Drawdown-at-Risk (Relative EDaR) risk measure for hierarchical optimisation.

RelativeEntropicDrawdownatRisk applies the Entropic 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 EDaR is the EVaR of the relative drawdown series:

REDaRα(x)=EVaRα(rd(x)).

Where:

  • REDaRα(x): Relative Entropic Drawdown-at-Risk.

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

  • 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.

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

Constructors

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

Keywords correspond to the struct's fields.

Validation

  • 0 < alpha < 1.

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

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

Functor

julia
(r::RelativeEntropicDrawdownatRisk)(x::VecNum)

Computes the Relative EDaR of a portfolio returns vector x.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

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

Related

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

Create an instance of RelativeEntropicDrawdownatRisk 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::RelativeEntropicDrawdownatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}};
    ...
) -> Union{RelativeEntropicDrawdownatRisk{HierarchicalRiskMeasureSettings{__T_scale}, <:AbstractVector{var"#s869"}, <:Number} where {__T_scale, var"#s869"<:Solver}, RelativeEntropicDrawdownatRisk{HierarchicalRiskMeasureSettings{__T_scale}, Solver{__T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}, <:Number} where {__T_scale, __T_name, __T_solver, __T_settings, __T_check_sol, __T_add_bridges}}
factory(
    r::RelativeEntropicDrawdownatRisk,
    slv::Union{Solver, AbstractVector{<:Solver}},
    pr::Union{Nothing, AbstractPriorResult},
    args...;
    kwargs...
) -> RelativeEntropicDrawdownatRisk

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

Related

source
PortfolioOptimisers.ERM Function
julia
ERM(x, slv, alpha = 0.05, ...; kwargs...)

Compute the Entropic Risk Measure (ERM) for a vector of portfolio returns.

Solves a convex optimisation problem to compute the ERM at confidence level alpha, using the specified solver(s). The ERM is a coherent risk measure based on the exponential moment of the loss distribution.

Arguments

  • x: Vector of portfolio returns.

  • slv: Solver or vector of solvers.

  • alpha: Confidence level (default 0.05).

  • Additional parameters depending on the specific ERM formulation.

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

Returns

  • ERM value (scalar).

Related

source