Skip to main content

risk.equal_risk()

The equal risk allocation of an exogenous total: the one level at

Usage

risk.equal_risk(
    pd,
    total,
    measure,
)

which the components’ stand-alone measures add up to total, each getting its own (Pricing Insurance Risk, section 12.2.4). For VaR and TVaR this prices the components as if comonotonic; for EPD each has the same EPD ratio.

A VaR of draws moves in steps: where no level adds up exactly, the level is the lowest that reaches total and its VaRs are scaled to it.

Parameters

pd: PredictiveDistribution
total: float
measure: str
"var", "tvar" or "epd".

Returns

LevelAllocation
With the level found.

Raises

ValueError
When no level makes the stand-alone measures add up to total.

Examples

>>> from prospicio.distributions import PredictiveDistribution
>>> from prospicio.risk import equal_risk
>>> pd = PredictiveDistribution(["lob"], [("motor",), ("property",)],
...                             [[1.0, 2.0], [4.0, 1.0], [2.0, 5.0], [3.0, 6.0]])
>>> round(equal_risk(pd, 9.0, "tvar").level, 9)

0.5