VaR.backtest {VaR} | R Documentation |
Test for given proportions on input data respective a given VaR.
VaR.backtest(x, VaR, p)
x |
Numerical vector of observation. |
VaR |
Number or numerical vector of the same length as x . |
p |
Confidence level of VaR estimation. |
This function performs the test for equal or given proportion (prop.test) on input data. It calculates a part of observation exceeding a VaR and compares it with a confidence level of VaR estimation.
Return value is a p.value of prop.test and can be interpretated in a usual manner.
T. Daniyarov
data(exchange.rates) attach(exchange.rates) y <- USDJPY[!is.na(USDJPY)] z <- VaR.norm(y) VaR.backtest(z$cdata, z$VaR, p = 0.01) detach(exchange.rates)