Skip to content
18

Generic Value at Risk Range

PortfolioOptimisers.GenericValueatRiskRange Type
julia
struct GenericValueatRiskRange{__T_settings, __T_loss, __T_gain} <: RiskMeasure

Represents a generic Value-at-Risk range risk measure that combines any pair of XatRisk-type measures applied to the loss and gain sides of the return distribution.

GenericValueatRiskRange evaluates a loss-side XatRisk measure on the portfolio returns and a gain-side XatRisk measure on the negated portfolio returns, then sums the two to produce a symmetric tail-spread risk measure.

Mathematical definition

GenVaRRange(x)=ρloss(x)+ρgain(x).

Where:

  • GenVaRRange(x): Generic Value-at-Risk range.

  • ρloss: Loss-side XatRisk risk measure.

  • ρgain: Gain-side XatRisk risk measure.

  • x: Portfolio returns vector T×1.

Fields

  • settings: Risk measure settings.

  • loss: Loss-side XatRisk risk measure applied to the portfolio returns.

  • gain: Gain-side XatRisk risk measure applied to the negated portfolio returns.

Constructors

julia
GenericValueatRiskRange(;
    settings::RiskMeasureSettings = RiskMeasureSettings(),
    loss::Union{<:ValueatRisk, <:ConditionalValueatRisk,
                <:DistributionallyRobustConditionalValueatRisk,
                <:EntropicValueatRisk, <:RelativisticValueatRisk,
                <:PowerNormValueatRisk} = ConditionalValueatRisk(),
    gain::Union{<:ValueatRisk, <:ConditionalValueatRisk,
                <:DistributionallyRobustConditionalValueatRisk,
                <:EntropicValueatRisk, <:RelativisticValueatRisk,
                <:PowerNormValueatRisk} = ConditionalValueatRisk()
) -> GenericValueatRiskRange

Keywords correspond to the struct's fields.

The constructor strips the rke flag from both loss and gain via no_risk_expr_risk_measure, since their risk expressions are combined into the outer settings-controlled expression.

Propagated parameters

When factory is called on this type, the following @fprop-tagged fields are automatically propagated:

  • loss: Recursively updated via factory.

  • gain: Recursively updated via factory.

View parameters

When port_opt_view is called on this type, the following @vprop-tagged fields are automatically subset to the selected indices:

Functor

julia
(r::GenericValueatRiskRange)(x::VecNum)

Computes the GenericValueatRiskRange of a portfolio returns vector x.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

julia
julia> GenericValueatRiskRange()
GenericValueatRiskRange
  settings ┼ RiskMeasureSettings
           │   scale ┼ Float64: 1.0
           │      ub ┼ nothing
           │     rke ┴ Bool: true
      loss ┼ ConditionalValueatRisk
           │   settings ┼ RiskMeasureSettings
           │            │   scale ┼ Float64: 1.0
           │            │      ub ┼ nothing
           │            │     rke ┴ Bool: false
           │      alpha ┼ Float64: 0.05
           │          w ┴ nothing
      gain ┼ ConditionalValueatRisk
           │   settings ┼ RiskMeasureSettings
           │            │   scale ┼ Float64: 1.0
           │            │      ub ┼ nothing
           │            │     rke ┴ Bool: false
           │      alpha ┼ Float64: 0.05
           │          w ┴ nothing

Related

source