## reserving.MackBootstrapFit


A fitted bootstrap of Mack's model, the lifetime view, of every


Usage


``` python
reserving.MackBootstrapFit()
```


segment ([MackBootstrap.fit](reserving.MackBootstrap.md#prospicio.reserving.MackBootstrap.fit)).

[reserves](reserving.OdpBootstrapFit.md#prospicio.reserving.OdpBootstrapFit.reserves) is one joint distribution with the triangle's keys and `"origin"` as dimensions, so `reserves.aggregate(["lob"])` keeps the dependence between segments. Per-origin lists run over the origins of each segment in turn, like the rows of [to_frame()](reserving.MackFit.md#prospicio.reserving.MackFit.to_frame) and the components of [reserves](reserving.OdpBootstrapFit.md#prospicio.reserving.OdpBootstrapFit.reserves). [residuals](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.residuals) needs a single-segment fit; for several segments use `segment(...)`.


## Attributes

| Name | Description |
|----|----|
| [chain_ladder](#chain_ladder) | The chain ladder of Mack's model (its averaging): the reserves the |
| [development](#development) | Development ages in months. |
| [index](#index) | Label of each segment, as [Triangle.index](reserving.Triangle.md#prospicio.reserving.Triangle.index). |
| [keys](#keys) | Names of the triangle's key columns; empty without keys. |
| [mack](#mack) | Mack's model on the observed triangle, without a tail: the factors |
| [origins](#origins) | Origin period of each per-origin value and reserve component. |
| [reserves](#reserves) | Joint distribution of the reserve (each origin's last simulated |
| [residuals](#residuals) | Mack's scaled bias-adjusted residuals of the link ratios, |

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


#### chain_ladder


The chain ladder of Mack's model (its averaging): the reserves the


`chain_ladder: ChainLadderFit`


bootstrap's mean equals with `centre_residuals=True`, the default.


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


#### development


Development ages in months.


`development: list[int]`


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


#### index


Label of each segment, as [Triangle.index](reserving.Triangle.md#prospicio.reserving.Triangle.index).


`index: list[Any]`


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


#### keys


Names of the triangle's key columns; empty without keys.


`keys: list[str]`


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


#### mack


Mack's model on the observed triangle, without a tail: the factors


`mack: MackFit`


and sigmas the simulation uses, and the analytic standard errors the simulated standard deviations approximate.


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


#### origins


Origin period of each per-origin value and reserve component.


`origins: list[str]`


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


#### reserves


Joint distribution of the reserve (each origin's last simulated


`reserves: PredictiveDistribution`


cumulative value less its latest) by segment and origin: the triangle's keys and `"origin"` are its dimensions, one component per segment and origin, one row per simulation. Its [mean](risk.Gpd.md#prospicio.risk.Gpd.mean) and [quantile](risk.Gpd.md#prospicio.risk.Gpd.quantile) describe the total reserve. Columns of [draw_matrix()](distributions.PredictiveDistribution.md#prospicio.distributions.PredictiveDistribution.draw_matrix) follow [origins](reserving.MackFit.md#prospicio.reserving.MackFit.origins).


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


#### residuals


Mack's scaled bias-adjusted residuals of the link ratios,


`residuals: list[list[float]]`


`[origin][development]`, `[o][k]` the link from age `k` to `k + 1`; `nan` where there is none, from a zero, or behind a factor with a single link ratio or a zero sigma. Never centred.


## Methods

| Name | Description |
|----|----|
| [development_frame()](#development_frame) | The chain ladders' development factors, one row per segment and |
| [segment()](#segment) | The bootstrap of one segment, chosen by key values as |
| [to_frame()](#to_frame) | One row per segment and origin: the key columns, `origin`, the |
| [totals_frame()](#totals_frame) | One row per segment: the key columns, the chain ladder's totals, and |

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


#### development_frame()


The chain ladders' development factors, one row per segment and


Usage


``` python
development_frame()
```


age, as [ChainLadderFit.development_frame](reserving.ChainLadderFit.md#prospicio.reserving.ChainLadderFit.development_frame). Needs pandas.


##### Returns


`pandas.DataFrame`  


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


#### segment()


The bootstrap of one segment, chosen by key values as


Usage


``` python
segment(**keys)
```


[ChainLadderFit.segment](reserving.ChainLadderFit.md#prospicio.reserving.ChainLadderFit.segment), with its part of the joint reserves (same dimensions).


##### Returns


`MackBootstrapFit`  


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


#### to_frame()


One row per segment and origin: the key columns, `origin`, the


Usage


``` python
to_frame()
```


chain ladder's [latest](reserving.MackFit.md#prospicio.reserving.MackFit.latest), [ultimate](reserving.MackFit.md#prospicio.reserving.MackFit.ultimate) and [reserve](reserving.MackFit.md#prospicio.reserving.MackFit.reserve), and the [mean](risk.Gpd.md#prospicio.risk.Gpd.mean) and `std_dev` of the bootstrapped reserve. Needs pandas.


##### Returns


`pandas.DataFrame`  


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


#### totals_frame()


One row per segment: the key columns, the chain ladder's totals, and


Usage


``` python
totals_frame()
```


the [mean](risk.Gpd.md#prospicio.risk.Gpd.mean) and `std_dev` of the segment's bootstrapped total reserve. Needs pandas.


##### Returns


`pandas.DataFrame`
