Skip to content

About ugarchboot

2 messages · Jaimie Villanueva, Alexios Ghalanos

#
The resampled innovations are not kept or returned by the routine.
However, you can replicate them by noting the following (and assuming
you are using the 'partial' bootstrap not the 'full' version on a
uGARCHfit object):
1. There is an argument called rseed in the routine. This is an integer
equal to n.bootpred. You need to define it.
2. Given a fitted object (mod), extract the standardized residuals:
z = residuals(mod, standardize=TRUE)
3. Run this code (additional options come from routine's arguments which
you can choose):
############################
if(sampling!="raw"){
zfit = rugarch:::.bfit(z, sampling, spd.options)
} else{
zfit = NULL
}
# you might be asked to load some additional packages depending on the #
sampling type chosen (packages spd or ks)
resampled_z = matrix(apply(as.data.frame(1:n.bootpred), 1, FUN =
function(i) { set.seed(rseed[i]);
rugarch:::.bsample(z, n.ahead, sampling, zfit);
}), ncol = n.bootpred)
############################
For the "full" bootstrap or method called using a uGARCHspec object
instead, just look at the underlying code (rugarch-bootstrap.R).

-Alexios
On 07/02/2014 16:27, Jaimie Villanueva wrote: