Coca-Cola (KO) Stock Modeling

Hao Zhang, University of Washington

$\newcommand{\1}{\boldsymbol{1}}$ $\newcommand{\0}{\boldsymbol{0}}$ $\newcommand\Fc{\mathscr{F}}$ $\newcommand{\eps}{\varepsilon}$ $\newcommand{\Var}{\operatorname{Var}}$ $\newcommand{\diag}{\operatorname{diag}}$ $\newcommand{\vec}{\operatorname{vec}}$ $\newcommand{\det}{\operatorname{det}}$ $\newcommand\Cov{\operatorname{Cov}}$ $\newcommand\Corr{\operatorname{Corr}}$ $\newcommand{\sig}{\sigma}$ $\newcommand\Sig{\Sigma}$ $\newcommand{\al}{\alpha}$ $\newcommand{\gam}{\gamma}$ $\newcommand\Gam{\Gamma}$ $\newcommand\lam{\lambda}$ $\newcommand{\Del}{\Delta}$ $\newcommand{\del}{\delta}$ $\newcommand\tht{\theta}$ $\newcommand\ph{\varphi}$ $\newcommand\om{\omega}$ $\newcommand\Om{\Omega}$ $\newcommand\rb{\bar{r}}$ $\newcommand{\Xb}{\bar{X}}$ $\newcommand{\Yb}{\bar{Y}}$ $\newcommand\Eb{\mathbb{E}}$ $\newcommand\Pb{\mathbb{P}}$ $\newcommand\Qb{\mathbb{Q}}$ $\newcommand\Rb{\mathbb{R}}$ $\newcommand\Zb{\mathbb{Z}}$ $\newcommand\Nb{\mathbb{N}}$ $\newcommand\Av{\textbf{A}}$ $\newcommand\av{\mathbf{a}}$ $\newcommand\Bv{\textbf{B}}$ $\newcommand\bv{\mathbf{b}}$ $\newcommand\Ev{\textbf{E}}$ $\newcommand\Dv{\textbf{D}}$ $\newcommand\Fv{\textbf{F}}$ $\newcommand\Gv{\textbf{G}}$ $\newcommand\Hv{\textbf{H}}$ $\newcommand\Kv{\textbf{K}}$ $\newcommand\Iv{\textbf{I}}$ $\newcommand\Pv{\textbf{P}}$ $\newcommand\Ov{\textbf{O}}$ $\newcommand\Sv{\textbf{S}}$ $\newcommand\Xv{\textbf{X}}$ $\newcommand\Yv{\textbf{Y}}$ $\newcommand\Zv{\textbf{Z}}$ $\newcommand\xv{\mathbf{x}}$ $\newcommand\yv{\mathbf{y}}$ $\newcommand\zv{\mathbf{z}}$ $\newcommand\Cv{\mathbf{C}}$ $\newcommand\mv{\mathbf{m}}$ $\newcommand\nv{\mathbf{n}}$ $\newcommand\pv{\mathbf{p}}$ $\newcommand\rv{\mathbf{r}}$ $\newcommand\sv{\mathbf{s}}$ $\newcommand\wv{\mathbf{w}}$ $\newcommand\Wv{\textbf{W}}$ $\newcommand\alv{\boldsymbol{\al}}$ $\newcommand\betav{\boldsymbol{\beta}}$ $\newcommand\etav{\boldsymbol{\eta}}$ $\newcommand\epsv{\boldsymbol{\varepsilon}}$ $\newcommand\delv{\boldsymbol{\delta}}$ $\newcommand\Lamv{\boldsymbol{\Lambda}}$ $\newcommand\lamv{\boldsymbol{\lambda}}$ $\newcommand\muv{\boldsymbol{\mu}}$ $\newcommand\piv{\boldsymbol{\pi}}$ $\newcommand\Piv{\boldsymbol{\Pi}}$ $\newcommand\Gamv{\boldsymbol{\Gam}}$ $\newcommand\Phiv{\boldsymbol{\Phi}}$ $\newcommand\rhov{\boldsymbol{\rho}}$ $\newcommand\Sigv{\boldsymbol{\Sig}}$ $\newcommand\ah{\widehat{a}}$ $\newcommand\Pbh{\widehat{\Pb}}$ $\newcommand\phh{\widehat{\varphi}}$ $\newcommand\Ebh{\widehat{\Eb}}$ $\newcommand\Qh{\widehat{Q}}$ $\newcommand\Ih{\widehat{I}}$ $\newcommand\rh{\widehat{r}}$ $\newcommand\pih{\widehat{\pi}}$ $\newcommand\Pih{\widehat{\Pi}}$ $\newcommand\Sigvh{\widehat{\Sigv}}$ $\newcommand\Wh{\widehat{W}}$ $\newcommand\Fh{\widehat{F}}$ $\newcommand\Yh{\widehat{Y}}$ $\newcommand\Zh{\widehat{Z}}$ $\newcommand\Yvh{\widehat{\Yv}}$ $\newcommand\Ah{\widehat{\Ac}}$ $\newcommand\uh{\widehat{u}}$ $\newcommand\vh{\widehat{v}}$ $\newcommand\fh{\widehat{f}}$ $\newcommand\hh{\widehat{h}}$ $\newcommand\Bh{\widehat{B}}$ $\newcommand\Ovh{\widehat{\Ov}}$ $\newcommand\Xvh{\widehat{\Xv}}$ $\newcommand\rhoh{\widehat{\rho}}$ $\newcommand\omh{\widehat{\om}}$ $\newcommand\nuh{\widehat{\nu}}$ $\newcommand\varphih{\widehat{\varphi}}$ $\newcommand\alh{\widehat{\al}}$ $\newcommand\thetah{\widehat{\theta}}$ $\newcommand\betah{\widehat{\beta}}$ $\newcommand\betavh{\widehat{\boldsymbol\beta}}$ $\newcommand\kaph{\widehat{\kappa}}$ $\newcommand\sigh{\widehat{\sigma}}$ $\newcommand\epsh{\widehat{\eps}}$ $\newcommand\epsvh{\widehat{\epsv}}$ $\newcommand\epst{\widetilde{\eps}}$ $\newcommand\muh{\widehat{\mu}}$ $\newcommand\dd{\mathrm{d}}$ $\newcommand\ee{\mathrm{e}}$

(Adjust Plotting Settings)

In [1]:
sc = .75
options(repr.plot.width=16*sc,
        repr.plot.height=7*sc,
        repr.plot.pointsize = 13, # Text height in pt
        repr.plot.bg        = 'white', 
        repr.plot.antialias = 'gray',
        #nice medium-res DPI
        repr.plot.res       = 300,
        #jpeg quality bumped from default
        repr.plot.quality   = 90,
        #vector font family
        repr.plot.family    = 'serif')

options(warn=-1)
options("getSymbols.warning4.0"=FALSE)

1. Acquring Data & Detecting Autocorrelation

In [2]:
library(quantmod)
getSymbols('KO', from='2007-01-03', to='2018-02-01', auto.assign=TRUE, Warnings=FALSE)
KO = Ad(KO)
Loading required package: xts

Loading required package: zoo


Attaching package: ‘zoo’


The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric


Loading required package: TTR

Registered S3 method overwritten by 'quantmod':
  method            from
  as.zoo.data.frame zoo 

Version 0.4-0 included new data defaults. See ?getSymbols.

'KO'
In [3]:
head(KO)
           KO.Adjusted
2007-01-03    13.76685
2007-01-04    13.77252
2007-01-05    13.67616
2007-01-08    13.76401
2007-01-09    13.77535
2007-01-10    13.79519
In [4]:
dim(KO)
  1. 2790
  2. 1
In [5]:
# Let r be percentage daily log returns
r = 100*diff(log(KO))[-1]
In [6]:
head(r)
           KO.Adjusted
