Skip to main content

pricing.TabulatedCurve

A tabulated exposure curve: points (x, G(x)) from (0, 0) to

Usage

Source

pricing.TabulatedCurve()

(1, 1), interpolated linearly or log-log, as published curves are given (Salzmann’s homeowners scale, Ludwig’s curves, ISO PSOLD tables, a reinsurer’s own).

The table must be concave (its slopes never increase). Its destruction rate is discrete: the points’ x with probabilities from the drops in slope, and a total loss with probability last slope over first. Its mean rate is the first chord’s, x1 / G(x1), so a table needs fine first points for the expected loss to be right.

With interpolation="log-log" the curve runs as a power law between points (straight on log-log axes), G(x) = G_k (x / x_k) ** p_k, which follows a curve’s bend between sparse points better than a chord; the first piece, from (0, 0), stays straight. The interpolated curve must be concave, so the elasticities p_k may not rise from piece to piece: a table with a total-loss mass at the top (the Swiss Re curves with c up to 3, read at a few points) fails and keeps linear interpolation. The destruction rate is then continuous within each piece past the first.

Parameters

x: list of float

Increasing from 0 to 1.

g: list of float

G(x), from 0 to 1.

interpolation: (linear, log - log) = "linear"

Raises

ValueError
If the points do not run from (0, 0) to (1, 1), or are not increasing and concave.

Examples

>>> from prospicio.pricing import TabulatedCurve
>>> t = TabulatedCurve([0.0, 0.1, 0.5, 1.0], [0.0, 0.4, 0.8, 1.0])
>>> round(t.curve([0.3])[0], 12), t.mean_rate()

(0.6, 0.25)

Attributes

Name Description
g The table’s G(x).
interpolation How the curve runs between its points: "linear" or
x The table’s x.

g

The table’s G(x).

g: list[float]


interpolation

How the curve runs between its points: "linear" or

interpolation: str

"log-log".


x

The table’s x.

x: list[float]

Methods

Name Description
curve() The exposure curve G(x) at each x (clamped to [0, 1]).
from_severity() The exposure curve of severity capped at mpl, tabulated at
layer_share() Share of a risk’s expected loss in the layer limit xs
mean_rate() Mean destruction rate, x1 / G(x1).
rate_quantile() Destruction rate at each probability u in (0, 1).

curve()

The exposure curve G(x) at each x (clamped to [0, 1]).

Usage

Source

curve(x)
Parameters
x: list of float
Returns
list of float

from_severity()

The exposure curve of severity capped at mpl, tabulated at

Usage

Source

from_severity(severity, mpl, points=200)

points points, for a risk profile’s band (which takes an Mbbefd or a TabulatedCurve).

Parameters
severity: a severity
mpl: float

The maximum possible loss.

points: int = 200
At least 4.
Returns
TabulatedCurve
Examples
>>> from prospicio.distributions import Lognormal
>>> from prospicio.pricing import TabulatedCurve
>>> t = TabulatedCurve.from_severity(Lognormal.from_mean_cv(1e5, 2.0), 1e6)
>>> t.x[0], t.x[-1], t.g[-1]

(0.0, 1.0, 1.0)


layer_share()

Share of a risk’s expected loss in the layer limit xs

Usage

Source

layer_share(limit, attachment, mpl)

attachment, for a risk with maximum possible loss mpl.

Parameters
limit: float
attachment: float
mpl: float
Returns
float

mean_rate()

Mean destruction rate, x1 / G(x1).

Usage

Source

mean_rate()
Returns
float

rate_quantile()

Destruction rate at each probability u in (0, 1).

Usage

Source

rate_quantile(u)
Parameters
u: list of float
Returns
list of float