## reserving.Mack


Mack's distribution-free chain ladder: the chain-ladder projection plus


Usage


``` python
reserving.Mack()
```


the standard error of each origin's reserve and of the total, split into process and parameter risk (Mack 1993, 1999).

A tail other than 1 is one more development step, from the oldest age to ultimate, with its own sigma and standard error, as R ChainLadder's `MackChainLadder(tail = ...)`; unless given, both are extrapolated log-linearly. Every origin, the oldest included, carries the tail's risk. A tail below 1 follows chainladder-python: it scales the ultimates and carries the risk read where a tail of 1.001 would be. R's `MackChainLadder` ignores a tail below 1 altogether.


## Parameters


`average: (volume, simple, regression) = ``"volume"`  

`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.

`tail_sigma: float`  
The tail's sigma (R's `tail.sigma`); extrapolated if not given. Unused when the tail factor is 1.

`tail_std_err: float`  
The tail factor's standard error (R's `tail.se`); extrapolated if not given. Unused when the tail factor is 1.


## Examples

``` python
>>> from prospicio.reserving import Mack, Triangle
>>> tri = Triangle.from_long(
...     [2020] * 4 + [2021] * 3 + [2022] * 2 + [2023],
...     [12, 24, 36, 48, 12, 24, 36, 12, 24, 12],
...     [100.0, 150.0, 165.0, 170.0, 110.0, 170.0, 180.0, 120.0, 175.0, 130.0],
... )
>>> fit = Mack().fit(tri, "values")
>>> fit.total_standard_error > 0 and fit.standard_error[0] == 0
```

True


## Attributes

| Name | Description |
|----|----|
| [average](#average) | How link ratios are averaged. |
| [sigma_interpolation](#sigma_interpolation) | How unestimable variance parameters are filled in. |
| [tail](#tail) | The tail: a constant factor as a number, otherwise its estimator. |
| [tail_sigma](#tail_sigma) | The given tail sigma, or `None` to extrapolate it. |
| [tail_std_err](#tail_std_err) | The given standard error of the tail factor, or `None` to |

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


#### average


How link ratios are averaged.


`average: str`


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


#### 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`


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


#### tail_sigma


The given tail sigma, or `None` to extrapolate it.


`tail_sigma: float | None`


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


#### tail_std_err


The given standard error of the tail factor, or `None` to


`tail_std_err: float | None`


extrapolate it.


## Methods

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

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


#### fit()


Fits one measure column in every segment of a triangle, each on its


Usage


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


own.


##### Parameters


`triangle: Triangle`  

`column: str`  


##### Returns


`MackFit`  


##### Raises


`ValueError`  
As [ChainLadder.fit](reserving.ChainLadder.md#prospicio.reserving.ChainLadder.fit), and if the triangle has fewer than three ages, a variance parameter can be neither estimated nor interpolated, or the tail's sigma or standard error can neither be extrapolated nor is given.
