stress {SWIM} | R Documentation |
Stressing Random Variables
Description
Provides weights on simulated scenarios from a baseline stochastic model, such that stressed random variables fulfil given probabilistic constraints (e.g. specified values for risk measures), under the new scenario weights. Scenario weights are selected by constrained minimisation of the relative entropy to the baseline model.
Usage
stress(
type = c("VaR", "VaR ES", "mean", "mean sd", "moment", "prob", "user"),
x,
...
)
Arguments
type |
Type of stress, one of |
x |
A vector, matrix or data frame
containing realisations of random variables. Columns of |
... |
Arguments to be passed on, depending on |
Value
An object of class SWIM
, see SWIM
for details.
Author(s)
Silvana M. Pesenti
References
Pesenti SM, Millossovich P, Tsanakas A (2019).
“Reverse sensitivity testing: What does it take to break the model?”
European Journal of Operational Research, 274(2), 654–670.
Pesenti S BAMPTA (2020).
“Scenario Weights for Importance Measurement (SWIM) - An R package for sensitivity analysis.”
Annals of Actuarial Science 15.2 (2021): 458-483. Available at SSRN: https://www.ssrn.com/abstract=3515274.
Csiszar I (1975). “I-divergence geometry of probability distributions and minimization problems.” The Annals of Probability, 146–158.
See Also
Other stress functions:
stress_HARA_RM_w()
,
stress_RM_mean_sd_w()
,
stress_RM_w()
,
stress_VaR_ES()
,
stress_VaR()
,
stress_mean_sd_w()
,
stress_mean_sd()
,
stress_mean_w()
,
stress_mean()
,
stress_moment()
,
stress_prob()
,
stress_user()
,
stress_wass()
Examples
set.seed(0)
x <- as.data.frame(cbind(
"normal" = rnorm(1000),
"gamma" = rgamma(1000, shape = 2)))
res <- stress(type = "VaR", x = x,
alpha = 0.9, q_ratio = 1.05)
summary(res)