Title: | Computation of the Probability of Ruin Within a Finite Time Horizon |
---|---|
Description: | In the Cramér–Lundberg risk process perturbed by a Wiener process, this packages provides approximations to the probability of ruin within a finite time horizon. Currently, there are three methods implemented: The first one uses saddlepoint approximation (two variants are provided), the second one uses importance sampling and the third one is based on the simulation of a dual process. This last method is not very accurate and only given here for completeness. |
Authors: | Benjamin Baumgartner [aut, cre], Riccardo Gatto [ctb, ths] |
Maintainer: | Benjamin Baumgartner <[email protected]> |
License: | AGPL-3 |
Version: | 0.6 |
Built: | 2024-10-29 03:15:28 UTC |
Source: | https://github.com/cran/finiteruinprob |
In the Cramér–Lundberg risk process perturbed by a Wiener process, this packages provides approximations to the probability of ruin within a finite time horizon. Currently, there are three methods implemented: The first one uses saddlepoint approximation (two variants are provided), the second one uses importance sampling and the third one is based on the simulation of a dual process. This last method is not very accurate and only given here for completeness.
Benjamin Baumgartner <[email protected]>
Gatto, R. and Baumgartner, B. (2016) Saddlepoint approximations to the probability of ruin in finite time for the compound Poisson risk process perturbed by diffusion. Methodology and Computing in Applied Probability 18(1), pp. 217-235.
This function simulates paths of a compound Poisson risk process that is perturbed by a Wiener process. Multiple paths can be simulated simultaneously.
rriskproc(m = 1001, window = c(0, 1), num = 1, sigma = 1, freq = 1, drift = 0, jumpdist, ...)
rriskproc(m = 1001, window = c(0, 1), num = 1, sigma = 1, freq = 1, drift = 0, jumpdist, ...)
m |
Number of sample points for each path |
window |
Beginning and end of the time window |
num |
Number of paths to be simulated |
sigma |
Volatility of the Wiener process |
freq |
Frequency of the claims |
drift |
Drift (premium intensity) of the process |
jumpdist |
A function that returns realizations of the claim distribution |
... |
Additional arguments for |
Possible choices for jumpdist
include rexp
,
rgamma
and rlnorm
.
It is assumed that the function specified for jumpdist
interprets
its first argument as the vector length of its return value, i. e. the
number of simultaneously generated random variables.
The path realizations of the Wiener process are generated using the circulant embedding method (see references).
A time-series object/time-series object containing the simulated sample path(s).
Dietrich, C. and Newsam, G. (1997) Fast and Exact Simulation of Stationary Gaussian Processes through Circulant Embedding of the Covariance Matrix. SIAM Journal on Scientific Computing 18(4), pp. 1088-1107
require(sdprisk) rriskproc(m = 1001, window = c(0, 5), num = 1, sigma = sqrt(0.4), freq = 1, drift = 2, jumpdist = rhypoexp, rate = c(1, 10)) # The same can be achieved using # jumpdist = function(n) rexp(n, 1) + rexp(n, 10) rriskproc(window = c(0, 10), jumpdist = function(n) { rexp(n, 1) + rexp(n, 10) })
require(sdprisk) rriskproc(m = 1001, window = c(0, 5), num = 1, sigma = sqrt(0.4), freq = 1, drift = 2, jumpdist = rhypoexp, rate = c(1, 10)) # The same can be achieved using # jumpdist = function(n) rexp(n, 1) + rexp(n, 10) rriskproc(window = c(0, 10), jumpdist = function(n) { rexp(n, 1) + rexp(n, 10) })
This function calculates an approximation to the probability of ruin within a finite time horizon for a compound Poisson risk process that is perturbed by a Wiener process. The approximation is based on a dual process to the risk process.
ruinprob.finite.dsim(Z)
ruinprob.finite.dsim(Z)
Z |
A time-series object, e.g. one generated by rriskproc, containing at least two series |
This function computes an approximation to the probability of ruin within a finite time horizon using a dual process. See the references for more details.
A function taking one numeric argument, the initial capital. This function returns the
approximation for the specified initial reserve and for all values of the time horizon
that are sampling points of Z
.
Gatto, R. and Baumgartner, B. (2016) Saddlepoint approximations to the probability of ruin in finite time for the compound Poisson risk process perturbed by diffusion. Methodology and Computing in Applied Probability 18(1), pp. 217-235.
This function calculates an approximation to the probability of ruin within a finite time horizon for a compound Poisson risk process that is perturbed by a Wiener process. The approximation is based on importance sampling.
ruinprob.finite.imps()
ruinprob.finite.imps()
This function is not yet fully implemented. At the moment it invisibly returns
NULL
.
Gatto, R. and Baumgartner, B. (2016) Saddlepoint approximations to the probability of ruin in finite time for the compound Poisson risk process perturbed by diffusion. Methodology and Computing in Applied Probability 18(1), pp. 217-235.
This function calculates an approximation to the probability of ruin within a finite time horizon for a compound Poisson risk process that is perturbed by a Wiener process. The approximation makes use of saddlepoint methods.
ruinprob.finite.sdp(mgf, mgf.d1, mgf.d2, premium, freq, variance, endpoint, verbose = FALSE)
ruinprob.finite.sdp(mgf, mgf.d1, mgf.d2, premium, freq, variance, endpoint, verbose = FALSE)
mgf |
The moment-generating function of the individual claim amounts |
mgf.d1 |
The first derivative of |
mgf.d2 |
The second derivative of |
premium |
The premium force |
freq |
Frequency of the claims |
variance |
The variance of the Wiener process by which the risk process is perturbed |
endpoint |
The upper endpoint of |
verbose |
Return additional diagnostic information as an attribute of the output |
If neither or only the first derivative of mgf
is provided,
a numerical approximation to the missing derivative(s) will be used
instead (see grad and hessian).
The argument endpoint
is the (smallest) positive pole of
mgf
. Omitting this information will issue a warning and the value
1.0e+6 will be used instead, possibly yielding unexpected and unreliable
output or leading to further errors.
A function psi(x, t)
taking as inputs the initial capital x
and the time horizon t
. This function returns a list, the first
element of which contains a Lugannani–Rice-type approximation, the second
one contains a Skovgaard-type approximation.
Gatto, R. and Baumgartner, B. (2016) Saddlepoint approximations to the probability of ruin in finite time for the compound Poisson risk process perturbed by diffusion. Methodology and Computing in Applied Probability 18(1), pp. 217-235.