Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: insurance
See also: INSruinMC INSexactexpfin simHPPRP

Quantlet: INSruinMC
Description: produces the ruin probability in finite time horizon for insurance collective risk model by Monte Carlo simulations of risk process.

Reference(s):

Usage: P = INSruinMC(u, T, lambda, theta, distrib, dparameters, N, niter)
Input:
u scalar or n x 1 vector, initial capital for risk process
T scalar or p x 1 vector, time horizon for risk process
lambda scalar, intensity of loss arrivals driven by Poisson process
theta scalar, security loading in insurance collective risk model
distrib string, name of distribution of claims, either: exponential, gamma, mixofexps, Weibull, lognormal, Pareto or Burr.
dparameters list, composed of scalars, (parameters of the following distributions: exponential, gamma, Weibull, lognormal, loggamma, Pareto, Burr or truncPareto) or of n x 1 vectors (parameters of "mixofexps" distribution, the first vector are parameters for the exponential distributions and the second one are the weights of mixing).
N scalar, number of simulated trajectories from risk process
niter scalar, number of iterations of the procedure to be repeated
Output:
P scalar (if both T and u are scalars), p x 1 vector (if only T is a scalar), n x 1 vector (if only u is a scalar) or p x n matrix (else), ruin probability in finite time horizon T.

Note:

Note:

Example:
library("insurance")
library("xplore")
library("distribs")
randomize2(101)
randomize(101)
distrib = "Pareto"
dparameters = list(1.2,0.7)
u = #(1:4)
T = 100
lambda = 5
theta = 0.3
N = 100
niter = 10
y = INSruinMC(u, T, lambda, theta, distrib, dparameters, N, niter)
y

Result:
Contents of y
[1,]     0.53
[2,]    0.492
[3,]    0.468
[4,]     0.45
Example:
library("insurance")
library("xplore")
library("distribs")
randomize2(101)
randomize(101)
distrib = "Pareto"
dparameters = list(1.2,0.7)
u = #(1:5)
T = #(1:3)*10
lambda = 5
theta = 0.3
N = 200
niter = 10
y = INSruinMC(u, T, lambda, theta, distrib, dparameters, N, niter)
y

Result:
Contents of y
[1,]   0.4155    0.376   0.3475   0.3325    0.319
[2,]   0.4515   0.4135   0.3865    0.372   0.3585
[3,]    0.468   0.4325   0.4055   0.3905    0.377



Author: P. Mista, 20041118 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006