## pricing.LargeLossExperience


A record of individual large losses, for experience rating.


Usage

``` python
pricing.LargeLossExperience()
```


Develop each known loss to ultimate (optional) and trend it to the prospective period with [prepare](pricing.LargeLossExperience.md#prospicio.pricing.LargeLossExperience.prepare), then apply each year's treaty and develop the layer totals with [PreparedLosses.burning_cost](pricing.PreparedLosses.md#prospicio.pricing.PreparedLosses.burning_cost). The steps follow Clark's *Basics of Reinsurance Pricing* (CAS study note).


## Parameters


`ids: list of str`  
An identifier per loss.

`accident: list of float`  
Each loss's accident date as a decimal year (see [year_fraction](pricing.year_fraction.md#prospicio.pricing.year_fraction)).

`amount: list of float`  
Each loss's amount, incurred at the latest valuation.

`threshold: float = ``0.0`  
The reporting threshold of the record, in nominal terms. With a threshold, losses trended below it times the largest trend factor are left out, so every year is complete on the same basis.

`valuation: float`  
The date the amounts were valued at, a decimal year; needed to develop the losses by a [DevelopmentPattern](pricing.DevelopmentPattern.md#prospicio.pricing.DevelopmentPattern) at their ages.

`fx: float or list of float`  
Converts the losses to the pricing currency before development and trend: a stated rate, or a rate per loss (units of the pricing currency per unit of the loss's). The threshold stays in the reported currency.


## Examples

``` python
>>> from prospicio.pricing import LargeLossExperience
>>> from prospicio.reinsurance import Layer, Tower
>>> e = LargeLossExperience(["a", "b"], [1995.5, 1996.5], [150.0, 400.0])
>>> p = e.prepare(factors=[1.0, 1.0])
>>> tower = Tower([Layer("200x100", 200.0, 100.0)])
>>> b = p.burning_cost(tower, [1995, 1996], premium=[1000.0, 1000.0], development=[1.0, 1.5])
>>> b.to_dict()["developed"]
```

\[\[50.0\], \[300.0\]\]

``` python
>>> round(b.loss_cost[0], 4)
```

0.175


## Attributes

| Name | Description |
|----|----|
| [threshold](#threshold) | The reporting threshold. |
| [valuation](#valuation) | The valuation date, or `None`. |

------------------------------------------------------------------------


#### threshold


The reporting threshold.


`threshold: float`


------------------------------------------------------------------------


#### valuation


The valuation date, or `None`.


`valuation: float | None`


## Methods

| Name | Description |
|----|----|
| [prepare()](#prepare) | Develop every loss to ultimate, if asked, and trend it to the |

------------------------------------------------------------------------


#### prepare()


Develop every loss to ultimate, if asked, and trend it to the


Usage

``` python
prepare(*, rate=None, to=None, factors=None, development=None)
```


prospective period.

Pass either an annual [rate](pricing.CasualtyProfile.md#prospicio.pricing.CasualtyProfile.rate) with the date `to` (the average accident date of the prospective period, a decimal year), for factors `(1 + rate) ** (to - accident)`, or a factor per loss.


##### Parameters


`rate: float = None`  

`to: float = None`  

`factors: list of float = None`  

`development: DevelopmentPattern or list of float = None`  
Develops each known loss to ultimate (IBNER): a pattern, read at each loss's age at the valuation date, or a factor per loss. Then give [burning_cost](pricing.PreparedLosses.md#prospicio.pricing.PreparedLosses.burning_cost) only the count IBNR factors, not an excess development factor that already holds IBNER.


##### Returns


`PreparedLosses`  


##### Raises


`TypeError`  
If neither or both of [rate](pricing.CasualtyProfile.md#prospicio.pricing.CasualtyProfile.rate) (with `to`) and [factors](pricing.DevelopmentPattern.md#prospicio.pricing.DevelopmentPattern.factors) are given.
