Skip to contents

A concave distortion g of the survival function, giving the coherent risk measure rho(X) = integral of g(S(x)) dx.

Usage

distortion(
  kind = c("tvar", "wang", "proportional_hazard", "dual_power", "exponential", "ccoc",
    "tsallis", "bitvar", "weighted_tvar", "capped_linear", "capped_log_linear", "lep",
    "linear_yield", "beta"),
  param,
  weights = NULL,
  r0 = 0,
  ptr = NULL
)

Arguments

kind

The kind of distortion; see the table. aggregate's short names "ph", "dual", "exp", "clin", "cll", "ly" and "wtdtvar" are taken too, as in Python and Excel.

param

The distortion's parameter or parameters.

weights

For "weighted_tvar", the weights of the levels in param: non-negative, summing to 1.

r0

For "capped_linear", "capped_log_linear", "lep" and "linear_yield": the intercept, a minimum rate on line.

ptr

Internal.

Value

A distortion object with kind and param properties, and parameters, the scalar parameters by name as the constructor takes them (for example c(rho = 0.7), or c(r0 = 0.1, slope = 2); empty for weighted TVaR, mixtures, minimums and convex envelopes), and parameter, the one parameter of a family with one (NA for a family with several or none), and gini, the Gini index 2 * integral(g) - 1 (0 for the mean, 1 for the maximum; see distortion_from_gini()). Use it with risk_measure() and allocate().

Details

kindg(s) for 0 < s < 1param
"tvar"min(s / (1 - p), 1)p in [0, 1]
"wang"pnorm(qnorm(s) + lambda)lambda >= 0
"proportional_hazard"s^rhorho in (0, 1]
"dual_power"1 - (1 - s)^betabeta >= 1
"exponential"(1 - exp(-k s)) / (1 - exp(-k))k > 0
"ccoc"min(1, d + (1 - d) s), d = r / (1 + r)0 <= r
"tsallis"(alpha s - s^alpha) / (alpha - 1), s (1 - log s) at alpha = 1alpha > 0
"bitvar"(1 - w) TVaR_p0 + w TVaR_p1c(p0, p1, w)
"weighted_tvar"sum(w_i min(s / (1 - p_i), 1))the levels p_i; weights the w_i
"capped_linear"min(1, r0 + slope s)slope, with r0
"capped_log_linear"min(1, exp(r0) s^b)b in (0, 1], with r0
"lep"min(1, d0 + (1 - d0) s + (d - d0) sqrt(s (1 - s)))r0 <= r, with r0
"linear_yield"(r0 + (1 + r) s) / (1 + r0 + r s)0 <= r, with r0
"beta"the Beta(a, b) distribution functionc(a, b), a <= 1 <= b

"ccoc" is the constant cost of capital: the price of a loss X backed by assets max X is (E[X] + r max X) / (1 + r). It and the kinds with r0 > 0 put a probability mass on the largest outcome (distortion_mass()). "tsallis", the Beta(alpha, 1) mixture of TVaRs, prices at the mean plus the cumulative residual Tsallis entropy of order alpha (aggregate 2.1.0); alpha = 2 is dual_power(2). See also distortion_mixture(), distortion_minimum(), distortion_convex() and calibrate_distortion().

Examples

d <- distortion("wang", 0.5)
d@parameters
#> lambda 
#>    0.5 
d@parameter
#> [1] 0.5
risk_measure(sampled(c(10, 20, 30, 40, 50)), d)
#> [1] 36.48249
distortion_g(distortion("dual_power", 2), 0.3)
#> [1] 0.51
distortion("tsallis", 3)@gini # 1 / (3 + 1)
#> [1] 0.25
risk_measure(sampled(c(1, 2, 3, 4)), distortion("ccoc", 0.25)) # (2.5 + 0.25 * 4) / 1.25
#> [1] 2.8