2007-01-04  0.04116289
2007-01-05 -0.70206207
2007-01-08  0.64029684
2007-01-09  0.08231128
2007-01-10  0.14395078
2007-01-11  0.12316995
In [7]:
# Plotting the acf and doing Box-Ljung test for autocorrelation
acf(r, main="sample ACF of KO daily log returns")
Box.test(r, lag=10, type = "Ljung-Box")
	Box-Ljung test

data:  r
X-squared = 38.761, df = 10, p-value = 2.796e-05

Sample ACF and Box-Ljung test show there is autocorrelation in $\{r_t\}$.

2. Detecting ARCH Effect

In [8]:
# Fit an ARIMA model
library(forecast)
fit=auto.arima(r, max.p = 20, max.q = 20, max.d = 2, ic="bic")
print(fit)
Series: r 
ARIMA(0,0,1) with zero mean 

Coefficients:
          ma1
      -0.0761
s.e.   0.0198

sigma^2 estimated as 1.304:  log likelihood=-4327.32
AIC=8658.65   AICc=8658.65   BIC=8670.52
In [9]:
# Inspecting residual's square
par(mfrow=c(2,1));par(mar=c(3,3,3,3))
plot(resid(fit)**2, type="l", col=1, main = expression(residual^2))
smoother = loess((resid(fit)**2) ~ seq(1,length(resid(fit))), span=0.1)
lines(seq(1,length(resid(fit))),fitted(smoother),col=2)
acf((resid(fit)**2), main=expression("sample ACF of "~ residual^2))
In [10]:
# Box-Ljung test
Box.test(resid(fit)**2, lag = 5, type = "Ljung-Box")
	Box-Ljung test

data:  resid(fit)^2
X-squared = 881.27, df = 5, p-value < 2.2e-16

There is existence of ARCH effect.

3. Fitting ARMA+GARCH (1, 1) Model With Normal Residuals

In [11]:
# Fitting
library(fGarch)
fit_magarch = garchFit(~arma(0,1)+garch(1,1), data=r, trace = F)
summary(fit_magarch)
Loading required package: timeDate

Loading required package: timeSeries


Attaching package: ‘timeSeries’


The following object is masked from ‘package:zoo’:

    time<-


Loading required package: fBasics


Attaching package: ‘fBasics’


The following object is masked from ‘package:TTR’:

    volatility


Title:
 GARCH Modelling 

Call:
 garchFit(formula = ~arma(0, 1) + garch(1, 1), data = r, trace = F) 

Mean and Variance Equation:
 data ~ arma(0, 1) + garch(1, 1)
<environment: 0x7fc2ef1b1150>
 [data = r]

Conditional Distribution:
 norm 

Coefficient(s):
       mu        ma1      omega     alpha1      beta1  
 0.057823  -0.029830   0.038894   0.100439   0.866929  

Std. Errors:
 based on Hessian 

Error Analysis:
        Estimate  Std. Error  t value Pr(>|t|)    
mu       0.05782     0.01627    3.554  0.00038 ***
ma1     -0.02983     0.02133   -1.398  0.16206    
omega    0.03889     0.00937    4.151 3.31e-05 ***
alpha1   0.10044     0.01534    6.547 5.86e-11 ***
beta1    0.86693     0.02048   42.336  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Log Likelihood:
 -3897.272    normalized:  -1.397372 

Description:
 Sat Apr 11 14:07:18 2020 by user:  


Standardised Residuals Tests:
                                Statistic p-Value  
 Jarque-Bera Test   R    Chi^2  750.3184  0        
 Shapiro-Wilk Test  R    W      0.9758269 0        
 Ljung-Box Test     R    Q(10)  6.333913  0.7864727
 Ljung-Box Test     R    Q(15)  7.163313  0.9529584
 Ljung-Box Test     R    Q(20)  10.3499   0.9613745
 Ljung-Box Test     R^2  Q(10)  4.423358  0.9262346
 Ljung-Box Test     R^2  Q(15)  4.81629   0.9935708
 Ljung-Box Test     R^2  Q(20)  6.014993  0.9988771
 LM Arch Test       R    TR^2   4.706607  0.9670677

Information Criterion Statistics:
     AIC      BIC      SIC     HQIC 
