[R-SIG-Finance] Back test report in Rugarch
alexios ghalanos
alexios at 4dscape.com
Wed May 2 16:51:00 CEST 2012
Have you checked your data and code carefully?
e.g. Does your data have 975+ points (875 for forecast and 100 for
initializing the rolling estimation)?
I can't replicate your error and it is likely that you have forgotten
something:
library(rugarch)
data(sp500ret)
spec=ugarchspec()
rollD2 = ugarchroll(spec, data = as.numeric(sp500ret[1:975,1]), n.ahead
= 1, forecast.length = 875,
refit.every = 25, refit.window = "recursive", parallel = TRUE,
parallel.control = list(pkg = "snowfall", cores = 10), solver = "solnp",
solver.control = list(tol = 1e-05, delta = 1e-06, trace = 0),
calculate.VaR = TRUE, VaR.alpha = c(0.010, 0.05))
report(rollD2, type = "VaR", n.ahead = 1, VaR.alpha = 0.01, conf.level =
0.95)
################################
Backtest Length: 875
################################
Please check your code VERY carefully before submitting.
-Alexios
On 02/05/2012 15:35, Papa sen wrote:
> Dear alexios and kerpel,
> Thanks so much for your comments. However, Alexios, I used the same
> codes and changed the backtest length =875 and yet got a report of 500
> to be the backtest length.
> Kind regards,
> p.s
>
> ------------------------------------------------------------------------
> *Da:* alexios ghalanos <alexios at 4dscape.com>
> *A:* Papa sen <papa.senyo at yahoo.it>
> *Cc:* "r-sig-finance at r-project.org" <r-sig-finance at r-project.org>
> *Inviato:* Mercoledì 2 Maggio 2012 15:49
> *Oggetto:* Re: [R-SIG-Finance] Back test report in Rugarch
>
> What are you having trouble understanding? The Null Hypothesis is
> clearly stated and the test also provides the 'decision' on whether to
> reject the Null at the given confidence level.
> Type ?VaRTest if you want a more detailed description of what each
> parameter means, or read the vignette for a description of what the test
> does with the literature reference.
> As to the backtest length "not changing", you do not state under which
> circumstances you experienced such as an error. From your code you
> requested a forecast length of 500 which is what you got in the
> resulting output.
>
> -Alexios
>
> On 02/05/2012 14:25, Papa sen wrote:
> > Please find some sample codes:
> > rollD = ugarchroll(spec4, data = as.numeric(ret), n.ahead = 1,
> forecast.length = 500,
> > refit.every = 25, refit.window = "recursive", parallel = TRUE,
> > parallel.control = list(pkg = "snowfall", cores = 10), solver = "solnp",
> > solver.control = list(tol = 1e-05, delta = 1e-06, trace = 0),
> > calculate.VaR = TRUE, VaR.alpha = c(0.010, 0.05))
> >
> > report(rollD, type = "VaR", n.ahead = 1, VaR.alpha = 0.01, conf.level
> = 0.95)
> > report(rollD, type="fpm")
> >
> >
> >
> > ________________________________
> > Da: John Kerpel<john.kerpel at gmail.com <mailto:john.kerpel at gmail.com>>
> >
> > Cc: "r-sig-finance at r-project.org
> <mailto:r-sig-finance at r-project.org>"<r-sig-finance at r-project.org
> <mailto:r-sig-finance at r-project.org>>
> > Inviato: Mercoledì 2 Maggio 2012 15:09
> > Oggetto: Re: [R-SIG-Finance] Back test report in Rugarch
> >
> >
> > Are you using the ugarchroll method? Show some code...
> >
> >
> >
> >
> > Dear all,
> >> Please I did backtesting using rugarch and got the following.
> Finding it difficult to make sense of out of the result.
> >> Please any help would be appreciated. I need some few comments. Also
> it appears that the backtest length does not change (i may be wrong)Find
> the output below:
> >> VaR Backtest Report
> >> ===========================================
> >> Model: fGARCH-std
> >> Backtest Length: 500
> >> Data:
> >> ==========================================
> >> alpha: 1%
> >> Expected Exceed: 5
> >> Actual VaR Exceed: 4
> >> Actual %: 0.8%
> >> Unconditional Coverage (Kupiec)
> >> Null-Hypothesis: Correct Exceedances
> >> LR.uc Statistic: 0.217
> >> LR.uc Critical: 3.841
> >> LR.uc p-value: 0.641
> >> Reject Null: NO
> >> Conditional Coverage (Christoffersen)
> >> Null-Hypothesis: Correct Exceedances&
> >> Independence of Failures
> >> LR.cc Statistic: 0.282
> >> LR.cc Critical: 5.991
> >> LR.cc p-value: 0.869
> >> Reject Null: NO
> >> kind regards,
> >> paps
> >> [[alternative HTML version deleted]]
> >>
> >>
> >> _______________________________________________
> >> R-SIG-Finance at r-project.org <mailto:R-SIG-Finance at r-project.org>
> mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> >> -- Subscriber-posting only. If you want to post, subscribe first.
> >> -- Also note that this is not the r-help list where general R
> questions should go.
> >>
> > [[alternative HTML version deleted]]
> >
> >
> >
> >
> > _______________________________________________
> > R-SIG-Finance at r-project.org <mailto:R-SIG-Finance at r-project.org>
> mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R
> questions should go.
>
>
>
More information about the R-SIG-Finance
mailing list