Skip to contents

The probability psi(u) of eventual ruin from initial surplus u when the waits between claims follow any law (a renewal, or Sparre Andersen, process), as the Python package aggregate's wiener_hopf: claims of this severity, waits drawn from wait, and the premium at the rate (1 + rho) E[X] / E[W]. Ruin comes at a claim, so psi(u) is the chance that the walk with steps X - cW ever rises above u, found by the cepstral Wiener-Hopf factorization. Exponential waits give eventual_ruin().

Usage

wiener_hopf(
  severity,
  wait,
  rho = NULL,
  loss_ratio = NULL,
  p = numeric(),
  points = NULL
)

Arguments

severity

A grid_distribution.

wait

A distribution: the wait between claims, with a finite mean.

rho

The margin to loss, positive. Or give loss_ratio.

loss_ratio

1 / (1 + rho), in (0, 1).

p

Ruin probabilities at which to find the capital.

points

Grid points for psi, at least the severity's (the default); raise it when psi at the last point is not small.

Value

A list: psi, a data frame of u, psi and maximum (the probabilities of the claim walk's all-time maximum) on the grid; capital and capital_interpolated at each p (NA where the grid does not reach it); premium_rate, severity_mean and mean_step (the grid's mean step of the walk, negative).

Examples

sev <- discretize(gamma_from_mean_cv(10, 0.3), step = 1 / 32, points = 2^14, method = "rounding")
# Gamma waits (shape 2) are more regular than Poisson arrivals.
wh <- wiener_hopf(sev, gamma_distribution(2, 1), rho = 0.2, p = 0.01)
pk <- eventual_ruin(sev, rho = 0.2, p = 0.01)
c(wh$capital, pk$capital)
#> [1]  74.59375 138.78125