## aggregate.panjer()


Aggregate loss `S = X_1 + ... + X_N` by Panjer's recursion.


Usage


``` python
aggregate.panjer(
    frequency,
    severity,
    points,
)
```


## Parameters


`frequency: (Poisson, NegativeBinomial or Binomial)`  

`severity: Grid`  
Severity on a grid; the result uses its step.

`points: int`  
Points in the aggregate grid.


## Returns


`tuple of (Grid, CompoundReport)`  


## Raises


`ValueError`  
If [points](aggregate.CompoundReport.md#prospicio.aggregate.CompoundReport.points) is 0 or `P(S = 0)` underflows (use [fft](aggregate.fft.md#prospicio.aggregate.fft)).


## Examples

``` python
>>> from prospicio.aggregate import panjer
>>> from prospicio.distributions import Grid, Poisson
>>> sev = Grid(1.0, [0.1, 0.3, 0.25, 0.2, 0.1, 0.05])
>>> agg, report = panjer(Poisson(3.0), sev, 100)
>>> round(agg.mean(), 6)
```

6.15
