## reserving.ClarkCapeCod


Clark's Cape Cod method (Clark 2003), as R ChainLadder's


Usage


``` python
reserving.ClarkCapeCod()
```


[ClarkCapeCod](reserving.ClarkCapeCod.md#prospicio.reserving.ClarkCapeCod): one expected loss ratio times each origin's exposure and a growth curve are fitted to the incremental losses by over-dispersed Poisson maximum likelihood, with ages measured from the average date of loss.

The reserve is the fitted `elr * exposure * (G(max_age) - G(age))`; process and parameter risk are as in [ClarkLdf](reserving.ClarkLdf.md#prospicio.reserving.ClarkLdf).


## Parameters


`curve: (loglogistic, weibull) = ``"loglogistic"`  
The growth curve, as in [ClarkLdf](reserving.ClarkLdf.md#prospicio.reserving.ClarkLdf).

`max_age: float`  
Age in months at which development stops; at least the triangle's last age. `None` develops to infinity.


## Raises


`ValueError`  
If [curve](pricing.Mbbefd.md#prospicio.pricing.Mbbefd.curve) is unknown.


## Examples

``` python
>>> from prospicio.reserving import ClarkCapeCod, Triangle
>>> rows = [[110.0, 290.0, 370.0, 420.0, 440.0], [95.0, 300.0, 390.0, 425.0],
...         [130.0, 320.0, 410.0], [105.0, 305.0], [120.0]]
>>> tri = Triangle.from_long(
...     [2020 + i for i, row in enumerate(rows) for _ in row],
...     [12 * (d + 1) for row in rows for d in range(len(row))],
...     {"paid": [v for row in rows for v in row],
...      "premium": [800.0 for row in rows for _ in row]},
... )
>>> fit = ClarkCapeCod().fit(tri, "paid", "premium")
>>> 0 < fit.elr < 1 and fit.expected_ultimate == [fit.elr * 800.0] * 5
```

True


## Attributes

| Name | Description |
|----|----|
| [curve](#curve) | The growth curve. |
| [max_age](#max_age) | Age in months at which development stops; `None` for infinity. |

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


#### curve


The growth curve.


`curve: str`


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


#### max_age


Age in months at which development stops; `None` for infinity.


`max_age: float | None`


## 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 value is its exposure.


##### Returns


`ClarkFit`  


##### Raises


`ValueError`  
As [ClarkLdf.fit](reserving.ClarkLdf.md#prospicio.reserving.ClarkLdf.fit), and if an origin has no observed, finite, positive exposure.
