nonLifeRisk: Constructing a nonLifeRisk

Description Usage Arguments Value Note See Also Examples

Description

nonLifeRisk is the constructor for the S3 class nonLifeRisk. It allows to build for non-life insurance risks simulations.

Usage

1

Arguments

type

a character value of length one indicating the type of simulation used. it can be one of the following option:

  • "simulations": simulations for non-life risk are directly provided.

  • "log-normal": simulations for non-life risk are assumed to come from log-normal random variables.

  • "cdf": simulations from non-life risk are simulated from an input cumulative distribution function.

param

a list of length one or two depending on the type chosen. The structure of the list is conditional on the type of nonLifeRisk:

if type = "simulations", then param should be a named list with one element:

  • simulations: numeric value representing the input simulations. If the number of input simulations are bigger or equal to the number of required simulations, then inputs are subsampled. In the other, bootstrap is used.

if type = "log-normal", then param should be a named list with two elements:

  • mu: numeric value of length one giving the drift of the log-normal variable.

  • sigma: strictly positive numeric value of length one giving the volatility of the log-normal variable.

if type = "cdf" then param should be a named list with one element:

  • cdf: a data.frame with two columns named x and cdf, where the column x contains the numeric values that represents the possible discrete values of the CDF and cdf the cumulative distribution function evaluated at these possible values. Please note that we require the user to provide both columns in an increasing order. We additionally require the user to provide a value for cdf == 1 in order to know all the jumps possibly taken, since the cdf is right-continous. Morever please consider that we interpret the CDF as a piece-wise right-continuous step function.

currency

a character value. representing the currency in which the simulations are expressed. Please note that currency is restricted to be the same as the marketRisk used in conjunction.

Value

an S3 object, instance of the class nonLifeRisk.

Note

In case of log-normal simulations, a warning is triggered if the parameters seem to be not reasonable and could eventually yield non-finite simulations.

See Also

summary.nonLifeRisk, print.nonLifeRisk, simulate.nonLifeRisk, compute.nonLifeRisk.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Creating new nonLifeRisks.
nonLife1 <- nonLifeRisk(type     = "simulations",
                        param    = list(simulations = stats::rnorm(100)),
                        currency =  "CHF")
nonLife2 <- nonLifeRisk(type     = "log-normal",
                        param    = list(mu = 1, sigma = 2),
                        currency =  "CHF")
nonLife3 <- nonLifeRisk(type = "cdf",
                        param = list(cdf = data.frame(x = c(0,1,2,3),
                                                      cdf = c(0.3,0.7,0.9, 1))),
                        currency = "CHF")

sstModel documentation built on May 2, 2019, 12:16 p.m.