|
Hi all,
While trying to bootstrap a TGARCH model of orders (1,1), using the rugarch package, I get the following error: .fgarchsim2(fit = fit, n.sim = n.sim, n.start = n.start, m.sim = m.sim, : ugarchsim-->error: presigma must be of length 2 I only get the error when my ARMA model for the mean is of order 2 or higher (in p, q or both). Curious whether this is a bug that anyone has documented before. If not, I would be happy to provide my code and data sample. It could also be a mis-specification in my model and/or an error in the code of course. Best, Stoyan
Stoyan Stoyanov
The University of Chicago Booth School of Business MBA Class of 2013 (312) 532-0120 | stoyanov@chicagobooth.edu |
|
Hi Stoyan,
You need to provide at a minimum the code you used. When you say bootstrap which function are you referring to (ugarchsim or ugarchboot)? In any case I cannot replicate the error under the following set of assumptions: library(rugarch) data(sp500ret) spec = ugarchspec(mean.model=list(armaOrder=c(3,2)), variance.model=list(model="fGARCH",submodel="TGARCH")) fit=ugarchfit(spec, sp500ret) # These all work: sim = ugarchsim(fit, n.sim = 1, m.sim=200, startMethod="unconditional") sim = ugarchsim(fit, n.sim = 1, m.sim=200, startMethod="sample") bt=ugarchboot(fit, method = "Partial", n.bootfit = 200) (the use of .fgarchsim2 means that (n.sim+n.start) < 100 && m.sim > 100...this makes use of C++ code whereas the opposite case is based on C code). Regards, Alexios On 25/06/2012 22:58, stoyan.stoyanov wrote: > Hi all, > > While trying to bootstrap a TGARCH model of orders (1,1), using the rugarch > package, I get the following error: > > .fgarchsim2(fit = fit, n.sim = n.sim, n.start = n.start, m.sim = m.sim, : > ugarchsim-->error: presigma must be of length 2 > > I only get the error when my ARMA model for the mean is of order 2 or higher > (in p, q or both). Curious whether this is a bug that anyone has documented > before. If not, I would be happy to provide my code and data sample. It > could also be a mis-specification in my model and/or an error in the code of > course. > > Best, > Stoyan > > -- > View this message in context: http://r.789695.n4.nabble.com/RUGARCH-bootstrap-fitting-error-presigma-length-tp4634470.html > Sent from the Rmetrics mailing list archive at Nabble.com. > > _______________________________________________ > [hidden email] 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. > _______________________________________________ [hidden email] 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. |
|
In reply to this post by stoyan.stoyanov
Hi Alexios,
I am using 1372 daily adjusted returns on IBM (csv attached). Code: spec=ugarchspec(variance.model = list(model = "fGARCH", garchOrder = c(3,3), submodel = "TGARCH", external.regressors = NULL, variance.targeting = TRUE), mean.model = list (armaOrder = c(best.p,best.q), include.mean = mean, archm = FALSE, archpow = 1, arfima = FALSE, external.regressors = NULL, archex = FALSE), distribution.model = "std", start.pars = list(), fixed.pars = list()) fit=ugarchfit(spec, data, out.sample = 0, solver = "solnp", solver.control = list(), fit.control = list(stationarity = 1, fixed.se = 0, scale = 0)) boot.pred=ugarchboot(fit, data = NULL, method = "full", n.ahead = 5, n.bootfit = 5, n.bootpred = 500, out.sample = 0, rseed = NA, solver = "solnp", solver.control = list(), fit.control = list(), external.forecasts = list(mregfor = NULL, vregfor = NULL), parallel = FALSE, parallel.control = list(pkg = c("multicore", "snowfall"), cores = 2)) Error: fitting stage...done! prediction stage... Error in .fgarchsim2(fit = fit, n.sim = n.sim, n.start = n.start, m.sim = m.sim, : ugarchsim-->error: presigma must be of length 2 Again, I get the error with anything higher than an ARMA(1,1). Hope this information is sufficient. I get the same error with a different data set too. Data: data.csv Thanks, Stoyan
Stoyan Stoyanov
The University of Chicago Booth School of Business MBA Class of 2013 (312) 532-0120 | stoyanov@chicagobooth.edu |
|
Thanks,
That's another bug caught and fixed (revision 424). Regards, Alexios On 26/06/2012 13:53, stoyan.stoyanov wrote: > Hi Alexios, > > I am using 1372 daily adjusted returns on IBM (csv attached). > > *Code:* > spec=ugarchspec(variance.model = list(model = "fGARCH", garchOrder = c(3,3), > submodel = "TGARCH", external.regressors = NULL, > variance.targeting = TRUE), > mean.model = list (armaOrder = c(best.p,best.q), > include.mean = mean, archm = FALSE, > archpow = 1, arfima = FALSE, external.regressors = > NULL, archex = FALSE), > distribution.model = "std", start.pars = list(), fixed.pars > = list()) > > fit=ugarchfit(spec, data, out.sample = 0, solver = "solnp", solver.control = > list(), > fit.control = list(stationarity = 1, fixed.se = 0, scale = > 0)) > > boot.pred=ugarchboot(fit, data = NULL, method = "full", n.ahead = 5, > n.bootfit = 5, n.bootpred = 500, out.sample = 0, rseed = NA, > solver = "solnp", > solver.control = list(), fit.control = list(), > external.forecasts = list(mregfor = NULL, vregfor = NULL), > parallel = FALSE, > parallel.control = list(pkg = c("multicore", "snowfall"), > cores = 2)) > > *Error:* > fitting stage...done! > > prediction stage... > Error in .fgarchsim2(fit = fit, n.sim = n.sim, n.start = n.start, m.sim = > m.sim, : > > ugarchsim-->error: presigma must be of length 2 > > Again, I get the error with anything higher than an ARMA(1,1). Hope this > information is sufficient. I get the same error with a different data set > too. > > *Data:* > http://r.789695.n4.nabble.com/file/n4634505/data.csv data.csv > > Thanks, > Stoyan > > -- > View this message in context: http://r.789695.n4.nabble.com/RUGARCH-bootstrap-fitting-error-presigma-length-tp4634470p4634505.html > Sent from the Rmetrics mailing list archive at Nabble.com. > > _______________________________________________ > [hidden email] 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. > _______________________________________________ [hidden email] 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. |
| Powered by Nabble | Edit this page |
