library(tseries)
library(astsa)
library(TSA)
library(sarima)
library(forecast)
library(FinTS)
library(fGarch)
library(rugarch)



#get loreal OR.PA data using quantmod
library(quantmod)
LR<-getSymbols("OR.PA",from='2015-10-01',to='2020-10-31',auto.assign = FALSE)
## 'getSymbols' currently uses auto.assign=TRUE by default, but will
## use auto.assign=FALSE in 0.5-0. You will still be able to use
## 'loadSymbols' to automatically load data. getOption("getSymbols.env")
## and getOption("getSymbols.auto.assign") will still be checked for
## alternate defaults.
## 
## This message is shown once per session and may be disabled by setting 
## options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.
## Warning: OR.PA contains missing values. Some functions will not work if objects
## contain missing values in the middle of the series. Consider using na.omit(),
## na.approx(), na.fill(), etc to remove or replace them.
head(LR)
##            OR.PA.Open OR.PA.High OR.PA.Low OR.PA.Close OR.PA.Volume
## 2015-10-01     157.00     157.25    152.50      152.75       853373
## 2015-10-02     154.10     156.15    152.15      155.55      1292841
## 2015-10-05     158.45     161.05    157.40      160.30       821507
## 2015-10-06     159.75     161.95    159.30      160.70       676273
## 2015-10-07     160.90     161.75    160.15      160.95       972618
## 2015-10-08     160.15     162.55    160.15      162.05       871653
##            OR.PA.Adjusted
## 2015-10-01       137.9632
## 2015-10-02       140.4921
## 2015-10-05       144.7823
## 2015-10-06       145.1436
## 2015-10-07       145.3694
## 2015-10-08       146.3629
#LR chart
chartSeries(LR)

#LR Adjusted Chart
LR<-LR$OR.PA.Adjusted
head(LR)
##            OR.PA.Adjusted
## 2015-10-01       137.9632
## 2015-10-02       140.4921
## 2015-10-05       144.7823
## 2015-10-06       145.1436
## 2015-10-07       145.3694
## 2015-10-08       146.3629
chartSeries(LR)

ts.plot(LR, main = "Time Series Plot of Loreal Stock Price");abline(h=0)

acf(LR,na.action = na.pass, main = "ACF Loreal Stock Price")

pacf(LR,na.action = na.pass, main = "PACF Loreal Stock Price")

#omit NA values
LR<-na.omit(LR)

#test for stationary
adf.test(LR)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  LR
## Dickey-Fuller = -3.0529, Lag order = 10, p-value = 0.1326
## alternative hypothesis: stationary

LOREAL STOCK PRICES

Time Series Plot: Upward trend. There is change of variance (volatility clustering was observed).

ACF: Slowly decay.

PACF: Shows sharp cut-off at lag 4.

Adf test: P-value more than alpha=0.05. Null hypothesis is not rejected. It is not stationary.

Conclusion: Differencing is needed to perform.

r.LR=diff(log(LR))

#omit NA values
r.LR<-na.omit(r.LR)

ts.plot(r.LR, main = "Time Series Plot of Loreal Return");abline(h=0)

acf(r.LR, main = "ACF Loreal Return")

pacf(r.LR, main = "PACF Loreal Return")

adf.test(r.LR)
## Warning in adf.test(r.LR): p-value smaller than printed p-value
## 
##  Augmented Dickey-Fuller Test
## 
## data:  r.LR
## Dickey-Fuller = -12.797, Lag order = 10, p-value = 0.01
## alternative hypothesis: stationary

LOREAL RETURNS (Diff and log)

Time Series Plot: There is change of variance (volatility clustering was observed).

ACF: No significant lags.

PACF: No significant lags except the outlier lag 8.

Adf test: P-value less than alpha=0.05. Null hypothesis is rejected. It is stationary.

Conclusion: White noise model is suggested.

#first fitting with white noise model
model1<-astsa::sarima(r.LR,0,0,0)
## initial  value -4.318452 
## iter   1 value -4.318452
## final  value -4.318452 
## converged
## initial  value -4.318452 
## iter   1 value -4.318452
## final  value -4.318452 
## converged

acf2(model1$fit$residuals,max.lag = 30)

##       [,1]  [,2]  [,3]  [,4]  [,5]  [,6]  [,7]  [,8]  [,9] [,10] [,11] [,12]
## ACF  -0.05 -0.04 -0.04 -0.01 -0.02 -0.02  0.00 -0.05 -0.01 -0.01 -0.04  0.02
## PACF -0.05 -0.04 -0.04 -0.01 -0.02 -0.02 -0.01 -0.06 -0.02 -0.01 -0.05  0.02
##      [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24]
## ACF   0.00  0.03  0.02  0.04  0.00  0.01 -0.02 -0.02 -0.02 -0.04 -0.01  0.02
## PACF -0.01  0.03  0.03  0.04  0.01  0.01 -0.02 -0.02 -0.02 -0.04 -0.01  0.02
##      [,25] [,26] [,27] [,28] [,29] [,30]
## ACF      0 -0.02  0.01  0.05  0.01  0.03
## PACF     0 -0.02  0.01  0.05  0.01  0.03
acf2(model1$fit$residuals^2,max.lag = 30)

##      [,1] [,2] [,3]  [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
## ACF  0.15 0.11 0.33  0.08 0.17 0.22 0.07 0.23 0.13  0.08  0.19  0.13  0.10
## PACF 0.15 0.09 0.31 -0.01 0.13 0.10 0.00 0.15 0.00  0.03  0.05  0.05  0.01
##      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
## ACF   0.10  0.08  0.07  0.06  0.09  0.08  0.06  0.07  0.09  0.14  0.08  0.12
## PACF -0.03  0.01 -0.03 -0.02  0.03  0.01  0.00  0.00  0.04  0.10  0.01  0.08
##      [,26] [,27] [,28] [,29] [,30]
## ACF   0.14  0.04  0.06  0.05  0.08
## PACF  0.04 -0.03 -0.02 -0.06  0.04
eacf(model1$fit$residuals^2)
## AR/MA
##   0 1 2 3 4 5 6 7 8 9 10 11 12 13
## 0 x x x x x x x x x x x  x  x  x 
## 1 x o x x o x x x o o x  o  o  o 
## 2 x x x x x x x x o x x  o  o  o 
## 3 o x x o o o o o o o x  o  o  o 
## 4 o x x o o o o o x o x  o  o  o 
## 5 x x x x x o o o o o x  o  o  o 
## 6 o x x x x x o o o o x  o  o  o 
## 7 o x x x x x o o o o o  o  o  o

FITTING WITH WHITE NOISE MODEL

ACF of residuals: No significant lags can be observed which show no correlation.

ACF of squared residuals: Significant lags can be observed which show correlation.Non constant variance.

Conclusion: White noise is not suitable to be fitted.

#ts plot for absolute return
r.LRa<-abs(r.LR)
r.LRa.plot<-ts.plot(r.LRa, main = "Time Series Plot of Absolute Return");abline(h=0)

#ts plots for squared return
r.LRs<-(r.LR)^2
r.LRs.plot<-ts.plot(r.LRs, main = "Time Series Plot of Squared Return");abline(h=0)

#acf and pacf for absolute return
acf(r.LRa, main = "ÄCF Absolute Return")

pacf(r.LRa, main = "PÄCF Absolute Return")

#acf and pacf for squared return
acf(r.LRs, main = "ÄCF Squared Return")

pacf(r.LRs, main = "PÄCF Squared Return")

Box.test(r.LR,type = "Ljung-Box")
## 
##  Box-Ljung test
## 
## data:  r.LR
## X-squared = 3.7793, df = 1, p-value = 0.05189
Box.test(r.LRa,type = "Ljung-Box")
## 
##  Box-Ljung test
## 
## data:  r.LRa
## X-squared = 37.891, df = 1, p-value = 7.479e-10
Box.test(r.LRs,type = "Ljung-Box")
## 
##  Box-Ljung test
## 
## data:  r.LRs
## X-squared = 27.588, df = 1, p-value = 1.501e-07

BOX-LJUNG TEST FOR AUTOCORRELATION

Returns: P-value more than alpha=0.05. Null hypothesis is not rejected. It is serially uncorrelated.

Absolute returns: P-value less than alpha=0.05. Null hypothesis is rejected. It is serially correlated.

Squared returns: P-value less than alpha=0.05. Null hypothesis is rejected. It is serially correlated.

Conclusion: The returns are serially correlated.

