Hanyue Kuang I used the data of the monthly ATT returns and made comparison between GARCH and autoArima.
loading packages and datasett
## Warning: package 'fGarch' was built under R version 3.5.2
## Warning: package 'forecast' was built under R version 3.5.2
## Warning: package 'data.table' was built under R version 3.5.2
## [1] 0
## [1] 0
## Warning in kpss.test(att_ts): p-value greater than printed p-value
##
## KPSS Test for Level Stationarity
##
## data: att_ts
## KPSS Level = 0.28233, Truncation lag parameter = 3, p-value = 0.1
##
## Box-Pierce test
##
## data: att_ts
## X-squared = 0.093234, df = 1, p-value = 0.7601
fit Garch model and autoarima
fit_garch <- garchFit(formula = ~ garch(1, 1),data =att_ts)
##
## Series Initialization:
## ARMA Model: arma
## Formula Mean: ~ arma(0, 0)
## GARCH Model: garch
## Formula Variance: ~ garch(1, 1)
## ARMA Order: 0 0
## Max ARMA Order: 0
## GARCH Order: 1 1
## Max GARCH Order: 1
## Maximum Order: 1
## Conditional Dist: norm
## h.start: 2
## llh.start: 1
## Length of Series: 84
## Recursion Init: mci
## Series Scale: 0.03920793
##
## Parameter Initialization:
## Initial Parameters: $params
## Limits of Transformations: $U, $V
## Which Parameters are Fixed? $includes
## Parameter Matrix:
## U V params includes
## mu -0.78740762 0.7874076 0.07874076 TRUE
## omega 0.00000100 100.0000000 0.10000000 TRUE
## alpha1 0.00000001 1.0000000 0.10000000 TRUE
## gamma1 -0.99999999 1.0000000 0.10000000 FALSE
## beta1 0.00000001 1.0000000 0.80000000 TRUE
## delta 0.00000000 2.0000000 2.00000000 FALSE
## skew 0.10000000 10.0000000 1.00000000 FALSE
## shape 1.00000000 10.0000000 4.00000000 FALSE
## Index List of Parameters to be Optimized:
## mu omega alpha1 beta1
## 1 2 3 5
## Persistence: 0.9
##
##
## --- START OF TRACE ---
## Selected Algorithm: nlminb
##
## R coded nlminb Solver:
##
## 0: 118.24251: 0.0787408 0.100000 0.100000 0.800000
## 1: 118.14328: 0.0787586 0.103795 0.0871596 0.800160
## 2: 118.10817: 0.0787648 0.108723 0.0859724 0.803882
## 3: 118.07994: 0.0787720 0.108181 0.0798710 0.802459
## 4: 118.02625: 0.0787901 0.116690 0.0725467 0.808126
## 5: 118.00750: 0.0788084 0.117167 0.0616287 0.807243
## 6: 117.98221: 0.0788501 0.123494 0.0560356 0.814219
## 7: 117.97689: 0.0790078 0.117231 0.0514669 0.821713
## 8: 117.97248: 0.0791848 0.109536 0.0531968 0.828993
## 9: 117.97192: 0.0798679 0.105114 0.0520570 0.833909
## 10: 117.97151: 0.0807103 0.104548 0.0513306 0.836132
## 11: 117.97039: 0.0831826 0.107457 0.0542736 0.830701
## 12: 117.96931: 0.0857125 0.107604 0.0539238 0.830500
## 13: 117.96905: 0.0877053 0.107436 0.0535938 0.830711
## 14: 117.96905: 0.0877060 0.107501 0.0536068 0.830637
## 15: 117.96905: 0.0877056 0.107497 0.0536070 0.830641
##
## Final Estimate of the Negative LLH:
## LLH: -154.0966 norm LLH: -1.834483
## mu omega alpha1 beta1
## 0.0034387546 0.0001652505 0.0536070350 0.8306408953
##
## R-optimhess Difference Approximated Hessian Matrix:
## mu omega alpha1 beta1
## mu -57594.85958 161242.8 734.4536 52.55743
## omega 161242.77317 -668723733.8 -841263.1931 -965193.48994
## alpha1 734.45362 -841263.2 -1470.1808 -1299.88140
## beta1 52.55743 -965193.5 -1299.8814 -1444.25994
## attr(,"time")
## Time difference of 0.006131887 secs
##
## --- END OF TRACE ---
##
##
## Time to Estimate Parameters:
## Time difference of 0.04643202 secs
summary(fit_garch) # AIC = -3.573728
##
## Title:
## GARCH Modelling
##
## Call:
## garchFit(formula = ~garch(1, 1), data = att_ts)
##
## Mean and Variance Equation:
## data ~ garch(1, 1)
## <environment: 0x7fde786f0b68>
## [data = att_ts]
##
## Conditional Distribution:
## norm
##
## Coefficient(s):
## mu omega alpha1 beta1
## 0.00343875 0.00016525 0.05360704 0.83064090
##
## Std. Errors:
## based on Hessian
##
## Error Analysis:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.0034388 0.0042900 0.802 0.423
## omega 0.0001653 0.0002206 0.749 0.454
## alpha1 0.0536070 0.0624689 0.858 0.391
## beta1 0.8306409 0.1771629 4.689 2.75e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Log Likelihood:
## 154.0966 normalized: 1.834483
##
## Description:
## Thu Apr 18 14:32:10 2019 by user:
##
##
## Standardised Residuals Tests:
## Statistic p-Value
## Jarque-Bera Test R Chi^2 0.5591776 0.7560946
## Shapiro-Wilk Test R W 0.989239 0.718194
## Ljung-Box Test R Q(10) 16.18844 0.09436363
## Ljung-Box Test R Q(15) 17.67395 0.2801948
## Ljung-Box Test R Q(20) 20.10782 0.4512034
## Ljung-Box Test R^2 Q(10) 5.652062 0.8435996
## Ljung-Box Test R^2 Q(15) 10.84577 0.7634486
## Ljung-Box Test R^2 Q(20) 13.3288 0.8628353
## LM Arch Test R TR^2 8.299717 0.7612918
##
## Information Criterion Statistics:
## AIC BIC SIC HQIC
## -3.573728 -3.457974 -3.577994 -3.527196
fit_autoarima <- auto.arima(att_ts)
summary(fit_autoarima) # AIC= -304.23
## Series: att_ts
## ARIMA(0,0,0) with zero mean
##
## sigma^2 estimated as 0.001528: log likelihood=153.12
## AIC=-304.23 AICc=-304.18 BIC=-301.8
##
## Training set error measures:
## ME RMSE MAE MPE MAPE MASE
## Training set 0.003087262 0.03909593 0.03072655 100 100 0.7138077
## ACF1
## Training set -0.03331558
garch_fc <- predict(fit_garch, n.ahead=6)
autoplot(att_ts, series = "Data") +
autolayer(ts(fitted(fit_garch), start = 1961, frequency = 12), series = "Fitted")+
ggtitle("GARCH: data VS fitted")
autoplot(att_ts, series = "Data") +
autolayer(fit_autoarima$fitted, series = "Fited")+
ggtitle("AUTOARIMA: data VS fitted")
autoplot(att_ts, series = "Data") +
autolayer(ts(garch_fc$meanForecast, start = 1968, frequency = 12),series = "Forecast") +
ggtitle("GARCH: forecast")
autoplot(att_ts, series = "Data") +
autolayer(forecast(fit_autoarima, h = 6), series = "Forecast") +
ggtitle("AUTOARIMA: forecast")
The AIC of GARCH model is much lower than autoarima. The fitted value is almost the same with the original data. The predict of GARCH has no predict intervals, just "meanForecast","meanErroa" and "standard deviation". From the fitted plot, we can see that the autoarima model is not a good model though the anaylsis before show the resonable choice of (0,0,0).