Hi there,

I am currently preparing an out-of-sample backtest (one-day-ahead) by carefully using the methods ugarchfilter and ugarchpath. In a next step I would need to simulate my own dataset. I would like to simulate from a bivariate copula and then applying the inverse cumulative distribution functions of each leg separately. This looks as follows (excerpt):

      library(rugarch)
      library(copula)
      n <- 1000
      dcop <- gumbelCopula(2.961, dim = 2)
      simgumcop <- rcopula(dcop,n)

      simgumcop[,1] = qdist(distribution = "sged", simgumcop[,1], mu = 0, sigma = 1, skew = skew_WTI, shape = shape_WTI)
      simgumcop[,2] = qdist(distribution = "sged", simgumcop[,2], mu = 0, sigma = 1, skew = skew_Brent, shape = shape_Brent)

Now it would like to put those simulations back in the backtesting framework package. Is there a way to incorporate those samples in the ugarchpath (i.e. I provide the simulations and ugarchpath is doing the rest)? Or maybe another function that can help?

      for(i in 1:100){
                # filter the data upto time T+i-1 with the coefficients
                # estimated from the model upto time T
                filt = ugarchfilter(specf, data = nrenditen[1:(1001+i-1)], n.old = 1001)
                # use lagged values prior to the next forecast:
           path = ugarchpath(specf, n.sim=1, m.sim= numsim, presigma = tail(sigma(filt),3), prereturns = nrenditen[(1001+i-3):(1001+i-1)], preresiduals = tail(residuals(filt),3))
                fsim[,i] = as.numeric(fitted(path))
      }

Many thanks in advance.

Mit freundlichen Grüßen / Kind regards

Stefan Jäschke
RWE Supply & Trading GmbH
Risk Origination & Industrial Sales (MFM-R)
Altenessener Str. 27
45141 Essen
Germany
Phone           +49 201 5179-1674
Mobile                     +49 162-2596816
Email           stefan.jaeschke@rwe.com
____________________________________________________

Supervisory Board: Peter Terium (Chairman)
Management Board:
Stefan Judisch (CEO),
Dr Markus Krebber, Alan Robinson
Headquarters: Essen
Registered at Local District Court, Essen
Commercial Registry No.: HRB 14327
Sales Tax ID No.: DE 8130 22 070

Please consider the environment before printing this e-mail





	[[alternative HTML version deleted]]