#differencing had been done on return, hence d=0.
arma00<-arima(r.LR, order = c(0,0,0))
arma00
## 
## Call:
## arima(x = r.LR, order = c(0, 0, 0))
## 
## Coefficients:
##       intercept
##           5e-04
## s.e.      4e-04
## 
## sigma^2 estimated as 0.0001774:  log likelihood = 3763.57,  aic = -7525.14
arma10<-arima(r.LR,order = c(1,0,0))
arma10
## 
## Call:
## arima(x = r.LR, order = c(1, 0, 0))
## 
## Coefficients:
##           ar1  intercept
##       -0.0539      5e-04
## s.e.   0.0277      4e-04
## 
## sigma^2 estimated as 0.0001769:  log likelihood = 3765.46,  aic = -7526.92
arma20<-arima(r.LR,order = c(2,0,0))
arma20
## 
## Call:
## arima(x = r.LR, order = c(2, 0, 0))
## 
## Coefficients:
##           ar1      ar2  intercept
##       -0.0562  -0.0402      5e-04
## s.e.   0.0277   0.0278      3e-04
## 
## sigma^2 estimated as 0.0001766:  log likelihood = 3766.5,  aic = -7527.01
arma30<-arima(r.LR, order = c(3,0,0))
arma30
## 
## Call:
## arima(x = r.LR, order = c(3, 0, 0))
## 
## Coefficients:
##           ar1      ar2      ar3  intercept
##       -0.0580  -0.0428  -0.0439      5e-04
## s.e.   0.0277   0.0278   0.0278      3e-04
## 
## sigma^2 estimated as 0.0001763:  log likelihood = 3767.75,  aic = -7527.49
arma01<-arima(r.LR,order = c(0,0,1))
arma01
## 
## Call:
## arima(x = r.LR, order = c(0, 0, 1))
## 
## Coefficients:
##           ma1  intercept
##       -0.0589      5e-04
## s.e.   0.0290      3e-04
## 
## sigma^2 estimated as 0.0001769:  log likelihood = 3765.63,  aic = -7527.25
arma02<-arima(r.LR,order = c(0,0,2))
arma02
## 
## Call:
## arima(x = r.LR, order = c(0, 0, 2))
## 
## Coefficients:
##           ma1      ma2  intercept
##       -0.0602  -0.0433      5e-04
## s.e.   0.0278   0.0282      3e-04
## 
## sigma^2 estimated as 0.0001766:  log likelihood = 3766.8,  aic = -7527.6
arma03<-arima(r.LR, order = c(0,0,3))
arma03
## 
## Call:
## arima(x = r.LR, order = c(0, 0, 3))
## 
## Coefficients:
##           ma1      ma2      ma3  intercept
##       -0.0596  -0.0429  -0.0449      5e-04
## s.e.   0.0278   0.0282   0.0286      3e-04
## 
## sigma^2 estimated as 0.0001762:  log likelihood = 3768.03,  aic = -7528.05
arma11<-arima(r.LR,order = c(1,0,1))
arma11
## 
## Call:
## arima(x = r.LR, order = c(1, 0, 1))
## 
## Coefficients:
##          ar1      ma1  intercept
##       0.7788  -0.8382      5e-04
## s.e.  0.0963   0.0835      3e-04
## 
## sigma^2 estimated as 0.0001759:  log likelihood = 3769.3,  aic = -7532.6
arma22<-arima(r.LR,order = c(2,0,2))
arma22
## 
## Call:
## arima(x = r.LR, order = c(2, 0, 2))
## 
## Coefficients:
## Warning in sqrt(diag(x$var.coef)): NaNs produced
##          ar1     ar2      ma1      ma2  intercept
##       0.0102  0.5961  -0.0736  -0.6372      5e-04
## s.e.     NaN     NaN      NaN      NaN      3e-04
## 
## sigma^2 estimated as 0.0001759:  log likelihood = 3769.33,  aic = -7528.67
arma33<-arima(r.LR, order = c(3,0,3))
## Warning in stats::arima(x = x, order = order, seasonal = seasonal, xreg =
## xreg, : possible convergence problem: optim gave code = 1
arma33
## 
## Call:
## arima(x = r.LR, order = c(3, 0, 3))
## 
## Coefficients:
## Warning in sqrt(diag(x$var.coef)): NaNs produced
##           ar1     ar2     ar3    ma1      ma2      ma3  intercept
##       -0.6087  0.2333  0.6552  0.552  -0.3033  -0.7211      5e-04
## s.e.      NaN  0.1397     NaN    NaN   0.1102      NaN      3e-04
## 
## sigma^2 estimated as 0.0001756:  log likelihood = 3770.37,  aic = -7526.75
arma12<-arima(r.LR,order = c(1,0,2))
arma12
## 
## Call:
## arima(x = r.LR, order = c(1, 0, 2))
## 
## Coefficients:
##          ar1      ma1     ma2  intercept
##       0.7841  -0.8457  0.0035      5e-04
## s.e.  0.1206   0.1237  0.0350      3e-04
## 
## sigma^2 estimated as 0.0001759:  log likelihood = 3769.3,  aic = -7530.6
arma13<-arima(r.LR,order = c(1,0,3))
arma13
## 
## Call:
## arima(x = r.LR, order = c(1, 0, 3))
## 
## Coefficients:
##          ar1      ma1     ma2      ma3  intercept
##       0.7783  -0.8397  0.0043  -0.0024      5e-04
## s.e.  0.1548   0.1576  0.0370   0.0344      3e-04
## 
## sigma^2 estimated as 0.0001759:  log likelihood = 3769.31,  aic = -7528.62
arma21<-arima(r.LR, order = c(2,0,1))
arma21
## 
## Call:
## arima(x = r.LR, order = c(2, 0, 1))
## 
## Coefficients:
##          ar1     ar2      ma1  intercept
##       0.7717  0.0015  -0.8332      5e-04
## s.e.  0.1042  0.0324   0.1006      3e-04
## 
## sigma^2 estimated as 0.0001759:  log likelihood = 3769.3,  aic = -7530.61
arma31<-arima(r.LR,order = c(3,0,1))
arma31
## 
## Call:
## arima(x = r.LR, order = c(3, 0, 1))
## 
## Coefficients:
##          ar1     ar2      ar3      ma1  intercept
##       0.7688  0.0040  -0.0037  -0.8302      5e-04
## s.e.  0.1192  0.0357   0.0321   0.1161      3e-04
## 
## sigma^2 estimated as 0.0001759:  log likelihood = 3769.31,  aic = -7528.62
arma32<-arima(r.LR,order = c(3,0,2))
arma32
## 
## Call:
## arima(x = r.LR, order = c(3, 0, 2))
## 
## Coefficients:
##          ar1     ar2      ar3      ma1      ma2  intercept
##       0.3914  0.2919  -0.0077  -0.4527  -0.3085      5e-04
## s.e.  1.7142  1.3125   0.0338   1.7150   1.4099      3e-04
## 
## sigma^2 estimated as 0.0001759:  log likelihood = 3769.34,  aic = -7526.69
#compare with the model suggested by the r system
auto.arima(r.LR)
## Series: r.LR 
## ARIMA(1,0,1) with non-zero mean 
## 
## Coefficients:
##          ar1      ma1   mean
##       0.7788  -0.8382  5e-04
## s.e.  0.0963   0.0835  3e-04
## 
## sigma^2 estimated as 0.0001763:  log likelihood=3769.3
## AIC=-7530.6   AICc=-7530.57   BIC=-7509.93

ARMA Model fitting

Best fitted model: ARMA(1,0) was chosen due to lowest log-likelihood. ARMA (1,1) was chosen due to lowest AIC.

Model suggested by system: ARMA (1,1).

Conclusion: ARMA (1,1) might be the best fitted model.

LR.residuals10<-arma10$residuals
forecast::ggtsdisplay(LR.residuals10,main = "Loreal ARMA(1,0) Residuals")

summary(LR.residuals10)
##       Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
## -7.714e-02 -6.613e-03  3.364e-04  7.300e-07  6.608e-03  7.507e-02
#check for autocorrelation
Box.test(LR.residuals10,type = "Ljung-Box")
## 
##  Box-Ljung test
## 
## data:  LR.residuals10
## X-squared = 0.0058699, df = 1, p-value = 0.9389
LR.residuals11<-arma11$residuals
forecast::ggtsdisplay(LR.residuals11,main = "Loreal ARMA(1,1) Residuals")

summary(LR.residuals11)
##       Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
## -8.106e-02 -6.609e-03  3.895e-04  1.331e-05  6.705e-03  7.436e-02
#check for autocorrelation
Box.test(LR.residuals11,type = "Ljung-Box")
## 
##  Box-Ljung test
## 
## data:  LR.residuals11
## X-squared = 0.0037552, df = 1, p-value = 0.9511
LR.residuals<-LR.residuals11

ARMA(1,1) Model Diagnosis Checking

ACF and PACF: No significant lags to be found, all lags are within the 95% CI.

Box-Ljung Test: p-value more than alpha=0.05. Null hypothesis is not rejected.It is serially uncorrelated and shows that the model is just fine.

Conclusion: ARMA (1,1) model is the suitable to be fitted.

