#StackBounty: #r #bootstrap #simulation #garch #finance How to pass standardized bootstrapped residuals in a forward simulation (FHS wi…

Bounty: 100

I am trying to use the Filtered Historical Simulation (FHS) approach to VaR and ES using the amazing rugarch package (with s&p500 data included in the package) as well as the steps FHS recommended by this paper:

Brandolini, D., & Colucci, S. (2013). Backtesting value-at-risk: A
comparison between filtered bootstrap and historical simulation. The
Journal of Risk Model Validation, 6(4), 3-16

The steps, according to the paper, are:

  1. Fitting the best (ARMA-GARCH) model
  2. Standardization of residuals
  3. Bootstrapping of standardised residuals
  4. Passing of bootstrapped residuals in a forward simulation using the estimated ARMA-GARCH model
  5. Estimation of returns
  6. VaR and ES estimations

I am currently stuck on the step 3. Here’s my current work in progress:

library(zoo)
library(forecast)
library(rugarch)



sp500 <- data(sp500ret)

sp500 <- zoo(sp500ret$SP500RET * 100)

plot(sp500)

# Get the best ARIMA model for the mean modelling of the GARCH model
forecast::auto.arima(sp500, trace = TRUE,
                     test = "kpss", ic = c("bic"))


############################# SPECIFY GARCH MODEL #########################################
model_spec <- rugarch::ugarchspec(variance.model = list(model = "sGARCH",
                                                        garchOrder = c(1,1)),
                                  mean.model = list(armaOrder = c(0,2)), 
                                  distribution.model = "std")

############################# FIT MODEL ##################################################
model_fit <- rugarch::ugarchfit(spec =  model_spec, data = sp500)


############################## BACKTESTING OF MODEL##################################
model_roll <- rugarch::ugarchroll(spec = model_spec, data = sp500,
                                  n.ahead = 1,
                                  n.start = 150, refit.every = 50, 
                                  refit.window = "recursive"
                                  )
report(model_roll, type = "VaR", VaR.alpha = 0.01, conf.level = 0.95)

############################ STANDARDISE RESIDUALS ####################################
standardized_resid <- model_fit@fit$residuals / model_fit@fit$sigma # correct?


########################## Bootstrapping of standardised residuals###################
#No clue


############Passing of bootstrapped residuals in a forward simulation################ 
#using the estimated ARMA-GARCH model and the assumed Student t distribution



##################################Estimation of Hypothetical returns ##################



################################## VaR and ES estimates ################################
# on say 1,000 simulations for 5 trading days

Can someone help with from step 3 to 5 where I need to pass the bootstrap standardized residuals as some form of simulation and make the VaR and ES estimates?

Thanks in advance.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.