2.798330 2.808968 2.798324 2.802171 

We fit an ARMA(0,1)+GARCH(1,1) model, as follows, $\ $

$$ \left\{\begin{array}{}r_t = 0.057823+a_t-0.029829a_{t-1};\quad a_t=\sig_t\eps_t,\quad\eps_t\overset{i.i.d.}\sim N(0,1)\\\sig_t^2=0.038895+0.100440a_{t-1}^2+0.866927\sig_{t-1}^2\end{array}\right. $$
In [12]:
# ACF plot of standardized residuals
plot(fit_magarch, which=10)

The ACF plot of the standardized residual show that the ARMA(0,1) specification is adequate. The Ljung-Box test of standardized residuals for 10 , 15, and 20 lags indicate the model is adequate.

In [13]:
# ACF plot of square standarized residuals
plot(fit_magarch, which=11)

The ACF plot of the squared standardized residual shows that the GARCH(1,1) specification is adequate. $\ $

So do the Ljung-Box tests of standardized residuals$^2$.

In [14]:
# QQ plot
plot(fit_magarch, which=13)

The normal probability plot of the standardized residuals indicates fat-tailed distribution, so we proceed with model modification, using t-distribution residuals.

4. Model Modification: Fitting An ARMA+GARCH (1, 1) Model With Student-t Residuals

In [15]:
# Fit the model
fit_magarch_tdist = garchFit(~arma(0,1)+garch(1,1), data=r,
                             cond.dist = "std",trace = F)
summary(fit_magarch_tdist)
Title:
 GARCH Modelling 

Call:
 garchFit(formula = ~arma(0, 1) + garch(1, 1), data = r, cond.dist = "std", 
    trace = F) 

Mean and Variance Equation:
 data ~ arma(0, 1) + garch(1, 1)
<environment: 0x7fc2ef0e6680>
 [data = r]

Conditional Distribution:
 std 

Coefficient(s):
       mu        ma1      omega     alpha1      beta1      shape  
 0.063831  -0.020215   0.019006   0.076508   0.911551   4.817589  

Std. Errors:
 based on Hessian 

Error Analysis:
        Estimate  Std. Error  t value Pr(>|t|)    
mu      0.063831    0.014867    4.294 1.76e-05 ***
ma1    -0.020215    0.019050   -1.061   0.2886    
omega   0.019006    0.007849    2.422   0.0155 *  
alpha1  0.076508    0.017048    4.488 7.19e-06 ***
beta1   0.911551    0.020599   44.253  < 2e-16 ***
shape   4.817589    0.461832   10.431  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Log Likelihood:
 -3789.258    normalized:  -1.358644 

Description:
 Sat Apr 11 14:07:19 2020 by user:  


Standardised Residuals Tests:
                                Statistic p-Value  
 Jarque-Bera Test   R    Chi^2  881.0412  0        
 Shapiro-Wilk Test  R    W      0.9742059 0        
 Ljung-Box Test     R    Q(10)  6.736174  0.7500949
 Ljung-Box Test     R    Q(15)  7.598451  0.9388712
 Ljung-Box Test     R    Q(20)  10.62478  0.9553789
 Ljung-Box Test     R^2  Q(10)  4.29588   0.9330137
 Ljung-Box Test     R^2  Q(15)  5.142671  0.990848 
 Ljung-Box Test     R^2  Q(20)  7.661349  0.9938817
 LM Arch Test       R    TR^2   4.290918  0.9775964

Information Criterion Statistics:
     AIC      BIC      SIC     HQIC 
2.721590 2.734355 2.721581 2.726199 

We fit an ARMA(0,1)+GARCH(1,1) model with student-t residuals, as follows, $\ $

$$ \left\{\begin{array}{}r_t = 0.063830+a_t-0.020213a_{t-1};\quad a_t=\sig_t\eps_t,\quad\eps_t\overset{i.i.d.}\sim t_{4.817566}\\\sig_t^2=0.019006+0.076508a_{t-1}^2+0.911551\sig_{t-1}^2\end{array}\right. $$
In [16]:
# QQ plot
plot(fit_magarch_tdist, which=13)

We have shown in (b) that ARMA(0,1)+GARCH(1,1) specification is adequate. $\\$

And the t-plot of the standardized residuals is a much better fit.

5. Detecting Skewness

To detect skewness, we fit an ARMA+GARCH(1,1) model with skew-t-distribution, and do model validation test.

In [17]:
# Fit the model
fit_magarch_stdist = garchFit(~arma(0,1)+garch(1,1), data=r,
                             cond.dist = "sstd",trace = F)
summary(fit_magarch_stdist)
Title:
 GARCH Modelling 

Call:
 garchFit(formula = ~arma(0, 1) + garch(1, 1), data = r, cond.dist = "sstd", 
    trace = F) 

Mean and Variance Equation:
 data ~ arma(0, 1) + garch(1, 1)
<environment: 0x7fc2e87d9f08>
 [data = r]

Conditional Distribution:
 sstd 

Coefficient(s):
       mu        ma1      omega     alpha1      beta1       skew      shape  
 0.052696  -0.021580   0.019581   0.077416   0.910055   0.958305   4.833468  

Std. Errors:
 based on Hessian 

Error Analysis:
        Estimate  Std. Error  t value Pr(>|t|)    
mu      0.052696    0.016280    3.237  0.00121 ** 
ma1    -0.021580    0.019074   -1.131  0.25789    
omega   0.019581    0.007971    2.457  0.01403 *  
alpha1  0.077416    0.017147    4.515 6.34e-06 ***
beta1   0.910055    0.020795   43.764  < 2e-16 ***
skew    0.958305    0.024497   39.120  < 2e-16 ***
shape   4.833468    0.464886   10.397  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Log Likelihood:
 -3787.871    normalized:  -1.358147 

Description:
 Sat Apr 11 14:07:20 2020 by user:  


Standardised Residuals Tests:
                                Statistic p-Value  
 Jarque-Bera Test   R    Chi^2  875.5227  0        
 Shapiro-Wilk Test  R    W      0.974251  0        
 Ljung-Box Test     R    Q(10)  6.62538   0.7602745
 Ljung-Box Test     R    Q(15)  7.507106  0.9420223
 Ljung-Box Test     R    Q(20)  10.49221  0.9583442
 Ljung-Box Test     R^2  Q(10)  4.320447  0.9317354
 Ljung-Box Test     R^2  Q(15)  5.144997  0.9908259
 Ljung-Box Test     R^2  Q(20)  7.596898  0.9942165
 LM Arch Test       R    TR^2   4.322092  0.9768983

Information Criterion Statistics:
     AIC      BIC      SIC     HQIC 
2.721313 2.736205 2.721300 2.726689 

We fit an ARMA(0,1)+GARCH(1,1) model with skewed student-t residuals, as follows, $\ $

$$ \left\{\begin{array}{}r_t = 0.052696+a_t-0.021578a_{t-1};\quad a_t=\sig_t\eps_t,\quad\eps_t\overset{i.i.d.}\sim t(\nu=4.833,\xi=0.958)\\\sig_t^2=0.019581+0.077416a_{t-1}^2+0.910055\sig_{t-1}^2\end{array}\right. $$
In [18]:
# QQ plot
plot(fit_magarch_stdist, which=13)

The skewed t-plot of the standardized residuals is almost the same with the one without skewness. Both models are adequate. $\ $

However, based on the model, the skewness $\xi = 0.958$ is less than 1, which makes it not significant. We conclude that the returns of KO stock is not skewed.

6. Detecting Risk Premium: Fitting An ARMA+GARCH-M Model

In [19]:
# Fit the model
library('rugarch')
spec = ugarchspec(variance.model=list(garchOrder=c(1,1)),
                  mean.model=list(armaOrder=c(0,1),
                                  archm=TRUE, archpow=2))
fit_garchm = ugarchfit(data=r, spec=spec)
show(fit_garchm)
Loading required package: parallel


Attaching package: ‘rugarch’


The following object is masked from ‘package:stats’:

    sigma


*---------------------------------*
*          GARCH Model Fit        *
*---------------------------------*

Conditional Variance Dynamics 	
-----------------------------------
GARCH Model	: sGARCH(1,1)
Mean Model	: ARFIMA(0,0,1)
Distribution	: norm 

Optimal Parameters
------------------------------------
        Estimate  Std. Error  t value Pr(>|t|)
mu      0.034781    0.027197   1.2788 0.200953
ma1    -0.029740    0.021328  -1.3944 0.163196
archm   0.027599    0.026071   1.0586 0.289778
omega   0.039521    0.009539   4.1431 0.000034
alpha1  0.101143    0.015379   6.5767 0.000000
beta1   0.865662    0.020641  41.9399 0.000000

Robust Standard Errors:
        Estimate  Std. Error  t value Pr(>|t|)
mu      0.034781    0.024580   1.4150 0.157068
ma1    -0.029740    0.022701  -1.3100 0.190182
archm   0.027599    0.019746   1.3977 0.162204
omega   0.039521    0.016991   2.3260 0.020018
alpha1  0.101143    0.030168   3.3527 0.000800
beta1   0.865662    0.039003  22.1949 0.000000

LogLikelihood : -3896.734 

Information Criteria
------------------------------------
                   
Akaike       2.7987
Bayes        2.8114
Shibata      2.7987
Hannan-Quinn 2.8033

Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
                        statistic p-value
Lag[1]                    0.03619  0.8491
Lag[2*(p+q)+(p+q)-1][2]   0.21457  0.9984
Lag[4*(p+q)+(p+q)-1][5]   0.95685  0.9531
d.o.f=1
H0 : No serial correlation

Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
                        statistic p-value
Lag[1]                    0.02114  0.8844
Lag[2*(p+q)+(p+q)-1][5]   1.06431  0.8449
Lag[4*(p+q)+(p+q)-1][9]   2.41628  0.8499
d.o.f=2

Weighted ARCH LM Tests
------------------------------------
            Statistic Shape Scale P-Value
ARCH Lag[3]    0.0858 0.500 2.000  0.7696
ARCH Lag[5]    1.9382 1.440 1.667  0.4851
ARCH Lag[7]    2.8855 2.315 1.543  0.5354

Nyblom stability test
------------------------------------
Joint Statistic:  1.2746
Individual Statistics:              
mu     0.09306
ma1    0.07853
archm  0.05165
omega  0.52627
alpha1 0.62161
beta1  0.67470

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.4552 0.64900    
Negative Sign Bias  1.9217 0.05475   *
Positive Sign Bias  0.2356 0.81375    
Joint Effect        4.3676 0.22441    


Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
  group statistic p-value(g-1)
1    20     109.2    1.102e-14
2    30     124.6    8.002e-14
3    40     129.2    1.365e-11
4    50     151.1    2.456e-12


Elapsed time : 1.199498 

We fit an ARMA(0,1)+GARCH(1,1)-M model, as follows, $\ $

$$ \left\{\begin{array}{}r_t = 0.03478+0.0276\sig_t^2+a_t-0.029738a_{t-1};\quad a_t=\sig_t\eps_t,\quad\eps_t\overset{i.i.d.}\sim N(0,1)\\\sig_t^2=0.039521+0.101143a_{t-1}^2+0.865663\sig_{t-1}^2\end{array}\right. $$

The estimated risk-premium is 0.0276, which is statistically insignificant. So the return of KO stock has no risk premium.

In [20]:
# Model validation
par(mfrow=c(3,2));par(mar=c(3,3,3,3))
plot(fit_garchm,which=1)
plot(fit_garchm,which=3)
plot(fit_garchm,which=10)
plot(fit_garchm,which=11)
plot(fit_garchm,which=8)
plot(fit_garchm,which=9)

The model seems adequate, the residuals are not normal though.

7. Detecting Leverage Effect: Fitting An ARMA+EGARCH model

In [21]:
# Fit the model
spec = ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)),
                  mean.model=list(armaOrder=c(0,1)))
fit_egarch = ugarchfit(data=r, spec=spec)
show(fit_egarch)
*---------------------------------*
*          GARCH Model Fit        *
*---------------------------------*

Conditional Variance Dynamics 	
-----------------------------------
GARCH Model	: eGARCH(1,1)
Mean Model	: ARFIMA(0,0,1)
Distribution	: norm 

Optimal Parameters
------------------------------------
        Estimate  Std. Error  t value Pr(>|t|)
mu      0.041024    0.012552   3.2685 0.001081
ma1    -0.030159    0.020372  -1.4804 0.138760
omega   0.008264    0.003210   2.5741 0.010049
alpha1 -0.063294    0.013332  -4.7476 0.000002
beta1   0.966644    0.007071 136.7026 0.000000
gamma1  0.189604    0.022919   8.2726 0.000000

Robust Standard Errors:
        Estimate  Std. Error  t value Pr(>|t|)
mu      0.041024    0.009242   4.4390 0.000009
ma1    -0.030159    0.021460  -1.4054 0.159906
omega   0.008264    0.004592   1.7996 0.071930
alpha1 -0.063294    0.017683  -3.5793 0.000344
beta1   0.966644    0.011145  86.7333 0.000000
gamma1  0.189604    0.038416   4.9355 0.000001

LogLikelihood : -3865.984 

Information Criteria
------------------------------------
                   
Akaike       2.7766
Bayes        2.7894
Shibata      2.7766
Hannan-Quinn 2.7812

Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
                        statistic p-value
Lag[1]                    0.06811  0.7941
Lag[2*(p+q)+(p+q)-1][2]   0.20402  0.9987
Lag[4*(p+q)+(p+q)-1][5]   0.76916  0.9753
d.o.f=1
H0 : No serial correlation

Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
                        statistic p-value
Lag[1]                    0.05549  0.8138
Lag[2*(p+q)+(p+q)-1][5]   0.90576  0.8806
Lag[4*(p+q)+(p+q)-1][9]   2.20827  0.8787
d.o.f=2

Weighted ARCH LM Tests
------------------------------------
            Statistic Shape Scale P-Value
ARCH Lag[3]    0.2334 0.500 2.000  0.6290
ARCH Lag[5]    1.5779 1.440 1.667  0.5721
ARCH Lag[7]    2.6668 2.315 1.543  0.5785

Nyblom stability test
------------------------------------
Joint Statistic:  1.9757
Individual Statistics:             
mu     0.4636
ma1    0.1188
omega  0.6359
alpha1 0.3577
beta1  0.3185
gamma1 0.2004

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.60308 0.5465    
Negative Sign Bias 1.46819 0.1422    
Positive Sign Bias 0.09871 0.9214    
Joint Effect       2.17640 0.5366    


Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
  group statistic p-value(g-1)
1    20     90.71    2.486e-11
2    30    105.02    1.518e-10
3    40    107.85    2.250e-08
4    50    123.89    2.043e-08


Elapsed time : 0.240222 

We fit an ARMA(0,1)+EGARCH(1,1) model, as follows, $\ $

$$ \left\{\begin{array}{}r_t = 0.041052+a_t-0.030159a_{t-1};\quad a_t=\sig_t\eps_t,\quad\eps_t\overset{i.i.d.}\sim N(0,1)\\\ln(\sig_t^2)=0.008262-0.063297\eps_{t-1}+0.189598(|\eps_{t-1}|-\sqrt{2/\pi})+0.966645\ln(\sig_{t-1}^2)\end{array}\right. $$

The lag-1 leverage parameter $\alpha_1$=−0.063297 is significant (p-value is 0.000002). So, the model implies leverage effect in the KO stock returns.

In [22]:
# Model validation
par(mfrow=c(3,2));par(mar=c(3,3,3,3))
plot(fit_egarch,which=1)
plot(fit_egarch,which=3)
plot(fit_egarch,which=10)
plot(fit_egarch,which=11)
plot(fit_egarch,which=8)
plot(fit_egarch,which=9)

The model seems adequate, the residuals are not normal though.