LR.squaredresiduals <- resid(arma11)^2
LR.squaredresiduals
## Time Series:
## Start = 1 
## End = 1298 
## Frequency = 1 
##    [1] 3.081005e-04 9.222475e-04 1.863394e-05 9.619623e-06 6.512249e-05
##    [6] 1.765313e-04 7.532378e-05 2.175915e-05 1.548434e-06 2.992404e-04
##   [11] 1.342260e-05 2.201958e-04 1.357388e-05 1.138447e-04 9.989186e-04
##   [16] 2.792352e-04 1.677785e-04 1.852203e-06 1.654873e-05 1.924405e-04
##   [21] 2.081034e-03 5.435218e-05 4.302308e-07 1.762482e-06 2.360415e-04
##   [26] 1.338810e-04 2.212735e-04 8.861717e-07 7.079868e-04 1.394816e-04
##   [31] 1.427852e-04 5.756981e-08 7.029324e-04 2.629777e-04 1.082394e-05
##   [36] 4.419979e-05 4.470422e-06 4.754364e-04 4.034202e-04 6.921817e-06
##   [41] 3.983266e-06 5.250001e-05 1.725142e-05 6.240258e-05 1.973511e-03
##   [46] 2.530526e-04 4.413987e-04 4.985357e-04 3.172105e-04 9.914853e-05
##   [51] 2.496498e-04 3.834399e-04 1.381084e-03 1.544155e-05 2.889010e-04
##   [56] 3.802323e-04 3.330377e-04 9.340017e-05 3.179506e-04 1.220732e-05
##   [61] 1.758420e-04 3.871678e-04 2.882438e-05 1.808307e-03 6.397874e-07
##   [66] 1.489018e-05 2.811757e-05 1.115971e-04 9.748478e-05 7.631531e-05
##   [71] 1.334146e-05 4.961656e-04 2.668213e-04 2.368372e-07 2.976316e-04
##   [76] 1.178938e-03 9.692353e-05 7.586314e-04 1.145861e-04 1.277115e-05
##   [81] 1.359338e-04 7.089757e-05 9.481742e-04 1.483725e-06 2.802017e-05
##   [86] 2.004873e-04 1.207546e-06 3.296844e-05 4.687561e-04 2.618355e-04
##   [91] 3.132724e-04 9.037624e-04 4.172120e-04 4.815394e-04 2.378598e-05
##   [96] 2.455756e-05 8.481113e-05 4.721064e-05 2.496652e-04 5.296195e-06
##  [101] 2.156427e-04 2.580156e-04 8.960765e-07 1.661150e-05 3.399334e-04
##  [106] 3.837593e-04 2.961351e-04 2.102297e-04 1.487813e-04 2.064771e-05
##  [111] 1.844205e-04 5.214764e-04 2.657623e-04 1.045166e-04 1.724930e-06
##  [116] 1.881432e-04 1.546968e-06 4.833152e-04 2.663723e-04 1.590929e-04
##  [121] 4.265338e-04 6.823916e-05 2.620018e-05 3.683194e-04 3.853999e-04
##  [126] 3.342683e-04 1.663878e-05 1.051497e-04 1.186265e-04 5.183144e-05
##  [131] 1.643436e-05 3.738167e-05 4.442073e-06 3.630917e-04 1.545042e-04
##  [136] 2.748319e-05 1.303912e-04 2.462268e-03 9.548506e-07 2.296202e-04
##  [141] 8.796437e-05 1.473458e-07 1.614381e-05 1.326960e-04 4.381662e-05
##  [146] 6.912482e-04 1.282816e-07 3.858845e-05 2.079873e-05 5.007064e-05
##  [151] 4.264487e-05 2.306058e-04 7.199384e-06 1.010342e-04 4.128244e-05
##  [156] 4.592164e-05 1.370189e-05 5.954512e-05 1.161158e-04 1.160598e-04
##  [161] 2.044820e-04 1.245079e-05 6.190777e-04 2.203382e-05 4.521395e-05
##  [166] 6.330192e-05 1.986373e-05 9.366072e-05 6.635737e-06 5.065208e-06
##  [171] 5.747722e-06 7.208674e-08 1.817027e-05 9.343237e-07 1.089672e-04
##  [176] 4.681571e-04 2.044615e-04 3.757068e-04 8.640654e-05 5.148014e-07
##  [181] 2.062196e-07 5.026181e-04 1.690437e-04 5.275828e-05 1.835709e-04
##  [186] 1.336289e-03 1.081726e-04 1.917757e-04 7.355280e-04 1.616370e-04
##  [191] 1.635060e-05 4.529689e-05 9.162944e-07 1.549519e-04 5.506871e-05
##  [196] 7.916345e-06 5.936482e-05 1.047726e-05 2.317079e-06 3.104253e-06
##  [201] 5.341562e-06 9.780609e-06 1.269874e-04 1.880976e-04 4.485892e-05
##  [206] 3.988554e-05 1.239214e-05 1.127116e-05 5.319924e-06 5.004142e-05
##  [211] 7.692657e-04 4.664450e-06 3.718617e-06 4.948654e-05 2.988706e-05
##  [216] 4.381868e-05 3.206738e-05 2.681693e-04 3.925469e-05 2.097645e-04
##  [221] 1.585728e-06 1.406200e-10 4.189624e-05 2.243219e-05 5.017868e-05
##  [226] 4.786819e-05 3.332341e-05 1.091787e-05 2.309989e-06 1.937679e-06
##  [231] 6.335474e-06 3.914001e-08 8.431176e-06 1.330242e-04 3.242821e-05
##  [236] 1.070611e-03 1.650710e-05 2.910088e-09 2.287878e-06 3.240085e-04
##  [241] 4.387001e-04 3.429651e-06 1.601379e-04 3.802260e-05 1.755776e-05
##  [246] 1.051159e-04 9.921668e-05 7.157339e-06 7.264202e-06 4.095010e-04
##  [251] 1.589601e-05 2.028916e-04 1.791928e-05 2.109609e-05 2.704280e-05
##  [256] 3.651057e-06 8.294706e-08 1.400249e-04 6.013447e-04 1.046392e-04
##  [261] 1.213320e-04 4.374938e-05 2.931247e-05 2.143267e-05 4.257692e-05
##  [266] 8.634422e-04 8.139722e-05 1.533527e-04 8.573378e-07 1.967273e-05
##  [271] 5.997280e-06 3.179661e-05 2.593699e-05 8.499537e-06 2.457184e-06
##  [276] 8.117408e-08 3.515144e-04 2.444386e-06 1.189621e-04 4.265306e-06
##  [281] 3.833087e-04 2.972159e-06 5.190979e-05 2.849178e-04 1.007568e-03
##  [286] 2.025634e-04 1.708787e-05 8.274379e-06 3.558437e-05 3.197672e-07
##  [291] 9.692583e-05 1.613549e-06 6.285341e-06 3.807476e-06 5.508711e-06
##  [296] 9.335359e-05 1.321362e-04 4.046281e-05 9.683060e-07 2.492949e-04
##  [301] 2.564316e-08 1.312076e-07 9.195890e-05 6.405797e-05 8.131370e-06
##  [306] 7.846529e-04 1.649183e-05 1.365241e-04 6.146367e-06 1.812009e-06
##  [311] 6.442751e-05 3.770370e-05 3.813703e-05 1.217401e-06 3.731154e-05
##  [316] 4.597272e-05 2.825975e-06 1.264022e-06 2.112003e-06 2.324392e-05
##  [321] 3.728550e-07 3.625089e-04 8.312591e-06 2.206090e-06 1.506099e-06
##  [326] 3.049713e-05 5.092834e-06 1.616876e-05 7.840238e-05 2.705628e-05
##  [331] 1.883576e-05 6.160191e-05 2.253566e-06 1.971950e-05 1.148935e-05
##  [336] 3.076346e-05 1.492374e-07 9.636249e-07 3.567982e-06 3.200953e-07
##  [341] 5.499985e-06 2.668974e-04 2.598808e-06 7.583461e-05 4.066944e-06
##  [346] 2.982040e-05 4.614945e-05 1.077508e-04 1.576139e-05 5.005714e-04
##  [351] 3.890484e-04 4.272612e-05 4.615671e-05 1.283091e-04 5.571444e-04
##  [356] 3.664551e-04 1.495058e-05 2.874621e-04 7.743812e-06 5.196540e-05
##  [361] 2.624890e-06 1.121613e-06 3.162051e-05 1.003480e-05 3.707257e-06
##  [366] 1.258463e-06 2.444601e-05 9.013172e-06 4.275983e-05 2.474191e-05
##  [371] 2.723758e-05 3.230830e-05 2.566750e-06 4.713253e-06 3.846313e-06
##  [376] 1.260849e-05 4.603031e-06 2.064019e-05 7.572422e-07 1.528490e-05
##  [381] 7.534955e-05 2.025091e-05 3.277690e-05 1.830083e-05 3.221788e-05
##  [386] 1.402126e-05 1.604125e-05 6.886339e-05 4.023153e-06 4.744709e-05
##  [391] 8.507169e-07 1.198843e-07 2.476942e-05 2.481610e-05 3.241141e-05
##  [396] 4.094745e-05 2.473201e-06 3.070917e-05 6.376125e-04 1.607545e-05
##  [401] 1.674007e-05 7.783806e-06 5.054189e-06 8.076308e-05 1.374102e-06
##  [406] 1.511196e-04 1.113070e-04 4.830065e-06 8.478867e-05 3.644543e-06
##  [411] 2.570170e-06 2.651055e-05 8.306092e-08 2.688530e-07 8.854401e-05
##  [416] 2.026699e-04 4.388393e-05 1.695356e-06 3.237528e-05 7.312606e-06
##  [421] 3.467500e-06 2.893495e-06 1.548040e-06 5.563497e-07 1.729097e-05
##  [426] 6.280884e-06 1.020343e-04 7.081328e-05 2.768884e-10 3.111723e-05
##  [431] 1.213029e-04 6.278395e-05 2.013105e-04 5.252553e-06 6.652684e-06
##  [436] 1.953373e-11 1.765568e-04 3.487585e-07 2.645877e-06 4.540870e-05
##  [441] 7.657528e-06 7.637666e-05 1.336711e-03 4.159944e-04 3.290507e-05
##  [446] 1.367272e-03 7.592857e-05 3.443839e-09 1.253817e-04 3.373834e-06
##  [451] 3.492614e-04 2.098402e-06 2.280669e-06 5.149354e-05 1.973764e-04
##  [456] 2.678631e-05 2.751852e-05 1.363418e-07 1.857727e-05 7.987076e-05
##  [461] 1.248291e-05 4.239215e-04 6.830660e-05 8.383717e-07 3.275950e-06
##  [466] 3.693683e-08 8.432071e-04 6.497139e-05 3.600317e-06 5.614053e-05
##  [471] 1.753850e-06 4.033999e-05 1.642240e-05 1.553701e-06 3.810894e-05
##  [476] 1.486146e-04 5.955011e-06 5.146265e-05 2.923390e-08 2.838236e-05
##  [481] 1.190015e-06 3.258981e-05 1.024452e-05 1.251699e-04 3.529636e-05
##  [486] 8.566239e-05 9.745321e-05 2.083463e-05 2.682349e-05 5.546142e-06
##  [491] 2.739002e-05 7.846566e-06 1.647945e-05 1.031953e-05 1.570691e-05
##  [496] 9.741953e-06 1.114683e-06 1.291781e-04 1.706768e-05 2.373626e-06
##  [501] 2.091623e-05 1.074351e-05 1.772870e-08 8.244432e-05 1.102929e-05
##  [506] 1.084981e-04 5.264602e-04 2.628462e-05 1.675505e-05 2.925916e-04
##  [511] 3.194851e-06 1.000181e-04 4.949392e-05 1.250888e-05 1.239614e-05
##  [516] 6.336760e-05 1.181125e-04 5.375349e-05 1.394255e-04 4.070983e-05
##  [521] 1.669578e-04 2.339939e-05 2.782027e-05 2.325919e-05 5.273458e-05
##  [526] 1.744247e-04 5.896875e-05 3.951587e-06 4.389876e-05 7.873068e-05
##  [531] 6.427770e-04 1.512077e-04 1.135197e-07 3.516465e-05 1.909887e-04
##  [536] 2.320328e-05 1.595652e-06 5.132819e-06 1.783728e-04 1.341828e-08
##  [541] 8.650868e-05 1.315791e-04 3.760864e-05 7.996111e-05 1.740913e-06
##  [546] 7.057754e-05 2.603545e-05 3.290417e-05 7.300124e-07 3.616918e-05
##  [551] 7.688385e-06 3.823569e-06 6.082834e-05 3.230896e-05 1.892659e-06
##  [556] 4.647009e-05 5.634738e-05 1.661259e-04 3.893328e-05 1.060915e-05
##  [561] 1.947303e-05 5.112349e-06 3.931436e-07 4.149080e-05 6.858458e-05
##  [566] 8.986546e-05 9.477841e-06 2.499844e-04 6.448816e-05 1.238916e-04
##  [571] 3.036913e-05 5.816001e-05 1.000968e-05 1.145872e-04 3.236771e-05
##  [576] 2.815951e-04 2.345206e-06 5.129363e-05 1.395644e-04 1.172452e-06
##  [581] 6.186092e-05 5.512956e-05 1.598077e-04 2.058881e-05 6.150152e-07
##  [586] 1.103832e-05 4.728744e-07 4.171707e-05 1.369806e-04 3.163630e-06
##  [591] 1.027280e-05 1.433874e-04 1.872903e-04 6.716468e-06 6.055776e-06
##  [596] 5.878332e-06 1.318899e-05 1.164366e-04 2.561394e-05 4.829055e-04
##  [601] 9.978344e-04 2.873097e-04 5.829954e-04 1.535736e-08 4.209098e-04
##  [606] 8.058761e-05 7.575934e-08 2.161993e-05 1.124338e-04 6.265101e-05
##  [611] 1.899282e-07 6.059596e-05 2.208821e-05 3.062908e-04 1.056990e-04
##  [616] 2.580903e-04 9.430020e-06 4.894381e-04 2.180592e-04 3.882948e-04
##  [621] 2.730511e-05 4.313114e-05 7.090454e-04 6.216510e-05 3.759723e-06
##  [626] 9.839562e-05 5.916082e-08 9.303642e-07 1.933444e-06 3.095591e-05
##  [631] 9.301978e-06 5.048549e-05 2.426861e-05 4.426542e-04 8.300328e-05
##  [636] 4.332157e-06 1.240289e-03 6.023499e-05 1.251914e-06 3.500259e-04
##  [641] 4.557975e-04 9.644211e-07 2.985446e-06 7.058147e-05 1.262333e-05
##  [646] 1.075474e-06 8.432576e-06 6.611906e-06 1.399271e-04 1.105710e-04
##  [651] 5.833571e-05 3.859372e-05 2.325435e-06 3.457414e-05 6.163222e-05
##  [656] 1.453018e-04 5.369716e-04 1.383833e-04 2.226716e-04 7.016906e-06
##  [661] 2.628067e-04 9.219465e-06 9.926429e-05 4.201095e-05 6.422729e-06
##  [666] 2.144735e-05 5.227401e-05 2.004335e-05 2.368970e-06 1.482995e-05
##  [671] 4.618953e-05 3.572193e-05 2.938102e-06 5.805394e-05 5.317488e-06
##  [676] 2.085804e-05 2.166746e-05 1.543864e-05 8.657222e-07 6.929202e-05
##  [681] 2.638526e-05 6.150595e-05 1.177878e-05 6.261031e-04 1.000637e-06
##  [686] 7.078219e-05 7.253440e-05 2.444795e-05 1.670917e-04 4.136266e-05
##  [691] 3.758739e-05 2.565389e-04 3.457750e-05 3.921801e-05 1.219812e-04
##  [696] 1.285799e-04 3.654097e-04 3.307310e-05 2.322445e-05 6.233697e-06
##  [701] 2.551137e-04 1.240280e-04 1.390421e-04 1.004449e-05 4.320198e-04
##  [706] 3.445788e-05 9.086435e-08 4.669077e-05 6.150868e-07 1.967188e-04
##  [711] 6.987157e-07 2.821839e-05 1.815636e-05 9.627065e-06 5.716360e-05
##  [716] 1.729193e-07 2.660925e-04 6.941383e-06 5.072966e-05 3.539607e-05
##  [721] 3.088602e-04 1.663903e-05 9.637457e-05 3.602617e-06 8.596240e-09
##  [726] 8.214242e-05 3.940161e-06 2.747849e-05 2.893138e-05 4.695472e-05
##  [731] 7.357113e-04 6.597903e-06 4.164641e-05 5.962340e-04 1.197566e-05
##  [736] 5.899092e-05 5.362144e-05 1.468585e-06 6.352136e-10 2.911052e-05
##  [741] 1.503025e-05 2.558241e-05 1.547043e-05 2.987074e-06 1.709295e-05
##  [746] 2.507833e-04 1.541761e-07 3.975407e-04 4.061853e-04 1.954638e-04
##  [751] 4.406151e-05 5.257939e-06 6.787958e-05 3.536173e-05 1.001973e-06
##  [756] 6.362108e-05 9.136759e-06 2.104409e-05 3.594634e-05 1.260717e-04
##  [761] 3.075070e-04 1.263336e-04 5.350727e-09 6.190443e-05 1.464134e-04
##  [766] 6.976002e-07 1.017946e-05 1.251758e-05 5.381023e-06 1.315724e-03
##  [771] 2.779828e-06 1.639280e-04 8.461530e-08 1.971039e-03 5.658635e-04
##  [776] 5.868290e-04 2.845677e-05 6.135506e-05 2.049077e-05 6.351259e-05
##  [781] 4.800076e-04 5.186737e-06 5.432650e-05 8.457348e-07 1.698116e-04
##  [786] 3.245416e-04 4.413589e-05 1.131361e-04 3.961880e-03 4.371114e-05
##  [791] 7.045119e-05 2.348678e-05 3.692523e-05 4.792967e-05 1.536855e-05
##  [796] 6.547137e-05 1.357722e-08 3.350635e-04 3.044696e-05 7.545912e-07
##  [801] 2.477570e-06 1.041030e-04 1.088439e-05 5.150600e-05 4.200069e-05
##  [806] 3.235614e-05 5.007512e-05 1.898526e-04 7.676948e-06 2.133565e-05
##  [811] 5.731604e-06 4.087675e-04 5.287544e-06 2.232595e-04 9.629764e-04
##  [816] 1.650000e-04 1.601610e-06 2.351385e-05 6.501785e-05 1.460184e-04
##  [821] 1.967675e-04 4.301436e-05 3.291683e-05 1.214315e-06 7.941284e-05
##  [826] 3.955499e-05 2.964942e-04 1.703553e-04 9.526893e-05 1.877185e-04
##  [831] 7.585708e-05 1.768349e-04 1.501739e-04 1.865199e-04 2.012388e-05
##  [836] 8.396317e-05 1.653026e-05 4.223473e-06 1.314314e-04 1.204662e-05
##  [841] 9.194770e-05 3.660908e-05 2.066981e-04 2.315856e-05 1.428026e-06
##  [846] 7.201696e-05 2.527571e-05 2.560568e-05 7.998466e-06 5.298259e-04
##  [851] 1.513579e-04 1.129614e-04 9.555469e-05 3.240608e-06 1.514885e-03
##  [856] 8.233786e-05 1.011448e-05 1.846022e-04 1.565163e-04 2.782782e-04
##  [861] 2.775361e-05 8.084115e-05 3.974813e-05 1.843898e-04 3.597110e-05
##  [866] 3.880753e-05 2.991379e-05 1.247546e-06 1.700748e-05 1.157032e-08
##  [871] 2.996437e-04 3.512705e-05 3.542105e-05 1.616011e-06 1.655131e-04
##  [876] 9.034146e-05 3.120171e-04 2.438337e-05 5.290270e-05 1.864340e-05
##  [881] 7.330150e-06 2.605794e-04 2.515758e-04 5.165474e-06 1.385083e-06
##  [886] 7.186944e-06 8.762647e-05 1.042584e-04 1.079997e-07 2.138044e-04
##  [891] 1.072231e-06 1.592454e-06 2.812801e-05 8.524263e-06 5.086951e-05
##  [896] 4.146971e-05 2.157117e-05 2.688556e-05 9.834780e-07 2.276210e-06
##  [901] 9.905894e-05 8.788969e-05 1.923595e-08 6.524340e-05 4.206183e-05
##  [906] 8.837868e-05 4.330491e-06 1.501111e-07 5.871820e-05 2.578479e-05
##  [911] 6.854814e-05 1.866004e-05 8.661644e-05 6.654873e-04 9.401775e-05
##  [916] 1.733581e-05 3.514378e-04 5.622332e-05 1.346052e-04 2.528750e-05
##  [921] 1.658307e-06 2.927338e-05 8.485501e-05 3.839340e-04 7.962023e-06
##  [926] 9.048717e-05 1.112727e-09 4.926818e-05 1.717271e-05 1.723607e-05
##  [931] 2.665625e-05 1.632364e-05 1.833823e-04 2.991044e-05 4.791443e-05
##  [936] 1.217424e-05 6.104016e-05 7.731753e-05 8.384966e-07 1.380957e-04
##  [941] 3.022123e-07 2.739605e-06 4.216630e-05 1.159898e-06 6.642695e-06
##  [946] 2.899070e-05 2.149431e-04 3.761930e-05 4.254747e-05 1.039093e-08
##  [951] 1.215991e-06 2.117405e-05 2.646560e-04 8.315187e-05 7.265220e-05
##  [956] 3.120564e-05 3.103324e-04 1.312448e-04 3.139861e-05 1.037553e-04
##  [961] 4.632225e-05 1.434619e-05 1.987515e-08 1.008902e-04 5.486488e-07
##  [966] 2.532773e-05 3.820336e-06 5.309365e-08 2.339138e-05 1.322512e-04
##  [971] 5.769330e-05 8.838571e-07 1.896981e-04 3.970983e-06 9.903057e-06
##  [976] 4.998682e-05 2.329913e-04 5.485416e-04 1.117711e-04 1.087131e-03
##  [981] 1.186273e-03 1.463159e-04 2.124896e-04 3.417480e-04 5.606110e-04
##  [986] 2.786218e-05 3.561388e-05 2.709431e-04 2.637706e-06 1.163488e-04
##  [991] 2.926844e-04 2.563835e-05 3.712285e-04 6.474912e-05 1.502677e-04
##  [996] 9.305978e-05 5.087334e-04 1.002677e-04 1.794282e-04 1.276158e-06
## [1001] 1.329185e-04 6.705029e-05 8.060733e-05 2.144142e-04 4.987141e-06
## [1006] 5.461397e-05 2.730191e-05 3.803449e-06 5.224577e-05 4.916678e-04
## [1011] 1.241184e-04 2.160904e-04 5.618783e-06 3.095089e-07 3.911011e-05
## [1016] 1.235082e-04 8.382983e-05 1.083062e-04 3.357762e-04 8.703311e-05
## [1021] 2.050370e-04 6.565866e-04 1.554804e-03 2.772017e-05 1.384416e-04
## [1026] 4.905151e-05 1.230382e-04 5.954684e-05 9.865822e-05 9.552957e-05
## [1031] 7.205276e-07 9.853178e-08 1.421612e-05 2.774459e-05 2.521899e-04
## [1036] 1.957118e-04 1.200509e-05 4.853357e-06 1.000692e-04 2.471462e-05
## [1041] 2.817903e-06 3.598352e-05 5.286642e-03 8.148514e-07 5.660341e-06
## [1046] 5.989864e-06 1.427039e-04 7.535989e-05 7.223215e-06 9.348076e-06
## [1051] 1.568644e-05 3.249447e-05 8.478810e-06 3.244683e-09 8.060641e-06
## [1056] 6.962198e-06 3.624017e-05 8.407491e-05 1.760153e-04 5.011033e-06
## [1061] 2.854619e-06 3.454450e-05 1.866032e-06 1.834071e-05 3.144476e-05
## [1066] 7.830539e-04 2.497275e-05 3.836157e-05 8.009989e-05 3.962765e-04
## [1071] 1.017083e-04 1.722953e-05 2.426119e-05 4.295382e-05 1.753720e-07
## [1076] 3.410989e-04 3.800052e-04 1.413797e-06 1.176082e-04 4.862568e-04
## [1081] 1.140208e-05 4.287393e-06 2.481593e-07 4.007512e-05 1.095381e-04
## [1086] 7.167908e-06 2.705788e-07 1.981960e-06 1.466489e-05 1.871367e-04
## [1091] 2.202313e-05 2.639375e-05 1.302987e-05 3.208355e-05 1.777836e-05
## [1096] 4.233454e-04 5.081185e-06 4.324984e-04 4.162654e-06 1.489698e-04
## [1101] 4.045877e-05 6.409993e-05 1.441416e-04 2.257093e-03 1.157842e-04
## [1106] 6.123584e-07 1.413677e-04 1.032763e-03 7.436339e-05 5.178325e-04
## [1111] 2.975667e-05 3.031213e-04 1.312889e-04 2.154860e-06 7.950209e-05
## [1116] 3.515582e-05 3.331429e-06 1.431683e-04 1.048326e-05 4.793385e-06
## [1121] 2.013679e-04 5.897101e-04 5.644002e-08 1.561406e-03 2.681107e-04
## [1126] 1.937172e-06 1.057160e-03 7.462712e-04 4.616157e-04 1.638650e-04
## [1131] 9.089022e-04 5.298840e-05 2.268566e-04 4.914274e-03 2.366115e-04
## [1136] 6.418046e-04 6.571048e-03 2.209918e-05 2.184124e-03 3.765054e-03
## [1141] 2.541676e-05 1.438923e-04 1.390804e-05 8.872837e-04 5.529994e-03
## [1146] 4.241799e-03 7.307747e-05 2.965664e-03 6.829900e-04 8.349427e-04
## [1151] 5.906254e-04 3.214076e-04 6.070316e-05 2.383882e-05 3.281094e-04
## [1156] 9.890151e-05 1.065375e-04 5.702025e-04 2.742584e-04 2.783562e-05
## [1161] 1.563787e-04 1.072095e-03 1.385828e-03 7.641037e-05 8.756127e-05
## [1166] 1.195010e-04 1.108569e-04 2.465817e-03 8.989956e-05 1.386960e-03
## [1171] 2.990106e-03 6.962955e-05 4.855836e-04 4.968906e-04 3.056585e-04
## [1176] 1.002334e-04 8.604644e-05 1.000196e-03 3.380909e-04 6.959756e-06
## [1181] 8.262728e-04 6.492551e-05 3.729620e-04 3.760718e-04 2.733770e-06
## [1186] 1.241656e-04 1.112215e-04 1.155602e-04 1.173941e-03 6.924153e-05
## [1191] 1.024422e-04 9.804187e-05 1.268011e-03 1.381678e-04 1.763303e-04
## [1196] 2.888471e-04 2.608989e-05 6.767806e-06 4.684322e-05 2.712909e-05
## [1201] 1.037648e-04 1.664835e-03 2.659107e-04 1.123141e-05 1.192500e-04
## [1206] 5.248631e-05 2.193360e-04 1.867812e-05 6.170906e-05 2.368393e-04
## [1211] 4.852200e-06 6.674709e-06 1.980672e-05 1.237405e-03 7.209928e-05
## [1216] 1.497233e-05 3.212389e-05 9.206537e-05 1.812141e-05 4.246271e-05
## [1221] 6.633405e-06 5.024925e-05 3.148973e-04 1.792601e-04 1.106348e-04
## [1226] 5.509354e-06 7.877523e-05 1.881584e-04 4.904056e-04 1.152533e-06
## [1231] 7.371087e-06 6.156365e-05 2.784726e-04 4.398744e-05 3.620182e-04
## [1236] 1.008367e-04 3.064171e-06 1.850249e-04 4.681280e-05 5.953727e-05
## [1241] 5.080871e-06 2.647010e-04 4.364566e-07 2.146842e-04 1.980200e-08
## [1246] 1.813066e-09 1.569389e-04 2.067748e-04 3.816011e-04 2.216657e-04
## [1251] 2.895855e-08 7.162323e-05 9.607967e-06 1.610377e-04 5.496505e-06
## [1256] 8.549377e-07 1.492477e-04 8.989794e-05 3.184715e-04 2.306393e-04
## [1261] 1.076663e-04 5.181221e-04 1.312845e-05 5.596189e-06 8.457251e-06
## [1266] 4.539177e-05 7.208732e-05 1.744743e-05 1.098580e-03 5.669002e-05
## [1271] 1.265460e-04 1.738508e-04 1.974508e-04 7.069977e-04 1.024964e-04
## [1276] 1.862441e-04 3.066741e-04 2.436489e-05 1.926447e-05 1.107482e-05
## [1281] 2.140925e-05 2.652138e-07 1.716317e-04 3.092101e-04 8.096928e-09
## [1286] 1.369860e-04 3.392176e-04 5.231987e-04 8.209871e-05 5.370725e-05
## [1291] 1.634747e-04 3.397461e-05 1.119415e-04 1.370242e-04 2.825200e-05
## [1296] 8.937957e-04 1.580561e-06 4.953534e-05
ts.plot(LR.squaredresiduals)

