# NOT RUN {
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)
## calling stress_VaR directly
## stressing "gamma"
res2 <- stress_VaR(x = x, alpha = 0.9,
q_ratio = c(1.03, 1.05), k = 2)
get_specs(res2)
summary(res2)
# }
Run the code above in your browser using DataLab