stopifnot(require("timeSeries"))
## Swiss Pension fund Index
data(LPP2005REC, package = "timeSeries")
x <- as.timeSeries(LPP2005REC)
## Fit LPP40 Bechmark:
fit <- garchFit(LPP40 ~ garch(1, 1), data = 100*x, trace = FALSE)
fit
fitted <- fitted(fit)
head(fitted)
class(fitted)
res <- residuals(fit)
head(res)
class(res)
Run the code above in your browser using DataLab