pricing.price()
Risk-loaded price of a cover from its simulated losses.
Usage
pricing.price(
losses,
assets,
*,
cost_of_capital=None,
distortion=None,
)The assets backing the loss are a distortion risk measure of it. The premium is either a pricing distortion of the loss, or set by a constant cost of capital r on the capital a - P, which gives P = (E[X] + r a) / (1 + r).
Parameters
losses: (Sampled, PredictiveDistribution or Grid)-
Loss draws (for a PredictiveDistribution, its total), or a loss distribution on a grid, such as a layer’s exact annual loss from Tower.on_grid.
assets: Distortion-
The measure that sets the assets, for example
Distortion.tvar(0.99). cost_of_capital: float = None-
Positive rate. Give this or
distortion. distortion: Distortion = None- Pricing distortion; it must load less than assets.
Returns
Price
Raises
ValueError- Unless exactly one rule is given, or if the premium exceeds the assets.
Examples
>>> from prospicio.distributions import Sampled
>>> from prospicio.pricing import price
>>> from prospicio.risk import Distortion
>>> p = price(Sampled([0.0, 0.0, 2.0, 6.0]), Distortion.tvar(0.5), cost_of_capital=0.25)
>>> p.premium, p.capital(2.4, 1.6)
>>> from prospicio.distributions import Grid
>>> g = price(Grid(2.0, [0.5, 0.25, 0.0, 0.25]), Distortion.tvar(0.5), cost_of_capital=0.25)
>>> round(g.premium, 12)2.4