Skip to contents

The Shapley value of the game whose cost is cost of each sub-portfolio, for any cost function, not only a distortion: a standard deviation premium, a variance, an expected utility. cost is called with the sub-portfolio's total in each simulation, in simulation order, once for each of the 2^m - 1 non-empty sub-portfolios (the empty one costs 0).

Usage

shapley_allocation(x, cost)

Arguments

x

A predictive_distribution with at most 12 components.

cost

A function of a numeric vector of draws returning a number.

Value

As capital_allocation(): total (cost of the portfolio), diversification_benefit and by_component with standalone, allocated (the Shapley values, summing to total) and diversification.

Examples

pd <- predictive_distribution(
  matrix(c(1, 4, 2, 3, 2, 1, 5, 6), ncol = 2),
  data.frame(lob = c("motor", "property"))
)
sd_premium <- function(x) mean(x) + sqrt(mean((x - mean(x))^2))
shapley_allocation(pd, sd_premium)$by_component
#>        lob standalone allocated diversification
#> 1    motor   3.618034  3.146275       0.4717594
#> 2 property   5.561553  5.089793       0.4717594