Preamble

library("e1071")     # kurtosis
library("forecast")  # Acf, Pacv
library("rugarch")   # ugarch*
Loading required package: methods
Loading required package: parallel

Attaching package: 'rugarch'
The following object is masked from 'package:stats':

    sigma
library("tseries")   # garch

source("http://ptrckprry.com/course/forecasting/code/ad.test.R") # ad.test

Simulated ARCH(2)

n <- 600
arch2.spec = ugarchspec(variance.model = list(garchOrder=c(2,0)), 
                        mean.model = list(armaOrder=c(0,0)),
                        fixed.pars=list(mu = 0, omega=0.25, alpha1=0.6, alpha2=0.35))
arch2.sim <- ugarchpath(arch2.spec, n.sim=n)
x <- drop(arch2.sim@path$seriesSim)[101:600]
time <- 1:length(x)

Time Series Plot

plot(time, x, type="l", col=2)

ACFs, PACFs

Original Series

par(mfrow=c(1,2))
Acf(x)
Pacf(x)

Squares

par(mfrow=c(1,2))
Acf(x^2)
Pacf(x^2)