Skip to main content

aggregate.recommend_portfolio_grid()

A grid for the sum of independent compound units, as aggregate

Usage

aggregate.recommend_portfolio_grid(
    units,
    log2=16,
    p=Ellipsis,
    p_star=Ellipsis,
)

sizes a Portfolio: recommend_grid’s steps on the total, the single big jump taken on whichever unit needs the most room.

Parameters

units: list of (frequency, severity) pairs
log2: int = 16
p: float = 1 - 1e-5
p_star: float = 1 - 1e-12

Returns

GridSize

Raises

ValueError
As recommend_grid, or with no units.

Examples

>>> from prospicio.aggregate import recommend_portfolio_grid
>>> from prospicio.distributions import Gamma, Poisson
>>> g = recommend_portfolio_grid([(Poisson(10.0), Gamma(2.0, 50.0)),
...                               (Poisson(2.0), Gamma(0.5, 1000.0))])
>>> g.points <= 2**16

True