Skip to content
Prev 12369 / 15274 Next

Independence test rugarch package

Philippe,

The code is correct and returns the right results. The problem is that you are passing xts objects whereas the code cannot deal with this (ifelse and the comparison operators). The help page on VaRTest does state:

"actual: A numeric vector of the actual (realized) values.?
"VaR: The numeric vector of VaR."

Simply transform to numeric (as.numeric(actual) and as.numeric(VaR)) and you should get the correct answer. This was already covered in a previous post to this list.

Regards,

Alexios
On 26 Apr 2014, at 07:43, philippe <philippe.kappeler at hotmail.com> wrote: