Allocate a risk measure to components
allocate.RdEuler allocation by co-measure: simulations are ranked by their total,
and each component gets the distortion-weighted sum of its own draws.
The contributions add up to risk_measure(x, distortion); for
distortion("tvar", p) they are the CoTVaRs,
E[X_j | total in its top 1 - p]. Simulations tied on the total share
their weights. The components must add up to the portfolio being
allocated.
Arguments
- x
- distortion
A distortion.
- ...
Unused; for methods.
Examples
pd <- predictive_distribution(
matrix(c(1, 4, 2, 3, 2, 1, 5, 6), ncol = 2),
data.frame(lob = c("motor", "property"))
)
allocate(pd, distortion("tvar", 0.5))
#> lob contribution
#> 1 motor 2.5
#> 2 property 5.5