acf(LR.squaredresiduals,lag.max = 100, main = "ACF Loreal Squared Residuals")

pacf(LR.squaredresiduals,lag.max = 50, main = "PACF Loreal Squared Residuals")

#test for nonlinearity ARCH effect
McLeod.Li.test(y=r.LR)

ArchTest(LR.residuals)
## 
##  ARCH LM-test; Null hypothesis: no ARCH effects
## 
## data:  LR.residuals
## Chi-squared = 203.35, df = 12, p-value < 2.2e-16

LOREAL SQUARED RESIDUALS

Time Series Plots: There is change of variance (volatility clustering was observed).

ACF of squared residuals: ACF seems to die off. Significant lags are observed and will be used to determine the order of non-linear model.

ACF of squared residuals: PACF cuts off after lag 8, even some remaining lags seems significant. Significant lags are observed and will be used to determine the order of non-linear model.

Non-linearity tests: McLeod Li test - p-value of all lags are within 0.05. ArchTest - p-value less than 0.05.

Conclusion: The non-linearity ARCH effect was shown in the data.

LR1<-ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(1,0)),
                mean.model=list(armaOrder=c(0,0)),distribution.model="std")
LRarch1<-ugarchfit(spec=LR1,data=LR.residuals)
LRarch1
## 
## *---------------------------------*
## *          GARCH Model Fit        *
## *---------------------------------*
## 
## Conditional Variance Dynamics    
## -----------------------------------
## GARCH Model  : sGARCH(1,0)
## Mean Model   : ARFIMA(0,0,0)
## Distribution : std 
## 
## Optimal Parameters
## ------------------------------------
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000316    0.000290   1.0884 0.276410
## omega   0.000138    0.000014   9.7779 0.000000
## alpha1  0.287793    0.076924   3.7413 0.000183
## shape   3.925430    0.445242   8.8164 0.000000
## 
## Robust Standard Errors:
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000316    0.000283   1.1137 0.265391
## omega   0.000138    0.000016   8.5202 0.000000
## alpha1  0.287793    0.091832   3.1339 0.001725
## shape   3.925430    0.490958   7.9955 0.000000
## 
## LogLikelihood : 3894.935 
## 
## Information Criteria
## ------------------------------------
##                     
## Akaike       -5.9953
## Bayes        -5.9793
## Shibata      -5.9953
## Hannan-Quinn -5.9893
## 
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                     0.5376  0.4634
## Lag[2*(p+q)+(p+q)-1][2]    0.5938  0.6512
## Lag[4*(p+q)+(p+q)-1][5]    1.4158  0.7606
## d.o.f=0
## H0 : No serial correlation
## 
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
##                         statistic   p-value
## Lag[1]                     0.2159 6.422e-01
## Lag[2*(p+q)+(p+q)-1][2]    2.3569 2.098e-01
## Lag[4*(p+q)+(p+q)-1][5]   28.6949 7.368e-08
## d.o.f=1
## 
## Weighted ARCH LM Tests
## ------------------------------------
##             Statistic Shape Scale   P-Value
## ARCH Lag[2]     4.269 0.500 2.000 3.882e-02
## ARCH Lag[4]    33.494 1.397 1.611 3.579e-09
## ARCH Lag[6]    43.079 2.222 1.500 1.907e-11
## 
## Nyblom stability test
## ------------------------------------
## Joint Statistic:  2.4893
## Individual Statistics:              
## mu     0.07519
## omega  2.08181
## alpha1 0.84458
## shape  1.34663
## 
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic:          1.07 1.24 1.6
## Individual Statistic:     0.35 0.47 0.75
## 
## Sign Bias Test
## ------------------------------------
##                    t-value   prob sig
## Sign Bias           0.3894 0.6970    
## Negative Sign Bias  0.5077 0.6118    
## Positive Sign Bias  0.3486 0.7275    
## Joint Effect        0.3824 0.9439    
## 
## 
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
##   group statistic p-value(g-1)
## 1    20     11.18       0.9175
## 2    30     22.51       0.7985
## 3    40     41.85       0.3483
## 4    50     50.15       0.4275
## 
## 
## Elapsed time : 0.3569572
LR2<-ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(2,0)),
                mean.model=list(armaOrder=c(0,0)),distribution.model="std")
