ruinprob: The Probability of Ruin in the Classical Risk Process In bootruin: A Bootstrap Test for the Probability of Ruin in the Classical Risk Process

Description

This function calculates or estimates the probability of ruin in the classical (compund Poisson) risk process using several different methods.

Usage

 1 2 3 4 ruinprob(x, param.list, compmethod = c("dg", "exp"), flmethod = c("nonp", "exp", "lnorm", "custom"), reserve, loading, fl = NA, interval = 0.5, implementation = c("R", "C"), ...)

Arguments

 x a numeric vector, matrix or array of individual claims. param.list a named list of parameters. It might contain any of the arguments except x and ... compmethod a character string determining the algorithm for the computation. flmethod a character string indicating what cumulative probability distribution function is used for the increments of the running maximum of the aggregate loss process if compmethod = "dg", see also Details and References. reserve a number indicating the initial surplus. loading a number determining the relative security loading. fl a function that is used as custom cumulative probability distribution to be used for the discretization if flmethod = "custom". interval a number determining the approximation precision, viz. the mesh width of the discretization if compmethod = "dg", see Details and References. implementation a character string determining whether to use the native implementation in R or the one in C. ... further arguments are passed to fl.

Details

The classical risk process, also called Cramér-Lundberg risk process, is a stochastic model for an insurer's surplus over time and, for any t >= 0, it is given by

Y_t = r_0 + ct - Z_t,

where Z_t is a compund Poisson process, r_0 >= 0 is the initial surplus and c > 0 is the constant premium rate.

This function calculates, approximates or estimates (depending on what options are given) the probability of ruin in the infinite time horizon, i.e. the probability that Y_t ever falls below 0.

Currently there are two options for the compmethod argument. If compmethod = "exp", the claims are assumed to be from an exponential distribution. In that case, the probability of ruin is given by

exp{-beta * r_0 / (mu (1 + beta))} / (1 + beta),

where mu is the mean claim size (estimated from x) and beta is the relative security loading.

For compmethod = "dg", the recursive algorithm due to Dufresne and Gerber (1989) is used. In this case, the parameter flmethod determines what cumulative distribution function is used for the discretization. The possible choices are either a non-parametric estimator, parametric estimators for exponential or log-normal claims, or a user-supplied function (in which the argument fl must be specified). See the reference for more details on how this algorithm works.

Value

The estimated or calculated probability of ruin. The shape and dimension of the output depends on the specifics of the claim data x. If x is a vector, the output is a single numeric value. In general, the dimension of the output is one less than that of x. More precisely, if x is an array, then the output value is an array of dimension dim(x)[-1], see the note below.

Note

If x is an array rather than a vector, the function acts as if it was called through apply with MARGIN = 2:length(dim(x))

If an option is given both explicitly and as part of the param.list argument, then the value given explicitly takes precedence. This way the parameter list, saved as a variable, can be reused, but modifications of one or more parameter values are still possible.

References

Dufresne, F. and Gerber, H.-U. (1989) Three Methods to Calculate the Probability of Ruin. ASTIN Bulletin, 19(1), pp. 71–90.

Examples

 1 2 3 4 5 6 7 8 9 10 11 12 # Claims have an exponential distribution with mean 10 x <- rexp(10, 0.1) print(x) # The estimated probability of ruin ruinprob(x, reserve = 100, loading = 0.2, interval = 0.25) # The true probability of ruin of the risk process ruinprob( 10, reserve = 100, loading = 0.2, flmethod = "exp", compmethod = "exp" )

Example output

 28.756066 10.655443  7.872730 14.338401 19.664538  1.111380 21.049190
  5.320853  2.670306  1.790140
 0.131659
 0.1573963

bootruin documentation built on May 2, 2019, 10:23 a.m.