Hi everyone,
Iam trying to calculate the modified Value at Risk with a rolling
estimation window (502) and alpha=0.4 and get the following error:
VaR calculation produces unreliable result (inverse risk) for column: 1 :
and so forth...
VaR calculations (rolling) with method=normal and method=historical dont
show any error message. Therfore Iam a little bit confused. I hope that
somebody can give me a hint.
Here is my code:

require(quantmod)
require(PerformanceAnalytics)

getSymbols("MMM", from = "2005-01-01", to = "2013-05-31")
mmm<-Ad(MMM)
mmm_ldr <- Return.calculate(mmm, method = "log")
mmm_ldr <- na.omit(mmm_ldr)

n_all = nrow(mmm_ldr)
n_test <- nrow(as.xts(mmm_ldr)["2007-01-04/2013-05-31"]) # testing window
n_est <- n_all - n_test

VaR_60_roll_mmm = rollapply(as.zoo(mmm_ldr), width = n_est,
                                                        FUN = VaR, p=0.60,
method="modified", by.column = TRUE,
                                                        align = "right")

Thanks
Daniel

	[[alternative HTML version deleted]]

