reinsurance.Layer
A per-occurrence excess-of-loss layer: limit xs attachment on each
Usage
reinsurance.Layer()loss, then annual terms.
For one year, ceded = share * min(max(sum of per-loss recoveries - aggregate_deductible, 0), aggregate_limit), less any loss corridor (with_loss_corridor) before the annual limit.
Parameters
name: strlimit: float-
Per-occurrence limit; may be
inf. attachment: floatshare: float = 1.0-
Placed share, in
(0, 1]. aggregate_deductible: float = 0.0aggregate_limit: float = infreinstatements: int-
Free reinstatements: sets aggregate_limit to
limit * (reinstatements + 1); cannot be combined with aggregate_limit. premium: float = 0.0-
Upfront premium for the placed share; used only by reinstatement_rates.
reinstatement_rates: list of float-
Paid reinstatements, one rate per reinstatement as a fraction of premium (1.0 is 100%), pro rata as to amount. Sets aggregate_limit to
limit * (len(reinstatement_rates) + 1); cannot be combined with aggregate_limit orreinstatements. pro_rata_time: bool = False-
Paid reinstatements also pro rata as to time: the limit a loss at time t (the fraction of the year elapsed) uses up is charged at
1 - t. Needs reinstatement_rates, and events with times (EventSet.with_uniform_times, ortimes=in EventSet.from_years).
Raises
ValueError-
If a term is out of range, or more than one of aggregate_limit,
reinstatementsand reinstatement_rates is given.
Examples
>>> from prospicio.reinsurance import Layer
>>> layer = Layer("5x5", 5e6, 5e6, reinstatements=1)
>>> layer.ceded([7e6])2000000.0
>>> layer.ceded([12e6, 20e6, 30e6])10000000.0
>>> paid = Layer("10x10", 10.0, 10.0, premium=2.0, reinstatement_rates=[1.0, 0.5])
>>> paid.reinstatement_premium([22.0, 12.0])2.2
>>> timed = Layer("10x10", 10.0, 10.0, premium=2.0, reinstatement_rates=[1.0, 0.5],
... pro_rata_time=True)
>>> round(timed.reinstatement_premium([22.0, 12.0], times=[0.25, 0.5]), 12)1.6
Attributes
| Name | Description |
|---|---|
| aggregate_deductible | Annual aggregate deductible. |
| aggregate_limit | Annual aggregate limit. |
| attachment | Per-occurrence attachment. |
| limit | Per-occurrence limit. |
| loss_corridor |
The loss corridor as (lower, upper, retained), or None.
|
| name | Layer name. |
| needs_sums_insured | Whether the layer is a surplus treaty, which needs sums insured. |
| premium | Upfront premium for the placed share. |
| pro_rata_time | Whether paid reinstatements are pro rata as to time. |
| reinstatement_rates | Rate of each paid reinstatement; empty when reinstatements are free. |
| share | Placed share. |
aggregate_deductible
Annual aggregate deductible.
aggregate_deductible: float
aggregate_limit
Annual aggregate limit.
aggregate_limit: float
attachment
Per-occurrence attachment.
attachment: float
limit
Per-occurrence limit.
limit: float
loss_corridor
The loss corridor as (lower, upper, retained), or None.
loss_corridor: tuple[float, float, float] | None
name
Layer name.
name: str
needs_sums_insured
Whether the layer is a surplus treaty, which needs sums insured.
needs_sums_insured: bool
pro_rata_time
Whether paid reinstatements are pro rata as to time.
pro_rata_time: bool
reinstatement_rates
Rate of each paid reinstatement; empty when reinstatements are free.
reinstatement_rates: list[float]
Methods
| Name | Description |
|---|---|
| ceded() | Ceded loss for one year’s losses. |
| ceded_by_event() | Ceded loss per event for one year, taking losses as chronological. |
| ceded_with_sums_insured() | Ceded loss for one year’s losses on risks with the given sums |
| quota_share() |
A quota share ceding cession of every loss.
|
| reinstatement_premium() | Reinstatement premium for one year’s losses. |
| stop_loss() |
An aggregate stop-loss: limit xs retention on the year’s total.
|
| surplus() | A surplus treaty: each risk cedes the part of its sum insured above |
| with_loss_corridor() | The same layer with a loss corridor. |
ceded()
Ceded loss for one year’s losses.
Usage
ceded(losses)Parameters
losses: list of float
Returns
float
ceded_by_event()
Ceded loss per event for one year, taking losses as chronological.
Usage
ceded_by_event(losses)The annual deductible absorbs the first recoveries and the annual limit stops the last ones; the entries sum to ceded(losses).
Parameters
losses: list of float
Returns
list of float
Examples
>>> from prospicio.reinsurance import Layer
>>> layer = Layer("L", 10.0, 5.0, aggregate_deductible=4.0, aggregate_limit=15.0)
>>> layer.ceded_by_event([8.0, 20.0, 12.0])[0.0, 9.0, 6.0]
ceded_with_sums_insured()
Ceded loss for one year’s losses on risks with the given sums
Usage
ceded_with_sums_insured(losses, sums_insured)insured, one per loss.
Parameters
losses: list of floatsums_insured: list of float
Returns
float
stop_loss()
An aggregate stop-loss: limit xs retention on the year’s total.
Usage
stop_loss(name, limit, retention)Covers the total of the losses it sees: gross, or net of earlier stages in an inuring Tower.
Parameters
name: strlimit: float-
Annual limit; may be
inf. retention: float
Returns
Layer
Examples
>>> from prospicio.reinsurance import Layer
>>> Layer.stop_loss("SL", 50.0, 100.0).ceded([60.0, 70.0])30.0
surplus()
A surplus treaty: each risk cedes the part of its sum insured above
Usage
surplus(name, retention, lines)the retention line retention, up to lines lines, and the same share of every loss on it.
With a retention of 1m and 9 lines (a capacity of 9m), a 5m risk cedes 80% and a 20m risk 45%. The events must carry sums insured (EventSet.from_years(..., sums_insured=...)); it can inure to a per-risk excess of loss in a later stage of a Tower.
Parameters
name: strretention: float-
The retention line; positive.
lines: float- Number of lines of capacity; positive.
Returns
Layer
Examples
>>> from prospicio.reinsurance import Layer
>>> s = Layer.surplus("surplus", 1e6, 9.0)
>>> round(s.ceded_with_sums_insured([2e6, 2e6], [5e6, 20e6]))2500000
with_loss_corridor()
The same layer with a loss corridor.
Usage
with_loss_corridor(lower, upper, retained=1.0)Of the annual layer loss at 100% after the annual deductible, the cedant keeps retained of the part between lower and upper; the annual limit then caps what is left, so the reinsurer still pays up to the full annual limit. Reinstatement premiums follow the loss after the corridor. A corridor quoted as loss ratios lr on the reinsurer’s premium P for a placed share s is lr * P / s (for a quota share, P / s is the subject premium).
Parameters
lower: float-
Non-negative.
upper: float-
Finite, above lower.
retained: float = 1.0-
Share of the band the cedant keeps, in
(0, 1].
Returns
Layer
Examples
>>> from prospicio.reinsurance import Layer
>>> qs = Layer.quota_share("QS", 0.3).with_loss_corridor(70.0, 90.0)
>>> round(qs.ceded([50.0, 30.0]), 12), round(qs.ceded([120.0]), 12)(21.0, 30.0)