## reserving.OneYearFit


The simulated one-year view of every segment, from


Usage


``` python
reserving.OneYearFit()
```


[OdpBootstrap.one_year](reserving.OdpBootstrap.md#prospicio.reserving.OdpBootstrap.one_year) or [MackBootstrap.one_year](reserving.MackBootstrap.md#prospicio.reserving.MackBootstrap.one_year) ([model](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.model) says which).

[cdr](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.cdr) is one joint distribution of the claims development result with the triangle's keys and `"origin"` as dimensions, so `cdr.aggregate(["lob"])` keeps the dependence between segments, and `cdr.quantile(0.005)` is minus the one-year value at risk at 99.5%. 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 [cdr](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.cdr). [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 [scale](reserving.ClarkFit.md#prospicio.reserving.ClarkFit.scale) are the ODP bootstrap's ([OdpBootstrapFit](reserving.OdpBootstrapFit.md#prospicio.reserving.OdpBootstrapFit)'s), [mack](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.mack) is Mack's bootstrap's model (a [MackFit](reserving.MackFit.md#prospicio.reserving.MackFit) of every segment, as [chain_ladder](reserving.MackFit.md#prospicio.reserving.MackFit.chain_ladder)), and [residuals](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.residuals) are either's.


## Attributes

| Name | Description |
|----|----|
| [cdr](#cdr) | Joint distribution of the claims development result (opening less |
| [chain_ladder](#chain_ladder) | The bootstrap's chain ladder: the factors the simulated next cells |
| [development](#development) | Development ages in months. |
| [fitted](#fitted) | The ODP bootstrap's fitted incremental values, |
| [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. |
| [latest](#latest) | Latest observed value per origin. |
| [mack](#mack) | Mack's model behind [MackBootstrap.one_year](reserving.MackBootstrap.md#prospicio.reserving.MackBootstrap.one_year), with its lifetime |
| [model](#model) | The bootstrap's model: `"odp"` or `"mack"`. |
| [opening_reserve](#opening_reserve) | The opening ultimate less the latest value, per origin. |
| [opening_ultimate](#opening_ultimate) | The method's ultimate per origin on the observed triangle. |
| [origins](#origins) | Origin period of each per-origin value and CDR component. |
| [residuals](#residuals) | The residuals the bootstrap resamples, `[origin][development]`: |
| [scale](#scale) | The ODP bootstrap's scale parameter `phi`. |

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


#### cdr


Joint distribution of the claims development result (opening less


`cdr: PredictiveDistribution`


closing ultimate) 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), [variance](distributions.Grid.md#prospicio.distributions.Grid.variance) and [quantile](risk.Gpd.md#prospicio.risk.Gpd.quantile) describe the total. Columns of [draw_matrix()](distributions.PredictiveDistribution.md#prospicio.distributions.PredictiveDistribution.draw_matrix) follow [origins](reserving.MackFit.md#prospicio.reserving.MackFit.origins).


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


#### chain_ladder


The bootstrap's chain ladder: the factors the simulated next cells


`chain_ladder: ChainLadderFit`


develop with (volume-weighted for the ODP, Mack's averaging for Mack's).


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


#### development


Development ages in months.


`development: list[int]`


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


#### fitted


The ODP bootstrap's fitted incremental values,


`fitted: list[list[float]]`


`[origin][development]`.


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


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


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


#### latest


Latest observed value per origin.


`latest: list[float]`


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


#### mack


Mack's model behind [MackBootstrap.one_year](reserving.MackBootstrap.md#prospicio.reserving.MackBootstrap.one_year), with its lifetime


`mack: MackFit`


standard errors and [claims_development_result()](reserving.MackFit.md#prospicio.reserving.MackFit.claims_development_result).


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


#### model


The bootstrap's model: `"odp"` or `"mack"`.


`model: str`


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


#### opening_reserve


The opening ultimate less the latest value, per origin.


`opening_reserve: list[float]`


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


#### opening_ultimate


The method's ultimate per origin on the observed triangle.


`opening_ultimate: list[float]`


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


#### origins


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


`origins: list[str]`


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


#### residuals


The residuals the bootstrap resamples, `[origin][development]`:


`residuals: list[list[float]]`


the ODP's adjusted Pearson residuals, as [OdpBootstrapFit.residuals](reserving.OdpBootstrapFit.md#prospicio.reserving.OdpBootstrapFit.residuals), or Mack's scaled bias-adjusted residuals of the link ratios, `[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).


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


#### scale


The ODP bootstrap's scale parameter `phi`.


`scale: float`


## Methods

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

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


#### development_frame()


The bootstrap's chain ladders' development factors, one row per


Usage


``` python
development_frame()
```


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


##### Returns


`pandas.DataFrame`  


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


#### segment()


The one-year view 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 claims development result (same dimensions).


##### Returns


`OneYearFit`  


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


#### to_frame()


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


Usage


``` python
to_frame()
```


[latest](reserving.MackFit.md#prospicio.reserving.MackFit.latest), the method's [opening_ultimate](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.opening_ultimate) and [opening_reserve](reserving.OneYearFit.md#prospicio.reserving.OneYearFit.opening_reserve), and the `cdr_mean` and `cdr_std_dev` of the simulated claims development result. Needs pandas.


##### Returns


`pandas.DataFrame`  


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


#### totals_frame()


One row per segment: the key columns, the totals of [to_frame()](reserving.MackFit.md#prospicio.reserving.MackFit.to_frame)'s


Usage


``` python
totals_frame()
```


columns, the ODP bootstrap's [scale](reserving.ClarkFit.md#prospicio.reserving.ClarkFit.scale) (not for Mack's), and the `cdr_mean` and `cdr_std_dev` of the segment's total claims development result. Needs pandas.


##### Returns


`pandas.DataFrame`
