Learn R Programming

sstModel (version 1.0.0)

scenarioRisk: Constructing a scenarioRisk

Description

scenarioRisk is the constructor for the S3 class scenarioRisk. It allows to build for scenarios (stress-tests).

Usage

scenarioRisk(name, probability, currency, effect)

Arguments

name

character value. The names of the scenarios. This should not contain duplicated names.

probability

numeric value. The probability of the respective scenarios. Probabilities must take values between 0 and 1, i.e. must be in (0, 1).

currency

character value. The currencies in which the effect are expressed. Please note that currency is restricted to be the same as the base currency of a marketRisk.

effect

numeric value. The effects associated with each scenario on the risk-bearing-capital (RBC). This must be expressed in the same currency as currency.

Value

An S3 object, instance of the class scenarioRisk.

See Also

summary.scenarioRisk, print.scenarioRisk, simulate.scenarioRisk, compute.scenarioRisk.

Examples

Run this code
# NOT RUN {
# Creating new scenarioRisk.
scenarios <- scenarioRisk(name        = c("earthquake",
                                          "real estate crash"),
                          probability = c(0.001, 0.01),
                          currency    = c("CHF", "CHF"),
                          effect        = c(1000, 10000))

# }

Run the code above in your browser using DataLab