Skip to content
Prev 12110 / 15274 Next

RUGARCH VaRTest problem and a Question wrt UGARCHFIT

1. The VaRTest was changed some time ago to deal with a specific case
which degenerates and leads to evaluation of log(0). Unfortunately, in
my attempt to deal with this the results in this case are wrong. I'll
reverse the fix and you will get NaN for this case (as before). Feel
free to look at the underlying code and suggest an alternative (the
offending code is the ".Log" function in the 'rugarch-tests.R' file).

2. The documentation example has the error. VaR should be transformed to
numeric as per the documentation inputs (the difference in the results
is because the underlying code uses certain logic statements which do
not work for an xts object).

3. The shape is the d.o.f. parameter. It has a default upper bound of
60, but per previous discussions here, you can change that to anything
else you want (use the 'setbounds<-' method on a specification object
prior to estimation).

4. Skew and Shape are the same as in Fernandez and Steel. Only thing
that changes is the reparametrization of the distribution to one where
mu=mean, sigma=stdev. A good way to get a feel of the distribution is by
looking at its moments for different parameters via numerical integration:
e.g.
f2 = function(x) x^2*ddist("sstd",x, 0, 1, skew=1, shape=60)
f3 = function(x) x^3*ddist("sstd",x, 0, 1, skew=1, shape=60)
f4 = function(x) x^4*ddist("sstd",x, 0, 1, skew=1, shape=60)
integrate(f2, -Inf, Inf)
integrate(f3, -Inf, Inf)
integrate(f4, -Inf, Inf)

-Alexios
On 19/12/2013 15:08, Johannes Moser wrote: