Description Usage Details References Examples
A class used to describe the insurance product we are modeling. Three types of insurance policies can be modeled:
1. Insurance policies issued to a single life, i.e. the isingle subclasses.
For these policies, the params
argument should be a list with n
for the
term of the contract, d
for the death benefit and e
for the
survival benefit. If e
is not specified it is assumed to be 0. For a
policy issued to a single life, the class argument should be "isingle"
and the subclass argument should be either "term" for a term insurance
or "endow" for an endowment insurance. See the examples below.
2. Identical policies issued to many lives, i.e. the iport subclasses. For
these policies, the params
argument should be a list with single
being an isingle
object and c
being a number specifying how
many identical policies are in the portfolio. For a portfolio of policies, the
class argument should be "iport" and the subclass argument should either be "term"
for a term insurance or "endow" for an endowment insurance. See the examples below.
3. A group of insurance portfolios, i.e. the igroup subclass. For a group
of policies, the params
argument should be a list of iport objects
and the class argument should be "igroup". The subclass argument is not needed.
See the examples below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
For each class, several functions are available.
The z.moment
function can be used to calculate the
raw moments of the present value of benefit random variable.
For the isingle classes all the moments are implemented,
for the iport classes the first three moments are implemented
and for the igroup class the first two moments are implemented.
The formulas from Parker (1992) were used to implement these moments.
The z.ev
function can be used to calculate the first moment, the
z.sd
function can be used to calculate the standard deviation and
the z.sk
function can be used to calculate the skewness of the
present value of benefit random variable.
The z.insrisk
function can be used to calculate the insurance risk
arising from uncertain mortality and z.invrisk
can be used to calculate
the investment risk arising from uncertain investment returns. The formulas
from Parker (1997) were used to implement these functions.
The z.pdf
function can be used to calculate the density function
of the present value of benefit random variable for the isingle classes.
This function has not been implemented for the iport and igroup
classes. For details on how this could be done, refer to Parker (1992) and
Parker (1997).
Refer to the examples below for how to use these functions.
Parker, Gary. An application of stochastic interest rate models in life assurance. Diss. Heriot-Watt University, 1992.
Parker, G. (1997). Stochastic analysis of the interaction between investment and insurance risks. North American actuarial journal, 1(2), 55–71.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | oumodel = iratemodel(list(delta0 = 0.1, delta = 0.06,
alpha = 0.1, sigma = 0.01), "ou")
mort = mortassumptions(list(x = 40, table = "MaleMort91"))
mort2 = mortassumptions(list(x = 50, table = "FemaleMort91"))
## isingle classes
termins = insurance(list(n = 10, d = 1), "isingle", "term")
endowins = insurance(list(n = 10, e = 1, d = 1), "isingle", "endow")
z.ev(termins, mort, oumodel) # first moment
z.moment(2, termins, mort, oumodel) # second moment
z.moment(3, termins, mort, oumodel) # third moment
z.sd(endowins, mort, oumodel) # standard deviation
z.sk(endowins, mort, oumodel) # skewness
plot(function(z) z.pdf(z, termins, mort, oumodel), 0.01, 1.0,
ylim = c(0, 0.15), lty = 1, xlab = "z", ylab = "f(z)")
legend('topleft', leg = c(paste0("P(Z=0) = ", round(kpx(1, mort), 5))),
lty = 1)
## iport classes
termport = insurance(list(single = termins, c = 1000), "iport", "term")
endowport = insurance(list(single = endowins, c = 1000), "iport", "endow")
z.moment(1, termport, mort, oumodel) / termport$c # average cost
z.sd(termport, mort, oumodel) / termport$c # average standard deviation
## igroup class
groupins = insurance(list(termport, endowport),
"igroup") # 1000 term contracts, 1000 endow contracts
groupmort = list(mort, mort2) # term contracts are age 40, endow contracts are age 50
z.moment(1, groupins, groupmort, oumodel) / groupins$c # average cost per policy
z.insrisk(groupins, groupmort, oumodel) / termport$c^2 # insrisk per policy
z.invrisk(groupins, groupmort, oumodel) / termport$c^2 # invrisk per policy
z.sd(groupins, groupmort, oumodel) / termport$c # sd per policy
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.