risk.haircut()
The haircut allocation of an exogenous total (a premium, a capital
Usage
risk.haircut(
pd,
total,
measure,
level,
)amount): each component’s stand-alone measure at level, scaled to add up to total (Pricing Insurance Risk, section 12.2.3).
Parameters
Returns
LevelAllocation
Raises
ValueError- For a level out of range, a mean that is not positive (EPD) or stand-alone measures summing to 0.
Examples
>>> from prospicio.distributions import PredictiveDistribution
>>> from prospicio.risk import haircut
>>> pd = PredictiveDistribution(["lob"], [("motor",), ("property",)],
... [[1.0, 2.0], [4.0, 1.0], [2.0, 5.0], [3.0, 6.0]])
>>> haircut(pd, 18.0, "tvar", 0.5).allocated[7.0, 11.0]