ruinprob {bootruin}  R Documentation 
This function calculates or estimates the probability of ruin in the classical (compund Poisson) risk process using several different methods.
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"), ...)
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 
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 
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

interval 
a number determining the approximation precision, viz. the
mesh width of the discretization if 
implementation 
a character string determining whether to use the native implementation in R or the one in C. 
... 
further arguments are passed to 
The classical risk process, also called CramÃ©rLundberg 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 nonparametric
estimator, parametric estimators for exponential or lognormal claims, or
a usersupplied function (in which the argument fl
must be
specified). See the reference for more details on how this algorithm
works.
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.
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.
Dufresne, F. and Gerber, H.U. (1989) Three Methods to Calculate the Probability of Ruin. ASTIN Bulletin, 19(1), pp. 71–90.
# 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" )