LRarch2<-ugarchfit(spec=LR2,data=LR.residuals)
LRarch2
## 
## *---------------------------------*
## *          GARCH Model Fit        *
## *---------------------------------*
## 
## Conditional Variance Dynamics    
## -----------------------------------
## GARCH Model  : sGARCH(2,0)
## Mean Model   : ARFIMA(0,0,0)
## Distribution : std 
## 
## Optimal Parameters
## ------------------------------------
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000324    0.000287   1.1302 0.258379
## omega   0.000115    0.000012   9.3436 0.000000
## alpha1  0.249946    0.069283   3.6076 0.000309
## alpha2  0.158120    0.054651   2.8933 0.003812
## shape   4.125169    0.477313   8.6425 0.000000
## 
## Robust Standard Errors:
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000324    0.000289   1.1233 0.261311
## omega   0.000115    0.000014   8.1744 0.000000
## alpha1  0.249946    0.077544   3.2233 0.001267
## alpha2  0.158120    0.052205   3.0289 0.002455
## shape   4.125169    0.489995   8.4188 0.000000
## 
## LogLikelihood : 3905.143 
## 
## Information Criteria
## ------------------------------------
##                     
## Akaike       -6.0095
## Bayes        -5.9896
## Shibata      -6.0095
## Hannan-Quinn -6.0020
## 
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                     0.4022  0.5260
## Lag[2*(p+q)+(p+q)-1][2]    0.4097  0.7375
## Lag[4*(p+q)+(p+q)-1][5]    1.2713  0.7958
## d.o.f=0
## H0 : No serial correlation
## 
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
##                         statistic   p-value
## Lag[1]                     0.9434 3.314e-01
## Lag[2*(p+q)+(p+q)-1][5]   15.0970 4.186e-04
## Lag[4*(p+q)+(p+q)-1][9]   21.8065 6.833e-05
## d.o.f=2
## 
## Weighted ARCH LM Tests
## ------------------------------------
##             Statistic Shape Scale   P-Value
## ARCH Lag[3]     18.24 0.500 2.000 1.952e-05
## ARCH Lag[5]     20.20 1.440 1.667 1.903e-05
## ARCH Lag[7]     21.79 2.315 1.543 2.225e-05
## 
## Nyblom stability test
## ------------------------------------
## Joint Statistic:  2.036
## Individual Statistics:              
## mu     0.09298
## omega  1.54569
## alpha1 0.75030
## alpha2 0.62515
## shape  1.05890
## 
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic:          1.28 1.47 1.88
## Individual Statistic:     0.35 0.47 0.75
## 
## Sign Bias Test
## ------------------------------------
##                    t-value   prob sig
## Sign Bias           0.2200 0.8259    
## Negative Sign Bias  0.6430 0.5203    
## Positive Sign Bias  0.2009 0.8408    
## Joint Effect        0.5389 0.9103    
## 
## 
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
##   group statistic p-value(g-1)
## 1    20     17.78       0.5373
## 2    30     21.72       0.8315
## 3    40     35.81       0.6164
## 4    50     53.39       0.3094
## 
## 
## Elapsed time : 0.6328728
LR3<-ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(3,0)),
                mean.model=list(armaOrder=c(0,0)),distribution.model="std")
