## reserving.Benktander


The Benktander (iterated Bornhuetter-Ferguson) method: starting from


Usage


``` python
reserving.Benktander()
```


`U(0) = apriori * exposure`, `U(k) = latest + (1 - 1 / cdf) * U(k-1)` for [n_iters](reserving.Benktander.md#prospicio.reserving.Benktander.n_iters) steps, as chainladder-python's [Benktander](reserving.Benktander.md#prospicio.reserving.Benktander). `n_iters=0` is the expected loss method, 1 is Bornhuetter-Ferguson, and many iterations approach the chain ladder. The steps are summed in closed form, so a large [n_iters](reserving.Benktander.md#prospicio.reserving.Benktander.n_iters) is cheap; where an origin's [cdf](risk.Gpd.md#prospicio.risk.Gpd.cdf) is below 1/2 they diverge instead.


## Parameters


`apriori: float = ``1.0`  
Expected loss ratio of the starting ultimate; positive.

`n_iters: int = ``1`  
Number of Bornhuetter-Ferguson steps.

`average: (volume, simple, regression) = ``"volume"`  
How link ratios are averaged, as in [ChainLadder](reserving.ChainLadder.md#prospicio.reserving.ChainLadder).

`sigma_interpolation: (log - linear, mack) = ``"log-linear"`  

`tail: (float, TailConstant, TailCurve, TailBondy or TailLogLinear)`  
As [ChainLadder](reserving.ChainLadder.md#prospicio.reserving.ChainLadder); no tail by default.


## Examples

``` python
>>> from prospicio.reserving import Benktander, Triangle
>>> tri = Triangle.from_long(
...     [2020, 2020, 2021], [12, 24, 12],
...     {"paid": [100.0, 150.0, 200.0], "premium": [250.0, 250.0, 400.0]},
... )
>>> fit = Benktander(apriori=0.5, n_iters=2).fit(tri, "paid", "premium")
>>> [round(u, 2) for u in fit.ultimate]
```

\[150.0, 288.89\]


## Attributes

| Name | Description |
|----|----|
| [apriori](#apriori) | Expected loss ratio of the starting ultimate. |
| [average](#average) | How link ratios are averaged. |
| [n_iters](#n_iters) | Number of Bornhuetter-Ferguson steps. |
| [sigma_interpolation](#sigma_interpolation) | How unestimable variance parameters are filled in. |
| [tail](#tail) | The tail: a constant factor as a number, otherwise its estimator. |

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


#### apriori


Expected loss ratio of the starting ultimate.


`apriori: float`


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


#### average


How link ratios are averaged.


`average: str`


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


#### n_iters


Number of Bornhuetter-Ferguson steps.


`n_iters: int`


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


#### sigma_interpolation


How unestimable variance parameters are filled in.


`sigma_interpolation: str`


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


#### tail


The tail: a constant factor as a number, otherwise its estimator.


`tail: Any`


## Methods

| Name | Description |
|----|----|
| [fit()](#fit) | Fits one loss column in every segment of a triangle, each with its |

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


#### fit()


Fits one loss column in every segment of a triangle, each with its


Usage


``` python
fit(triangle, column, exposure)
```


own exposure.


##### Parameters


`triangle: Triangle`  

`column: str`  
The losses to project.

`exposure: str`  
The exposure column; each origin's latest observed cumulative value is its exposure (an incremental triangle's is cumulated).


##### Returns


`ExpectedLossFit`  


##### Raises


`ValueError`  
As [ExpectedLoss.fit](reserving.ExpectedLoss.md#prospicio.reserving.ExpectedLoss.fit).
