[R-SIG-Finance] About ugarchboot

alexios ghalanos alexios at 4dscape.com
Fri Feb 7 18:52:04 CET 2014


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:
> Hi R users
> 
> I'm wondering whether could be possible to get the resampled innovations
> from the empirical distribution used when using ugarchboot function from
> 'great' rugarch package.
> 
> With resampled innovations from empirical distribution I mean:
> innov(t)=Residual(t)/sigma(t)
> 
> I got the manual and also the vignette in front but seems like there isn't
> a method to directly extract them.  also did some google search but not
> succeed.
> 
>  I also did some google research but not succeed.
> 
> Could anyone guide me through this?
> 
> Bests
>



More information about the R-SIG-Finance mailing list