## aggregate.occurrence_source()


The joint source of the annual gross loss and the loss ceded by the


Usage


``` python
aggregate.occurrence_source(
    frequency,
    severity,
    occurrence,
    points,
)
```


per-occurrence covers of `occurrence`, [aggregate](aggregate.Clash.md#prospicio.aggregate.Clash.aggregate)'s `occ_bivariate(views=('gross', 'ceded'))`: each claim on the severity's grid goes to `(x, c(x))`, the cession split linearly between grid points, compounded by a two-dimensional FFT on [points](aggregate.GridSize.md#prospicio.aggregate.GridSize.points) points per axis; cells below `1e-15` of the total mass are dropped as round-off.


## Parameters


`frequency: Poisson, NegativeBinomial, Binomial or a count`  

`severity: Grid`  

`occurrence: prospicio.reinsurance.Tower`  
Per-occurrence covers; a single layer may carry annual terms and reinstatements, and each claim is then ceded without them.

`points: tuple of (int, int)`  


## Returns


`tuple of (tuple of (list of float, list of float, list of float), BivariateReport)`  
The joint source `(gross, ceded, probs)` for [Book.occurrence_ledger()](aggregate.Book.md#prospicio.aggregate.Book.occurrence_ledger), and the FFT's report.


## Examples

``` python
>>> from prospicio.aggregate import occurrence_source
>>> from prospicio.distributions import Grid, Poisson
>>> from prospicio.reinsurance import Layer, Tower
>>> sev = Grid(1.0, [0.0, 0.5, 0.3, 0.0, 0.2])
>>> cover = Tower([Layer("occ 2 xs 2", 2.0, 2.0)])
>>> (gross, ceded, probs), _ = occurrence_source(Poisson(2.0), sev, cover, (64, 32))
>>> round(sum(c * p for c, p in zip(ceded, probs)), 12)
```

0.8
