## aggregate.recommend_portfolio_grid()


A grid for the sum of independent compound units, as [aggregate](aggregate.Clash.md#prospicio.aggregate.Clash.aggregate)


Usage


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


sizes a [Portfolio](pricing.Portfolio.md#prospicio.pricing.Portfolio): [recommend_grid](aggregate.recommend_grid.md#prospicio.aggregate.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](aggregate.recommend_grid.md#prospicio.aggregate.recommend_grid), or with no units.


## Examples

``` python
>>> 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
