risk.calibrate()
The member of a distortion family whose price of dist is premium.
Usage
risk.calibrate(
family,
dist,
premium,
assets=None,
r0=0.0,
)Parameters
family: str-
"ccoc","ph","wang","tsallis","dual","tvar","exp","clin","cll","lep"or"ly". dist: (Sampled, Grid or PredictiveDistribution)-
A predictive distribution is priced on its total.
premium: float-
The target price, strictly between the (capped) mean and maximum.
assets: float = None-
Price the loss capped at the assets,
min(X, assets). r0: float = 0.0-
The fixed
r0of theclin,cll, lep andlyfamilies.
Returns
Distortion
Examples
>>> from prospicio.distributions import Sampled
>>> from prospicio.risk import calibrate
>>> x = Sampled([22, 28, 36, 40, 40, 40, 40, 55, 65, 100])
>>> premium = (46.6 + 0.15 * 100) / 1.15
>>> d = calibrate("proportional_hazard", x, premium)
>>> round(d.measure(x), 9) == round(premium, 9)True