Library: | times |
See also: | simNHPP simNHPPRP simNHPPRPedf simNHPPRPedfRT simNHPPRPmeanlossRT simNHPPRPRT |
Quantlet: | simNHPPRPmeanloss | |
Description: | generates risk process driven by non-homogeneous Poisson process with given mean losss value incorporated in the premium. |
Usage: | y = simNHPPRPmeanloss(u,theta,lambda,parlambda,distrib,params,meanloss,T,N) | |
Input: | ||
u | scalar, initial capital | |
theta | scalar, relative safety loading | |
lambda | scalar, intensity function, sine function (lambda=0), linear function (lambda=1), or sine square function (lambda=2) | |
parlambda | n x 1 vector, parameters of the intensity function lambda (n=2 for lambda=1, n=3 otherwise) | |
distrib | string, claim size distribution | |
params | n x 1 vector, parameters of the claim size distribution, n=1 (exponential), n=2 (gamma, lognormal, Pareto, Weibull), n=3 (Burr, mixofexps) | |
meanloss | scalar, mean loss incorporated in the premium | |
T | scalar, time horizon | |
N | scalar, number of trajectories | |
Output: | ||
y | 2*max+2 x N x 2 array, generated process - max is the maximum number of jumps for all generated trajectories |
library("xplore") library("times") library("plot") randomize2(101) randomize(101) y1=simNHPPRPmeanloss(10,0.5,0,#(1,1,0),"Burr",#(3,2,1),2,5,1) y1=reduce(y1) d1=createdisplay(1,1) adddata(d1, 1, 1,setmask(y1,"line","medium","red", "style",1)) y2=simNHPPRPmeanloss(10,0.7,1,#(1,1),"Pareto",#(2.5,2.5),1,5,1) y2=reduce(y2) adddata(d1, 1, 1,setmask(y2,"line","medium","blue", "style",1))
Show two trajectories of risk process driven by the non-homogeneous Poisson process with the given mean losss value incorporated in the premium.