LRarch3<-ugarchfit(spec=LR3,data=LR.residuals)
LRarch3
## 
## *---------------------------------*
## *          GARCH Model Fit        *
## *---------------------------------*
## 
## Conditional Variance Dynamics    
## -----------------------------------
## GARCH Model  : sGARCH(3,0)
## Mean Model   : ARFIMA(0,0,0)
## Distribution : std 
## 
## Optimal Parameters
## ------------------------------------
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000268    0.000288  0.92954 0.352611
## omega   0.000104    0.000011  9.30775 0.000000
## alpha1  0.173020    0.062029  2.78935 0.005281
## alpha2  0.103371    0.047317  2.18466 0.028914
## alpha3  0.168582    0.054460  3.09554 0.001965
## shape   4.306938    0.519720  8.28704 0.000000
## 
## Robust Standard Errors:
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000268    0.000291  0.91974 0.357708
## omega   0.000104    0.000013  7.89050 0.000000
## alpha1  0.173020    0.056811  3.04553 0.002323
## alpha2  0.103371    0.039439  2.62100 0.008767
## alpha3  0.168582    0.063996  2.63425 0.008432
## shape   4.306938    0.498282  8.64358 0.000000
## 
## LogLikelihood : 3913.935 
## 
## Information Criteria
## ------------------------------------
##                     
## Akaike       -6.0215
## Bayes        -5.9976
## Shibata      -6.0215
## Hannan-Quinn -6.0125
## 
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                     0.5788  0.4468
## Lag[2*(p+q)+(p+q)-1][2]    0.6059  0.6459
## Lag[4*(p+q)+(p+q)-1][5]    1.6873  0.6939
## d.o.f=0
## H0 : No serial correlation
## 
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
##                          statistic p-value
## Lag[1]                      0.2452  0.6205
## Lag[2*(p+q)+(p+q)-1][8]     4.6759  0.3988
## Lag[4*(p+q)+(p+q)-1][14]    7.3457  0.4619
## d.o.f=3
## 
## Weighted ARCH LM Tests
## ------------------------------------
##             Statistic Shape Scale P-Value
## ARCH Lag[4]     3.386 0.500 2.000 0.06574
## ARCH Lag[6]     3.618 1.461 1.711 0.22764
## ARCH Lag[8]     5.289 2.368 1.583 0.21968
## 
## Nyblom stability test
## ------------------------------------
## Joint Statistic:  1.8857
## Individual Statistics:              
## mu     0.07343
## omega  1.30811
## alpha1 0.37413
## alpha2 0.43645
## alpha3 0.79916
## shape  0.88624
## 
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic:          1.49 1.68 2.12
## Individual Statistic:     0.35 0.47 0.75
## 
## Sign Bias Test
## ------------------------------------
##                    t-value   prob sig
## Sign Bias          0.12519 0.9004    
## Negative Sign Bias 0.16594 0.8682    
## Positive Sign Bias 0.05003 0.9601    
## Joint Effect       0.09957 0.9919    
## 
## 
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
##   group statistic p-value(g-1)
## 1    20     21.32       0.3193
## 2    30     19.18       0.9166
## 3    40     39.87       0.4311
## 4    50     43.37       0.6998
## 
## 
## Elapsed time : 0.492202
LR11<-ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(1,1)),
                mean.model=list(armaOrder=c(0,0)),distribution.model="std")
