3.2. 3.2. モデル作成 モデル作成 #書式: garchFit( ~ garch(P, Q), data = topix.return, trace = FALSE ) topix.garch <- as.list(NULL) i <- 1; for (P in 1:5){ for (Q in 0:5){ topix.garch[[i]] <- try( eval( parse( text = paste("garchFit( ~ garch(", P ,", ", Q , "), data = topix.return, trace = FALSE )" ) )), silent = TRUE) i <- i + 1 } } opt.topix.garch <- Reduce(function(x,y) if(x@fit$ics[1] < y@fit$ics[1]){x} else{y}, topix.garch) 2012/03/10 RでGARCHモデル