## aggregate.Ruin


The probability of eventual ruin at each initial surplus on the grid, by


Usage


``` python
aggregate.Ruin()
```


the Pollaczeck-Khinchine formula, from [eventual_ruin](aggregate.eventual_ruin.md#prospicio.aggregate.eventual_ruin).


## Attributes

| Name | Description |
|----|----|
| [equilibrium](#equilibrium) | The equilibrium (integrated tail) severity. |
| [lundberg_exponent](#lundberg_exponent) | The Lundberg exponent `R` with `psi(u) <= exp(-R u)`, or None |
| [psi](#psi) | `psi(u)` at each grid point; the last is the mass beyond the grid. |
| [report](#report) | The compound FFT's report; read [aliasing_error](aggregate.CompoundReport.md#prospicio.aggregate.CompoundReport.aliasing_error). |
| [rho](#rho) | The margin [rho](aggregate.Ruin.md#prospicio.aggregate.Ruin.rho); the loss ratio is `1 / (1 + rho)`. |
| [severity_mean](#severity_mean) | The severity's mean on the grid, after any cap, excess or stop loss. |
| [u](#u) | The initial surplus at each grid point. |

------------------------------------------------------------------------


#### equilibrium


The equilibrium (integrated tail) severity.


`equilibrium: Grid`


------------------------------------------------------------------------


#### lundberg_exponent


The Lundberg exponent `R` with `psi(u) <= exp(-R u)`, or None


`lundberg_exponent: float | None`


when the grid's severity has no root below `700 / max(x)`.


------------------------------------------------------------------------


#### psi


`psi(u)` at each grid point; the last is the mass beyond the grid.


`psi: list[float]`


------------------------------------------------------------------------


#### report


The compound FFT's report; read [aliasing_error](aggregate.CompoundReport.md#prospicio.aggregate.CompoundReport.aliasing_error).


`report: CompoundReport`


------------------------------------------------------------------------


#### rho


The margin [rho](aggregate.Ruin.md#prospicio.aggregate.Ruin.rho); the loss ratio is `1 / (1 + rho)`.


`rho: float`


------------------------------------------------------------------------


#### severity_mean


The severity's mean on the grid, after any cap, excess or stop loss.


`severity_mean: float`


------------------------------------------------------------------------


#### u


The initial surplus at each grid point.


`u: list[float]`


## Methods

| Name | Description |
|----|----|
| [capital()](#capital) | The initial surplus for ruin probability [p](models.Elpd.md#prospicio.models.Elpd.p): the smallest grid |
| [psi_at()](#psi_at) | `psi(u)` at any initial surplus (constant between grid points). |

------------------------------------------------------------------------


#### capital()


The initial surplus for ruin probability [p](models.Elpd.md#prospicio.models.Elpd.p): the smallest grid


Usage


``` python
capital(p, interpolate=False)
```


point with `psi(u) < p`, or linear between grid points.


##### Parameters


`p: float`  

`interpolate: bool = ``False`  


##### Returns


`float or None`  
None when the grid does not reach it.


------------------------------------------------------------------------


#### psi_at()


`psi(u)` at any initial surplus (constant between grid points).


Usage


``` python
psi_at(u)
```


##### Parameters


`u: float`  


##### Returns


`float`