LRGarch11<-ugarchfit(spec=LR11,data=LR.residuals)
LRGarch11
## 
## *---------------------------------*
## *          GARCH Model Fit        *
## *---------------------------------*
## 
## Conditional Variance Dynamics    
## -----------------------------------
## GARCH Model  : sGARCH(1,1)
## Mean Model   : ARFIMA(0,0,0)
## Distribution : std 
## 
## Optimal Parameters
## ------------------------------------
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000310    0.000283   1.0954 0.273348
## omega   0.000003    0.000003   1.0192 0.308117
## alpha1  0.056199    0.019510   2.8806 0.003969
## beta1   0.930014    0.023967  38.8045 0.000000
## shape   4.729136    0.550490   8.5908 0.000000
## 
## Robust Standard Errors:
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000310    0.000324  0.95740 0.338363
## omega   0.000003    0.000011  0.23594 0.813479
## alpha1  0.056199    0.099810  0.56306 0.573393
## beta1   0.930014    0.114330  8.13448 0.000000
## shape   4.729136    1.303485  3.62807 0.000286
## 
## LogLikelihood : 3935.586 
## 
## Information Criteria
## ------------------------------------
##                     
## Akaike       -6.0564
## Bayes        -6.0365
## Shibata      -6.0564
## Hannan-Quinn -6.0489
## 
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                     0.2285  0.6327
## Lag[2*(p+q)+(p+q)-1][2]    0.3334  0.7774
## Lag[4*(p+q)+(p+q)-1][5]    1.0070  0.8581
## d.o.f=0
## H0 : No serial correlation
## 
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                   0.009984  0.9204
## Lag[2*(p+q)+(p+q)-1][5]  2.743380  0.4559
## Lag[4*(p+q)+(p+q)-1][9]  4.106102  0.5710
## d.o.f=2
## 
## Weighted ARCH LM Tests
## ------------------------------------
##             Statistic Shape Scale P-Value
## ARCH Lag[3]     3.086 0.500 2.000 0.07897
## ARCH Lag[5]     3.770 1.440 1.667 0.19592
## ARCH Lag[7]     4.246 2.315 1.543 0.31253
## 
## Nyblom stability test
## ------------------------------------
## Joint Statistic:  34.48
## Individual Statistics:             
## mu     0.1286
## omega  5.2852
## alpha1 0.2519
## beta1  0.2442
## shape  0.2497
## 
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic:          1.28 1.47 1.88
## Individual Statistic:     0.35 0.47 0.75
## 
## Sign Bias Test
## ------------------------------------
##                     t-value   prob sig
## Sign Bias          0.009038 0.9928    
## Negative Sign Bias 0.895293 0.3708    
## Positive Sign Bias 0.017129 0.9863    
## Joint Effect       1.253734 0.7401    
## 
## 
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
##   group statistic p-value(g-1)
## 1    20     30.35      0.04749
## 2    30     36.38      0.16287
## 3    40     43.94      0.27017
## 4    50     46.99      0.55488
## 
## 
## Elapsed time : 0.252866
LR22<-ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(2,2)),
                mean.model=list(armaOrder=c(0,0)),distribution.model="std")
LRGarch22<-ugarchfit(spec=LR22,data=LR.residuals)
LRGarch22
## 
## *---------------------------------*
## *          GARCH Model Fit        *
## *---------------------------------*
## 
## Conditional Variance Dynamics    
## -----------------------------------
## GARCH Model  : sGARCH(2,2)
## Mean Model   : ARFIMA(0,0,0)
## Distribution : std 
## 
## Optimal Parameters
## ------------------------------------
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000321    0.000284 1.130004 0.258475
## omega   0.000004    0.000007 0.563218 0.573287
## alpha1  0.081483    0.037663 2.163473 0.030505
## alpha2  0.000007    0.058580 0.000126 0.999899
## beta1   0.398416    0.325193 1.225171 0.220511
## beta2   0.500472    0.277202 1.805445 0.071005
## shape   4.767313    0.665636 7.162045 0.000000
## 
## Robust Standard Errors:
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000321    0.000288 1.114765 0.264951
## omega   0.000004    0.000040 0.092961 0.925934
## alpha1  0.081483    0.055590 1.465784 0.142707
## alpha2  0.000007    0.257132 0.000029 0.999977
## beta1   0.398416    1.271672 0.313301 0.754052
## beta2   0.500472    0.874354 0.572391 0.567057
## shape   4.767313    1.570323 3.035881 0.002398
## 
## LogLikelihood : 3935.922 
## 
## Information Criteria
## ------------------------------------
##                     
## Akaike       -6.0538
## Bayes        -6.0259
## Shibata      -6.0539
## Hannan-Quinn -6.0434
## 
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                     0.2491  0.6177
## Lag[2*(p+q)+(p+q)-1][2]    0.3529  0.7669
## Lag[4*(p+q)+(p+q)-1][5]    1.0582  0.8464
## d.o.f=0
## H0 : No serial correlation
## 
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
##                          statistic p-value
## Lag[1]                      0.1744  0.6762
## Lag[2*(p+q)+(p+q)-1][11]    4.5141  0.6549
## Lag[4*(p+q)+(p+q)-1][19]    6.7826  0.8047
## d.o.f=4
## 
## Weighted ARCH LM Tests
## ------------------------------------
##             Statistic Shape Scale P-Value
## ARCH Lag[5]    0.2198 0.500 2.000  0.6392
## ARCH Lag[7]    0.8518 1.473 1.746  0.7991
## ARCH Lag[9]    1.6882 2.402 1.619  0.8179
## 
## Nyblom stability test
## ------------------------------------
## Joint Statistic:  22.5746
## Individual Statistics:             
## mu     0.1134
## omega  1.8736
## alpha1 0.2436
## alpha2 0.2631
## beta1  0.2336
## beta2  0.2311
## shape  0.2430
## 
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic:          1.69 1.9 2.35
## Individual Statistic:     0.35 0.47 0.75
## 
## Sign Bias Test
## ------------------------------------
##                    t-value   prob sig
## Sign Bias          0.03037 0.9758    
## Negative Sign Bias 0.56886 0.5696    
## Positive Sign Bias 0.23186 0.8167    
## Joint Effect       0.75242 0.8608    
## 
## 
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
##   group statistic p-value(g-1)
## 1    20     31.28      0.03765
## 2    30     42.48      0.05084
## 3    40     59.10      0.02042
## 4    50     48.30      0.50134
## 
## 
## Elapsed time : 0.309171
LR33<-ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(3,3)),
                mean.model=list(armaOrder=c(0,0)),distribution.model="std")
LRGarch33<-ugarchfit(spec=LR33,data=LR.residuals)
LRGarch33
## 
## *---------------------------------*
## *          GARCH Model Fit        *
## *---------------------------------*
## 
## Conditional Variance Dynamics    
## -----------------------------------
## GARCH Model  : sGARCH(3,3)
## Mean Model   : ARFIMA(0,0,0)
## Distribution : std 
## 
## Optimal Parameters
## ------------------------------------
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000324    0.000284 1.141199 0.253787
## omega   0.000005    0.000003 1.756017 0.079086
## alpha1  0.082566    0.038489 2.145195 0.031937
## alpha2  0.033478    0.069831 0.479415 0.631643
## alpha3  0.000001    0.057494 0.000017 0.999986
## beta1   0.000005    0.616100 0.000007 0.999994
## beta2   0.659719    0.716060 0.921319 0.356884
## beta3   0.196115    0.490087 0.400164 0.689035
## shape   4.772020    0.618694 7.713056 0.000000
## 
## Robust Standard Errors:
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000324    0.000287 1.128690  0.25903
## omega   0.000005    0.000007 0.818109  0.41330
## alpha1  0.082566    0.075535 1.093086  0.27436
## alpha2  0.033478    0.194141 0.172443  0.86309
## alpha3  0.000001    0.231221 0.000004  1.00000
## beta1   0.000005    1.719642 0.000003  1.00000
## beta2   0.659719    2.072433 0.318331  0.75023
## beta3   0.196115    0.771695 0.254136  0.79939
## shape   4.772020    0.618838 7.711262  0.00000
## 
## LogLikelihood : 3935.906 
## 
## Information Criteria
## ------------------------------------
##                     
## Akaike       -6.0507
## Bayes        -6.0149
## Shibata      -6.0508
## Hannan-Quinn -6.0373
## 
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                     0.2552  0.6134
## Lag[2*(p+q)+(p+q)-1][2]    0.3517  0.7676
## Lag[4*(p+q)+(p+q)-1][5]    1.0719  0.8432
## d.o.f=0
## H0 : No serial correlation
## 
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
##                          statistic p-value
## Lag[1]                      0.1957  0.6582
## Lag[2*(p+q)+(p+q)-1][17]    5.9789  0.8012
## Lag[4*(p+q)+(p+q)-1][29]   10.5842  0.8396
## d.o.f=6
## 
## Weighted ARCH LM Tests
## ------------------------------------
##              Statistic Shape Scale P-Value
## ARCH Lag[7]      0.839 0.500 2.000  0.3597
## ARCH Lag[9]      1.924 1.485 1.796  0.5377
## ARCH Lag[11]     3.258 2.440 1.677  0.5492
## 
## Nyblom stability test
## ------------------------------------
## Joint Statistic:  2.5784
## Individual Statistics:             
## mu     0.1112
## omega  0.3385
## alpha1 0.2396
## alpha2 0.2464
## alpha3 0.2904
## beta1  0.2401
## beta2  0.2382
## beta3  0.2338
## shape  0.2475
## 
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic:          2.1 2.32 2.82
## Individual Statistic:     0.35 0.47 0.75
## 
## Sign Bias Test
## ------------------------------------
##                    t-value   prob sig
## Sign Bias          0.02441 0.9805    
## Negative Sign Bias 0.54768 0.5840    
## Positive Sign Bias 0.23676 0.8129    
## Joint Effect       0.70664 0.8716    
## 
## 
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
##   group statistic p-value(g-1)
## 1    20     28.56      0.07316
## 2    30     40.17      0.08125
## 3    40     56.70      0.03323
## 4    50     49.07      0.47022
## 
## 
## Elapsed time : 0.4812551
LR1110<-ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(1,0)),
                mean.model=list(armaOrder=c(1,1)),distribution.model="std")
