Risk Measure Tools

PortfolioOptimisers.unit_scale_risk_measure — Function
unit_scale_risk_measure(r::AbstractBaseRiskMeasure)

Return a copy of the risk measure r with scale = one(scale), and keep its bound and rke.

scale weighs one measure against the other measures of a vector. One measure has no other measure to weigh against, so set_risk_constraints! takes this copy before it builds the risk of one measure. A field that the table does not name keeps its value.

MeasureChangedKept
RiskMeasure, VarianceSkewKurtosis, GenericValueatRiskRange and UncertaintySetVariance among themsettings.scale = one(settings.scale)settings.ub, settings.rke, and every field of each child
Skewnesssettings.scale = one(settings.scale)settings.lb, settings.rke
HierarchicalRiskMeasure, NonOptimisationRiskMeasurenothingevery field

VarianceSkewKurtosis and GenericValueatRiskRange keep the scale of each child, because that scale weighs the term of the child inside its parent. A measure that already has a unit scale returns as r itself, with no copy.

Arguments

  • r: The risk measure.

Returns

  • r_new: The measure with a unit scale.

Examples

julia> r = ConditionalValueatRisk(; settings = RiskMeasureSettings(; ub = 0.1, scale = 2.0));julia> unit_scale_risk_measure(r).settingsRiskMeasureSettings  scale ┼ Float64: 1.0     ub ┼ Float64: 0.1    rke ┴ Bool: true

Related

source