[R-SIG-Finance] Question regarding ugarchroll in rugarch package.

alexios ghalanos alexios at 4dscape.com
Wed Jul 31 15:57:03 CEST 2013


Since that example was written (?ugarchroll), additional checks were 
introduced in the function convergence including one for testing whether
the hessian at the optimal can be inverted (which is why it fails...and
most likely related to the scaling of the variance intercept).

This is why you have the "resume" method:
#----------------------------------------------
library(rugarch)
data(sp500ret)
spec = ugarchspec(distribution.model = "std")

mod = ugarchroll(spec, data = sp500ret, n.ahead = 1,
n.start = 1000,  refit.every = 100, refit.window = "moving",
solver.control=list(tol=1e-5, delta=1e-6),
calculate.VaR = TRUE, VaR.alpha = c(0.01, 0.025, 0.05),
keep.coef = TRUE)
# some warnings about the hessian and prompt to resubmit the
# returned object...this should work.
mod = resume(mod, solver="gosolnp",solver.control=list(tol=1e-4,delta=1e-5))
#----------------------------------------------

You should also try to get the latest version from the teatime project 
on r-forge (https://r-forge.r-project.org/R/?group_id=1721), though at 
the moment it is not building as a result of a dependency build problem,
and the absence of full time support and maintenance on r-forge.

As to the differences with the blog post, I think the first paragraph of 
the post is quite clear:

"The rugarch package contains a rolling volatility forecast function 
called ugarchroll, but in this example I will show how easy it is to 
create a quick custom function."

As mentioned numerous times on this list, the ugarchroll function is a 
convenience "wrapper" for ugarchfit and ugarchforecast, as are most
"roll" functions to be found in R.

-Alexios




On 31/07/2013 14:07, Shuo Wang wrote:
> Hi,
>
> it seems the example provided in the ugarchroll function here
> http://cran.r-project.org/web/packages/rugarch/rugarch.pdf doesnt converge.
>
> Also I am a little bit new to R, I am seeing Alexio also posted an example
> in calculating the rolling garch here
> http://www.unstarched.net/2012/12/26/rolling-garch-forecasts/
>
> May I please know the difference of this example from using ugarchroll
> function?
>
>
>
> _______________________________________________
> 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