## reserving.OdpBootstrapFit


A fitted ODP bootstrap of every segment.


Usage


``` python
reserving.OdpBootstrapFit()
```


[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). [fitted](models.GlmFit.md#prospicio.models.GlmFit.fitted), [residuals](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.residuals) and [scale](reserving.ClarkFit.md#prospicio.reserving.ClarkFit.scale) need a single-segment fit; for several segments use `segment(...)` or [totals_frame()](reserving.MackFit.md#prospicio.reserving.MackFit.totals_frame). [fitted](models.GlmFit.md#prospicio.models.GlmFit.fitted) and [residuals](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.residuals) are nested lists indexed `[origin][development]`, like one segment of [Triangle.values](reserving.Triangle.md#prospicio.reserving.Triangle.values), with `nan` where the triangle is not observed.


## Attributes

| Name | Description |
|----|----|
| [chain_ladder](#chain_ladder) | The deterministic volume-weighted chain ladder the bootstrap is |
| [development](#development) | Development ages in months. |
| [fitted](#fitted) | Fitted incremental values, `[origin][development]`. |
| [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. |
| [origins](#origins) | Origin period of each per-origin value and reserve component. |
| [reserves](#reserves) | Joint distribution of the reserve (the sum of future incremental |
| [residuals](#residuals) | Adjusted Pearson residuals `(x - m) / sqrt(|m|) * sqrt(n / (n - p))`, |
| [scale](#scale) | The scale parameter `phi`: the sum of squared unadjusted residuals |

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


#### chain_ladder


The deterministic volume-weighted chain ladder the bootstrap is


`chain_ladder: ChainLadderFit`


centred on.


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


#### development


Development ages in months.


`development: list[int]`


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


#### fitted


Fitted incremental values, `[origin][development]`.


`fitted: list[list[float]]`


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


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


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


#### origins


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


`origins: list[str]`


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


#### reserves


Joint distribution of the reserve (the sum of future incremental


`reserves: PredictiveDistribution`


values) 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


Adjusted Pearson residuals `(x - m) / sqrt(|m|) * sqrt(n / (n - p))`,


`residuals: list[list[float]]`


`[origin][development]`; `nan` where not observed or where the fitted value is zero.


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


#### scale


The scale parameter `phi`: the sum of squared unadjusted residuals


`scale: float`


over the degrees of freedom `n - p`.


## 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, the |

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


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


`OdpBootstrapFit`  


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


#### 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, the


Usage


``` python
totals_frame()
```


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


##### Returns


`pandas.DataFrame`
