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
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.
- A tail that reads a return series,
NetReturnsInput, returnsr(x). - A
ValueatRisktail withDistributionValueatRisk,WeightsReturnsFeesInput, returnsr(w). It reads the moments of the prior against the weights.
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 vectorassets × 1, negated for the gain tail.x::VecNum: Net portfolio returns vectorobservations × 1, negated for the gain tail.
Returns
rk::Number: The value of the tail.
Related
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
runchanged. It reads the negated returns, which are the returns of the negated portfolio. - A
ValueatRisktail withDistributionValueatRiskis rebuilt with the law thatgain_tail_distributiongives, the law of the standardised loss of-w. On-w, the rebuilt tail then equals the gain tail of aValueatRiskRangewith the samedist, also for aNormalwith a nonzero mean. A law that is symmetric about zero is its own reflection, so the method returnsritself.
Arguments
r: Gain tail of the range.
Returns
r: The measure to evaluate on the negated portfolio.
Related