[R-SIG-Finance] understanding an error from ugarchfit
firhat.nawfan.h
firhat.nawfan.h at gmail.com
Tue May 27 21:02:25 CEST 2014
the dccfit had converged already, perhaps it have something to do with how
the dccspec? there are 2 kind of data fin series, and cg series, bot dccfit
converged in the first run, however when applied dccforecast the fin series
give error message while cg series have no problem
note: how to sign my messages with my real name?, i;m new here, usually i
visited in stackexchange to get answer
this is my code
mspec.ret.fin<-c()
for(i in 1:15)
{
mspec.ret.fin<-c(mspec.ret.fin,get(paste("spec.ugarch.ret.fin.",colnames(base.name[i]),sep="")))
}
mspec.ret.fin=multispec(mspec.ret.fin)
# specify dccspec
assign(paste("dcc.spec.ret.fin"),dccspec(get(paste("mspec.ret.fin")), VAR =
FALSE, robust = FALSE, lag = 1, lag.max = NULL, lag.criterion = c("AIC",
"HQ", "SC", "FPE"), external.regressors = NULL, robust.control =
list("gamma" = 0.25, "delta" = 0.01, "nc" = 10, "ns" = 500), dccOrder =
c(1,1), model = c("DCC"), groups = rep(1, length(uspec at spec)), distribution
= c("mvnorm"), start.pars = list(), fixed.pars = list()))
# specify data for dcc.fit
merge.list.data.dcc.fit.ret.fin<-as.character(list())
for (i in 1:15)
{
merge.list.data.dcc.fit.ret.fin<-append(merge.list.data.dcc.fit.ret.fin,paste("resid.ret.fin.",colnames(base.name[i]),sep=""))
}
merge.name.data.dcc.fit.ret.fin<-lapply(merge.list.data.dcc.fit.ret.fin,get)
names(merge.name.data.dcc.fit.ret.fin)<-merge.list.data.dcc.fit.ret.fin
data.dcc.fit.ret.fin<-do.call(merge,merge.name.data.dcc.fit.ret.fin)
# adjust data for dcc.fit for different starting point in coloumn
if (exists("dcc.fit.adj.ret.fin")==TRUE)
{
if(dcc.fit.adj.ret.fin>=0)
{
set.data.dcc.fit.ret.fin<-data.dcc.fit.ret.fin[-c(1:dcc.fit.adj.ret.fin),]
}
else
{
set.data.dcc.fit.ret.fin<-data.dcc.fit.ret.fin
}
}
if (exists("dcc.fit.adj.ret.fin")==FALSE)
{
set.data.dcc.fit.ret.fin<-data.dcc.fit.ret.fin
}
# performing dcc.fit
dcc.fit.ret.fin<-dccfit(dcc.spec.ret.fin, set.data.dcc.fit.ret.fin,
out.sample = 30, solver = "gosolnp", solver.control = list(),fit.control =
list(eval.se = TRUE, stationarity = TRUE, scale = FALSE), cluster = NULL,
fit = NULL, VAR.fit = NULL)
dcc.fit.ret.cg<-dccfit(dcc.spec.ret.cg, set.data.dcc.fit.ret.cg, out.sample
= 30,
--
View this message in context: http://r.789695.n4.nabble.com/understanding-an-error-from-ugarchfit-tp4684836p4691323.html
Sent from the Rmetrics mailing list archive at Nabble.com.
More information about the R-SIG-Finance
mailing list