# NOT RUN {
## Example with the Relative Entropy
## continuing example in stress_VaR
set.seed(0)
x <- as.data.frame(cbind(
"normal" = rnorm(1000),
"gamma" = rgamma(1000, shape = 2)))
res1 <- stress(type = "VaR", x = x,
alpha = 0.9, q_ratio = 1.05)
summary(res1, xCol = "normal", base = TRUE)
## Example with the Wasserstein distance
# }
# NOT RUN {
resW <- stress_wass(type = "RM", x = x,
alpha = 0.9, q_ratio = 1.05)
summary(resW, xCol = "normal", base = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab