scenarioRisk: Constructing a scenarioRisk

Description Usage Arguments Value Note See Also Examples

View source: R/scenarioRisk-base.R

Description

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

Usage

1
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.

Note

All parameters must be of equal length.

See Also

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

Examples

1
2
3
4
5
6
# 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))

sstModel documentation built on May 4, 2018, 1:04 a.m.