by linlin
Last Updated September 12, 2019 01:19 AM

I simulate a garch(1,1) series, and use garch and garchFit to build model.

the acf plots of residual of garch and garchFit model is quite similar. But the acf plots of residual^2 are different, the acf of residuals^2 of garch{tseries} shows the process is white noise, but the acf of residuals^2 of garchFit{fGarch} shows that the process is not white noise. Is there anything wrong?

```
# alpha_1 = 0.5 and beta_1 = 0.3
set.seed(2)
a0 <- 0.2
a1 <- 0.5
b1 <- 0.3
w <- rnorm(10000)
eps <- rep(0, 10000)
sigsq <- rep(0, 10000)
for (i in 2:10000) {
sigsq[i] <- a0 + a1 * (eps[i-1]^2) + b1 * sigsq[i-1]
eps[i] <- w[i]*sqrt(sigsq[i])
}
# Plot the correlograms of both the residuals
# and the squared residuals
acf(eps)
acf(eps^2)
# Include the tseries time series library
require(tseries)
# Fit a GARCH model to the series and calculate
# confidence intervals for the parameters at the
# 97.5% level
eps.garch <- garch(eps, trace=FALSE)
confint(eps.garch)
acf(eps.garch$residuals,na.action = na.pass)
acf(eps.garch$residuals^2,na.action = na.pass) # white noise process
eps.fitgarch <- garchFit(~garch(1,1), data = eps)
acf([email protected])
acf([email protected]^2) # not white noise process```
```

- ServerfaultXchanger
- SuperuserXchanger
- UbuntuXchanger
- WebappsXchanger
- WebmastersXchanger
- ProgrammersXchanger
- DbaXchanger
- DrupalXchanger
- WordpressXchanger
- MagentoXchanger
- JoomlaXchanger
- AndroidXchanger
- AppleXchanger
- GameXchanger
- GamingXchanger
- BlenderXchanger
- UxXchanger
- CookingXchanger
- PhotoXchanger
- StatsXchanger
- MathXchanger
- DiyXchanger
- GisXchanger
- TexXchanger
- MetaXchanger
- ElectronicsXchanger
- StackoverflowXchanger
- BitcoinXchanger
- EthereumXcanger