[R] Rugarch issue. Any help would be great!
Scottyfromaussie
20282734 at student.uwa.edu.au
Wed Nov 6 06:27:53 CET 2013
Hi there
I'm having a bit of trouble with my code that I'm writing.
Essentially I'm trying to do a rolling eGARCH forecast for a dataset, namely
DataExplorers which is a portfolio of gold exploration stocks.
I'm hoping to get it so that it calculates the eGARCH for each day and
refits itself each day.
The error message I keep getting is
/"Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf"/
I've been googling this issue and trying to adjust the parameters in
ugarchroll. When I do this I get other errors such as
/"Warning message:
In .makefitmodel(garchmodel = "eGARCH", f = .egarchLLH, T = T, m = m, :
rugarch-->warning: failed to invert hessian"/
and
/"Warning message:
In .rollfdensity(spec = spec, data = data, n.ahead = n.ahead,
forecast.length = forecast.length, :
non-converged estimation windows present...resubsmit object with different
solver parameters..."/
Has anyone got an idea whats going wrong? Thanks to anyone who replies, I'm
sure you've got better things to go than answer my questions :)
Scotty
My code is as follows:
library(rugarch)
setwd("C:/Users/Scott/Dropbox/Stat 7444 Project/")
##Data Bank##
goldstockdata = read.csv("DataExplorers.csv", header = TRUE)
t = log(goldstockdata)[1:2500,"Adj.Close"]
goldstockreturns <- diff(log(t))
## Specify GARCH Parameters ##
model=ugarchspec (
variance.model = list(model = "eGARCH", garchOrder = c(1, 1)),
mean.model = list(armaOrder = c(1, 1)),
distribution.model = "std"
)
stockmodelroll=ugarchroll (
spec=model, data=goldstockreturns, n.ahead = 1,
n.start = 1, refit.every = 1, refit.window = c("recursive"),
window.size = 1, solver = "hybrid", fit.control = list(),
solver.control = list(), calculate.VaR = FALSE, VaR.alpha = c(0.01,
0.05),
cluster = NULL, keep.coef = TRUE
)
str(stockmodelroll at forecast)
stockgarch=stockmodelroll at forecast$density[,"Sigma"]
plot(stockgarch)
--
View this message in context: http://r.789695.n4.nabble.com/Rugarch-issue-Any-help-would-be-great-tp4679841.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list