## pricing.match_tower()


Matches a tower of contiguous layers, the last unlimited, with one


Usage


``` python
pricing.match_tower(
    attachments, layer_losses, frequencies=None, rule="minimize"
)
```


frequency and a piecewise Pareto severity (Riegel 2018).


## Parameters


`attachments: list of float`  
Increasing attachment points; layer `i` runs to the next one, the last is unlimited.

`layer_losses: list of float`  
Expected loss a year of each layer.

`frequencies: list of float or None = None`  
Expected losses a year above each attachment point; `None` (or a `None` entry) to derive them.

`rule: (minimize, midpoint) = ``"minimize"`  
How the free threshold inside each layer is chosen.


## Returns


`TowerModel`  


## Examples

``` python
>>> from prospicio.pricing import match_tower
>>> m = match_tower([1000.0, 1500.0, 2000.0], [100.0, 90.0, 120.0], [0.25, None, None])
>>> round(m.layer_loss(500.0, 1500.0), 9)
```

90.0