LRArma11arch10<-ugarchfit(spec=LR1110,data=LR.residuals)
LRArma11arch10
## 
## *---------------------------------*
## *          GARCH Model Fit        *
## *---------------------------------*
## 
## Conditional Variance Dynamics    
## -----------------------------------
## GARCH Model  : sGARCH(1,0)
## Mean Model   : ARFIMA(1,0,1)
## Distribution : std 
## 
## Optimal Parameters
## ------------------------------------
##         Estimate  Std. Error     t value Pr(>|t|)
## mu      0.000026    0.000029  9.2341e-01 0.355792
## ar1     0.991679    0.002795  3.5475e+02 0.000000
## ma1    -1.000000    0.000049 -2.0511e+04 0.000000
## omega   0.000137    0.000014  1.0109e+01 0.000000
## alpha1  0.282372    0.059434  4.7511e+00 0.000002
## shape   3.949900    0.451721  8.7441e+00 0.000000
## 
## Robust Standard Errors:
##         Estimate  Std. Error     t value Pr(>|t|)
## mu      0.000026    0.000033      0.7955 0.426324
## ar1     0.991679    0.003323    298.4290 0.000000
## ma1    -1.000000    0.000051 -19787.4956 0.000000
## omega   0.000137    0.000016      8.7359 0.000000
## alpha1  0.282372    0.069427      4.0672 0.000048
## shape   3.949900    0.502436      7.8615 0.000000
## 
## LogLikelihood : 3897.389 
## 
## Information Criteria
## ------------------------------------
##                     
## Akaike       -5.9960
## Bayes        -5.9721
## Shibata      -5.9960
## Hannan-Quinn -5.9870
## 
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                     0.4551  0.4999
## Lag[2*(p+q)+(p+q)-1][5]    1.5490  0.9970
## Lag[4*(p+q)+(p+q)-1][9]    2.6550  0.9359
## d.o.f=2
## H0 : No serial correlation
## 
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
##                         statistic   p-value
## Lag[1]                     0.1798 6.716e-01
## Lag[2*(p+q)+(p+q)-1][2]    3.1440 1.283e-01
## Lag[4*(p+q)+(p+q)-1][5]   30.1193 2.928e-08
## d.o.f=1
## 
## Weighted ARCH LM Tests
## ------------------------------------
##             Statistic Shape Scale   P-Value
## ARCH Lag[2]      5.91 0.500 2.000 1.505e-02
## ARCH Lag[4]     34.81 1.397 1.611 1.601e-09
## ARCH Lag[6]     45.39 2.222 1.500 4.354e-12
## 
## Nyblom stability test
## ------------------------------------
## Joint Statistic:  4.9251
## Individual Statistics:             
## mu     0.1038
## ar1    0.1990
## ma1    0.0877
## omega  2.0430
## alpha1 0.8267
## shape  1.3025
## 
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic:          1.49 1.68 2.12
## Individual Statistic:     0.35 0.47 0.75
## 
## Sign Bias Test
## ------------------------------------
##                    t-value   prob sig
## Sign Bias           0.5103 0.6099    
## Negative Sign Bias  0.5780 0.5634    
## Positive Sign Bias  0.4419 0.6587    
## Joint Effect        0.5293 0.9124    
## 
## 
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
##   group statistic p-value(g-1)
## 1    20     14.11       0.7772
## 2    30     20.01       0.8925
## 3    40     33.71       0.7095
## 4    50     54.00       0.2891
## 
## 
## Elapsed time : 0.498493
LR1111<-ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(1,1)),
                mean.model=list(armaOrder=c(1,1)),distribution.model="std")
LRArma11Garch11<-ugarchfit(spec=LR1111,data=LR.residuals)
LRGarch11
## 
## *---------------------------------*
## *          GARCH Model Fit        *
## *---------------------------------*
## 
## Conditional Variance Dynamics    
## -----------------------------------
## GARCH Model  : sGARCH(1,1)
## Mean Model   : ARFIMA(0,0,0)
## Distribution : std 
## 
## Optimal Parameters
## ------------------------------------
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000310    0.000283   1.0954 0.273348
## omega   0.000003    0.000003   1.0192 0.308117
## alpha1  0.056199    0.019510   2.8806 0.003969
## beta1   0.930014    0.023967  38.8045 0.000000
## shape   4.729136    0.550490   8.5908 0.000000
## 
## Robust Standard Errors:
##         Estimate  Std. Error  t value Pr(>|t|)
## mu      0.000310    0.000324  0.95740 0.338363
## omega   0.000003    0.000011  0.23594 0.813479
## alpha1  0.056199    0.099810  0.56306 0.573393
## beta1   0.930014    0.114330  8.13448 0.000000
## shape   4.729136    1.303485  3.62807 0.000286
## 
## LogLikelihood : 3935.586 
## 
## Information Criteria
## ------------------------------------
##                     
## Akaike       -6.0564
## Bayes        -6.0365
## Shibata      -6.0564
## Hannan-Quinn -6.0489
## 
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                     0.2285  0.6327
## Lag[2*(p+q)+(p+q)-1][2]    0.3334  0.7774
## Lag[4*(p+q)+(p+q)-1][5]    1.0070  0.8581
## d.o.f=0
## H0 : No serial correlation
## 
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
##                         statistic p-value
## Lag[1]                   0.009984  0.9204
## Lag[2*(p+q)+(p+q)-1][5]  2.743380  0.4559
## Lag[4*(p+q)+(p+q)-1][9]  4.106102  0.5710
## d.o.f=2
## 
## Weighted ARCH LM Tests
## ------------------------------------
##             Statistic Shape Scale P-Value
## ARCH Lag[3]     3.086 0.500 2.000 0.07897
## ARCH Lag[5]     3.770 1.440 1.667 0.19592
## ARCH Lag[7]     4.246 2.315 1.543 0.31253
## 
## Nyblom stability test
## ------------------------------------
## Joint Statistic:  34.48
## Individual Statistics:             
## mu     0.1286
## omega  5.2852
## alpha1 0.2519
## beta1  0.2442
## shape  0.2497
## 
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic:          1.28 1.47 1.88
## Individual Statistic:     0.35 0.47 0.75
## 
## Sign Bias Test
## ------------------------------------
##                     t-value   prob sig
## Sign Bias          0.009038 0.9928    
## Negative Sign Bias 0.895293 0.3708    
## Positive Sign Bias 0.017129 0.9863    
## Joint Effect       1.253734 0.7401    
## 
## 
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
##   group statistic p-value(g-1)
## 1    20     30.35      0.04749
## 2    30     36.38      0.16287
## 3    40     43.94      0.27017
## 4    50     46.99      0.55488
## 
## 
## Elapsed time : 0.252866

ARCH Model fitting

Best fitted model: ARCH(1) with the smallest loglikehood and AIC.

Box-Ljung Test on standardized residuals: All p-values are greater than alpha=0.05. Null hypothesis is not rejected. There is no correlation and indicates that this model is fitted appropriately.

Adjusted Pearson Goodness-of-Fit test: All the p-values are greater than alpha=0.05. Null hypothesis is not rejected. Hence, the model fits the data.

Conclusion: ARMA (1,1) is the best fitted model.

STresiduals<-residuals(LRarch1)


shapiroTest(STresiduals)
## Warning in if (class(x) == "fREG") x = residuals(x): the condition has length >
## 1 and only the first element will be used
## 
## Title:
##  Shapiro - Wilk Normality Test
## 
## Test Results:
##   STATISTIC:
##     W: 0.943
##   P VALUE:
##     < 2.2e-16 
## 
## Description:
##  Fri Nov 27 15:56:43 2020 by user: User
jarque.bera.test(STresiduals)
## 
##  Jarque Bera Test
## 
## data:  STresiduals
## X-squared = 1330.9, df = 2, p-value < 2.2e-16