risk.Distortion

A distortion risk measure: rho(X) = integral of g(S(x)) dx for a

Usage

risk.Distortion()

concave distortion g of the survival function.

Make one with Distortion.tvar, Distortion.wang, Distortion.proportional_hazard, Distortion.dual_power or Distortion.exponential. Every one is coherent, and each has a parameter value that gives the mean (or a limit that does).

Examples

>>> from prospicio.distributions import Sampled
>>> from prospicio.risk import Distortion
>>> x = Sampled([1.0, 2.0, 3.0, 4.0])
>>> Distortion.tvar(0.5).measure(x)

3.5

>>> Distortion.tvar(0.5).weights(4)

[0.0, 0.0, 0.5, 0.5]

Methods

Name Description
dual_power() Dual power transform: g(s) = 1 - (1 - s)**beta.
exponential() Exponential spectral measure: g(s) = (1 - exp(-k s)) / (1 - exp(-k)),
g() The distortion g(s) of a survival probability s.
measure() The risk measure of a distribution.
proportional_hazard() Proportional hazard transform: g(s) = s**rho.
tvar() Tail value at risk at level p: g(s) = min(s / (1 - p), 1).
wang() Wang transform: g(s) = Phi(Phi^-1(s) + lambda).
weights() Weights for n equally likely values sorted ascending.

dual_power()

Dual power transform: g(s) = 1 - (1 - s)**beta.

Usage

dual_power(beta)
Parameters
beta: float
>= 1.
Returns
Distortion

exponential()

Exponential spectral measure: g(s) = (1 - exp(-k s)) / (1 - exp(-k)),

Usage

exponential(k)

risk aversion that grows exponentially towards the worst outcomes.

Parameters
k: float
Risk aversion, positive; the mean as k -> 0.
Returns
Distortion

g()

The distortion g(s) of a survival probability s.

Usage

g(s)
Parameters
s: float
Returns
float

measure()

The risk measure of a distribution.

Usage

measure(dist)
Parameters
dist: (Sampled, Grid or PredictiveDistribution)
A predictive distribution is measured on its total.
Returns
float

proportional_hazard()

Proportional hazard transform: g(s) = s**rho.

Usage

proportional_hazard(rho)
Parameters
rho: float
In (0, 1].
Returns
Distortion

tvar()

Tail value at risk at level p: g(s) = min(s / (1 - p), 1).

Usage

tvar(p)
Parameters
p: float
In [0, 1].
Returns
Distortion

wang()

Wang transform: g(s) = Phi(Phi^-1(s) + lambda).

Usage

wang(lam)
Parameters
lam: float
Market price of risk, >= 0.
Returns
Distortion

weights()

Weights for n equally likely values sorted ascending.

Usage

weights(n)
Parameters
n: int
Returns
list of float
Non-negative, summing to 1.