Generic Value at Risk Range: private API

PortfolioOptimisers.ValueatRiskRMs — Type
ValueatRiskRMs = Union{ValueatRisk, ConditionalValueatRisk,
                         DistributionallyRobustConditionalValueatRisk,
                         EntropicValueatRisk, WorstRealisation,
                         RelativisticValueatRisk, PowerNormValueatRisk}

Union of the tail measures of the returns that GenericValueatRiskRange accepts as its loss tail and as its gain tail.

Each member measures one tail of a return series, so the range can apply it to the returns for the losses and to the negated returns for the gains. A range measure, a drawdown measure and a dispersion measure are not members, because none of them measures one tail of the returns.

Related

source
PortfolioOptimisers.range_tail_risk — Function
range_tail_risk(r::ValueatRiskRMs, w::VecNum, x::VecNum)
range_tail_risk(r::ValueatRisk{<:Any, <:Any, <:Any, <:DistributionValueatRisk},
                w::VecNum, x::VecNum)

Evaluate one tail of a GenericValueatRiskRange on the input that the tail reads.

The functor of the range on the weights calls this function once for each tail. It passes w and the net returns x for the loss tail, and gain_tail_measure of the gain tail, -w and -x for the gain tail.

The gain tail of a returns measure reads -x, not the net returns of -w. A fee does not change sign with the weights, so the two series are different when the portfolio pays a fee.

Arguments

  • r: Tail measure.
  • w::VecNum: Portfolio weights vector assets × 1, negated for the gain tail.
  • x::VecNum: Net portfolio returns vector observations × 1, negated for the gain tail.

Returns

  • rk::Number: The value of the tail.

Related

source
PortfolioOptimisers.gain_tail_measure — Function
gain_tail_measure(r::ValueatRiskRMs)
gain_tail_measure(r::ValueatRisk{<:Any, <:Any, <:Any, <:DistributionValueatRisk})

Return the measure that the gain tail of a GenericValueatRiskRange evaluates on the negated portfolio.

  • A tail that reads a return series returns r unchanged. It reads the negated returns, which are the returns of the negated portfolio.
  • A ValueatRisk tail with DistributionValueatRisk is rebuilt with the law that gain_tail_distribution gives, the law of the standardised loss of -w. On -w, the rebuilt tail then equals the gain tail of a ValueatRiskRange with the same dist, also for a Normal with a nonzero mean. A law that is symmetric about zero is its own reflection, so the method returns r itself.

Arguments

  • r: Gain tail of the range.

Returns

  • r: The measure to evaluate on the negated portfolio.

Related

source