## aggregate.pnl_program()


The premium ladder of [aggregate](aggregate.Clash.md#prospicio.aggregate.Clash.aggregate)'s [pnl_program](aggregate.pnl_program.md#prospicio.aggregate.pnl_program), as numbers:


Usage


``` python
aggregate.pnl_program(
    net_loss,
    net_combined_ratio,
    expense_ratio,
    layers=None,
)
```


the net technical premium `E_net / c_net`, each layer's deposit at 100% placement `round(E_j / c_j / s_j)` (or the premium it states), and the booked premium `round((T_net + sum s_j d_j) / (1 - ER))`. The book's own margin is `(1 - c_net) T_net` whatever the cover costs. Each priced deposit is also respelled as a rate, [aggregate](aggregate.Clash.md#prospicio.aggregate.Clash.aggregate)'s `premium_style='rate'`: of the booked premium on the occurrence tier, of it less the occurrence premiums on the aggregate tier.


## Parameters


`net_loss: float`  
Expected net loss.

`net_combined_ratio: float`  

`expense_ratio: float`  
Gross expenses as a fraction of premium.

`layers: list of dict = None`  
Each with `ceded_loss` (expected, at the placed share), [share](reinsurance.Layer.md#prospicio.reinsurance.Layer.share), `combined_ratio`, optionally `stated` (a premium the contract states, at the placed share, which is kept) and [aggregate](aggregate.Clash.md#prospicio.aggregate.Clash.aggregate) (`True` for a layer on the aggregate tier).


## Returns


`dict`  
[premium](pricing.Price.md#prospicio.pricing.Price.premium), [technical](pricing.Quote.md#prospicio.pricing.Quote.technical), `deposits`, [rates](reserving.DiscountCurve.md#prospicio.reserving.DiscountCurve.rates) (`None` for a stated layer) and `ceded_premium`.


## Raises


`ValueError`  
A ratio that is not positive, an expense ratio outside `[0, 1)` or a share outside `(0, 1]`.


## Examples

``` python
>>> from prospicio.aggregate import pnl_program
>>> p = pnl_program(406.0, 0.9, 0.25, [dict(ceded_loss=86.0, share=1.0, combined_ratio=0.6)])
>>> p["premium"], p["deposits"], p["rates"]
```

(792.0, \[143.0\], \[0.18055556\])
