fGarch: how to use garchFit() in loop?

Marius Hofert marius.hofert at math.ethz.ch
Mon Aug 16 11:21:52 CEST 2010


Hallo fGarch expeRts,

Ich wuerde gerne Garch Modelle verschiedener Ordnung in einer Schleife fitten. Was ist bei folgendem Code falsch?

library(fGarch)
spec <- garchSpec(model = list(alpha = 0.1, beta = c(0.4, 0.4)))
Xt <- garchSim(spec, n = 100)
x <- list()
for(q in 1:3){
	print(q)
	x[q] <- list(garchFit(~garch(1,q), data = Xt, trace = FALSE))
}

Herzliche Gruesse

Marius Hofert

Ps: s. auch http://r.789695.n4.nabble.com/fGarch-how-to-use-garchFit-in-loop-td2326209.html



ETH Zurich
Dr. Marius Hofert
Department of Mathematics
HG G 37.2
Rämistrasse 101
8092 Zurich
Switzerland

marius.hofert at math.ethz.ch
+41 44 632 24 23 phone
http://www.math.ethz.ch/~hofertj/



More information about the Rmetrics-core mailing list