自己回帰条件付き不均一分散、一般化自己回帰条件付き不均一分散/Autoregressive Conditional Heteroskedasticity(ARCH),Generalized ARCH(GARCH)

Equation ARCH(p) X_{t}=\sigma_{t}\varepsilon_{t},\;\{\varepsilon_{t}\}\sim \textup{NID}(0,1) \sigma^{2}_{t}=\alpha_{0}+\sum^{p}_{i=1}\alpha_{i}X^{2}_{t-i}GARCH(p,q) X_{t}=\sigma_{t}\varepsilon_{t},\;\{\varepsilon_{t}\}\sim \textup{NID}(0,1) \sigma^{2}_{t}=\alpha_{0}+\sum^{p}_{i=1}\alpha_{i}X^{2}_{t-i}+\sum^{q}_{j=1}\beta_{j}\sigma^{2}_{t-j}R サンプルデータ:2007年9月4日から2009年8月31日までのダウ・ジョーンズ工業平均株価 djiareturndjiagarchreturndjia
> library(tseries)
> library(TSA)

> dow <- dataset$dow

> plot(dow,main="DowJones.2007/9/4-2009/8/31",ylab="$",type="l")

> adf.test(dow)

        Augmented Dickey-Fuller Test

data:  dow
Dickey-Fuller = -0.9027, Lag order = 7, p-value = 0.9524
alternative hypothesis: stationary

> r.dow=diff(log(dow))

> plot(r.dow,main="Return of DowJones.2007/9/5-2009/8/31",ylab="Return",type="l")

> length(dow)
[1] 503

> length(r.dow)
[1] 502

> g.r.dow <- garch(r.dow,order=c(1,4))

 ***** ESTIMATION WITH ANALYTICAL GRADIENT ***** 


     I     INITIAL X(I)        D(I)

     1     3.061272e-04     1.000e+00
     2     5.000000e-02     1.000e+00
     3     5.000000e-02     1.000e+00
     4     5.000000e-02     1.000e+00
     5     5.000000e-02     1.000e+00
     6     5.000000e-02     1.000e+00

    IT   NF      F         RELDF    PRELDF    RELDX   STPPAR   D*STEP   NPRELDF
     0    1 -1.734e+03
     1    6 -1.741e+03  4.34e-03  8.44e-03  1.0e-03  1.5e+09  1.0e-04  6.20e+06
     2    7 -1.742e+03  8.29e-05  2.43e-04  6.6e-04  2.0e+00  1.0e-04  2.93e+01
     3    8 -1.742e+03  7.94e-05  7.34e-05  6.7e-04  2.0e+00  1.0e-04  3.05e+01
     4   14 -1.761e+03  1.07e-02  1.90e-02  4.1e-01  2.0e+00  1.0e-01  3.03e+01
     5   15 -1.767e+03  3.87e-03  5.46e-03  2.8e-01  2.0e+00  1.0e-01  4.96e-01
     6   17 -1.774e+03  3.87e-03  3.59e-03  2.5e-01  2.0e+00  1.0e-01  1.31e+00
     7   19 -1.776e+03  1.04e-03  1.71e-03  7.6e-02  2.0e+00  4.1e-02  1.27e+02
     8   20 -1.779e+03  1.84e-03  1.96e-03  6.6e-02  2.0e+00  4.1e-02  4.91e+01
     9   23 -1.788e+03  4.95e-03  5.55e-03  2.0e-01  2.0e+00  1.6e-01  4.92e+01
    10   31 -1.788e+03  3.02e-05  2.50e-04  6.5e-06  4.7e+00  6.1e-06  4.35e-01
    11   32 -1.788e+03  4.73e-05  4.36e-05  5.7e-06  2.0e+00  6.1e-06  3.46e-01
    12   33 -1.788e+03  4.24e-07  5.85e-07  6.2e-06  2.0e+00  6.1e-06  3.54e-01
    13   42 -1.793e+03  2.30e-03  2.82e-03  9.3e-02  1.9e+00  9.9e-02  3.53e-01
    14   44 -1.793e+03  2.02e-04  2.26e-04  5.3e-03  2.0e+00  9.9e-03  4.38e-01
    15   46 -1.793e+03  2.67e-05  2.81e-05  5.3e-04  2.0e+00  9.9e-04  3.66e-01
    16   48 -1.793e+03  1.89e-05  1.89e-05  5.2e-04  2.0e+00  9.9e-04  3.38e-01
    17   50 -1.793e+03  3.64e-06  3.67e-06  9.6e-05  2.0e+00  2.0e-04  1.14e-01
    18   56 -1.796e+03  1.63e-03  2.03e-03  7.4e-02  1.7e+00  1.0e-01  3.92e-02
    19   58 -1.797e+03  3.45e-04  3.51e-04  6.3e-03  2.0e+00  1.0e-02  3.39e-01
    20   60 -1.798e+03  6.49e-04  6.88e-04  1.2e-02  1.9e+00  2.0e-02  9.08e-02
    21   62 -1.799e+03  8.82e-04  9.42e-04  2.1e-02  1.3e+00  4.1e-02  1.27e-02
    22   64 -1.800e+03  1.95e-04  1.97e-04  5.7e-03  2.0e+00  8.1e-03  1.27e-02
    23   66 -1.800e+03  4.30e-04  4.33e-04  1.1e-02  1.3e+00  1.6e-02  6.47e-03
    24   68 -1.801e+03  7.85e-05  8.04e-05  2.3e-03  2.0e+00  3.2e-03  5.81e-03
    25   70 -1.801e+03  1.69e-05  1.68e-05  3.9e-04  2.0e+00  6.5e-04  6.10e-03
    26   72 -1.801e+03  3.16e-05  3.18e-05  7.9e-04  1.9e+00  1.3e-03  5.89e-03
    27   74 -1.801e+03  6.28e-06  6.31e-06  1.7e-04  2.0e+00  2.6e-04  4.52e-03
    28   76 -1.801e+03  1.27e-05  1.28e-05  3.3e-04  2.0e+00  5.2e-04  4.53e-03
    29   79 -1.801e+03  2.48e-07  2.47e-07  6.8e-06  2.0e+00  1.0e-05  4.53e-03
    30   81 -1.801e+03  4.89e-07  4.93e-07  1.4e-05  2.0e+00  2.1e-05  4.55e-03
    31   83 -1.801e+03  1.01e-07  9.93e-08  2.7e-06  2.0e+00  4.2e-06  4.51e-03
    32   85 -1.801e+03  1.79e-08  1.99e-08  5.4e-07  2.0e+00  8.3e-07  4.51e-03
    33   87 -1.801e+03  4.15e-08  3.98e-08  1.1e-06  2.0e+00  1.7e-06  4.51e-03
    34   89 -1.801e+03  7.72e-08  7.95e-08  2.2e-06  2.0e+00  3.3e-06  4.51e-03
    35   92 -1.801e+03  3.51e-09  1.63e-09  4.3e-08  2.0e+00  6.7e-08  4.51e-03
    36   93 -1.801e+03  1.27e-09  3.17e-09  8.7e-08  2.0e+00  1.3e-07  4.51e-03
    37   95 -1.801e+03  8.25e-09  6.40e-09  1.7e-07  2.0e+00  2.7e-07  4.51e-03
    38  104 -1.801e+03 -1.39e-15  1.68e-16  2.7e-15  6.6e+05  5.3e-15  4.51e-03

 ***** FALSE CONVERGENCE *****

 FUNCTION    -1.800727e+03   RELDX        2.658e-15
 FUNC. EVALS     104         GRAD. EVALS      38
 PRELDF       1.676e-16      NPRELDF      4.505e-03

     I      FINAL X(I)        D(I)          G(I)

     1    1.782744e-05     1.000e+00     2.626e+01
     2    7.700668e-09     1.000e+00     3.129e+01
     3    3.790112e-02     1.000e+00    -2.376e+00
     4    6.593393e-02     1.000e+00    -8.861e+00
     5    1.782434e-01     1.000e+00    -5.831e+00
     6    6.682510e-01     1.000e+00    -3.776e+01

> summary(g.r.dow)

Call:
garch(x = r.dow, order = c(1, 4))

Model:
GARCH(1,4)

Residuals:
     Min       1Q   Median       3Q      Max 
-3.13196 -0.61156  0.00249  0.55622  3.16577 

Coefficient(s):
    Estimate  Std. Error  t value Pr(>|t|)    
a0 1.783e-05   6.651e-06    2.680  0.00735 ** 
a1 7.701e-09   3.904e-02    0.000  1.00000    
a2 3.790e-02   4.678e-02    0.810  0.41782    
a3 6.593e-02   5.759e-02    1.145  0.25229    
a4 1.782e-01   7.299e-02    2.442  0.01461 *  
b1 6.683e-01   7.177e-02    9.310  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Diagnostic Tests:
        Jarque Bera Test

data:  Residuals
X-squared = 3.2574, df = 2, p-value = 0.1962


        Box-Ljung test

data:  Squared.Residuals
X-squared = 2.0836, df = 1, p-value = 0.1489

> c.g.r.dow <- g.r.dow$coef

> c.g.r.dow
          a0           a1           a2           a3           a4           b1 
1.782744e-05 7.700668e-09 3.790112e-02 6.593393e-02 1.782434e-01 6.682510e-01 

> c.g.r.dow[1]
          a0 
1.782744e-05 

> c.g.r.dow[6]
      b1 
0.668251 

> sim.r.dow <- garch.sim(alpha=c(a0=c.g.r.dow[1],a1=c.g.r.dow[2],a2=c.g.r.dow[3],a3=c.g.r.dow[4],a4=c.g.r.dow[5]),beta=c.g.r.dow[6],n=502)

> plot(r.dow,main="Return of DowJones.2007/9/5-2009/8/31",ylab="Return",type="l",ylim=c(-0.15,0.15))
> par(new=T)
> plot(sim.r.dow,main="",ylab="",xlab="",ylim=c(-0.15,0.15),type="l",col=2)
参考文献 廣松毅,浪花貞夫,高岡慎著(2006).『経済時系列分析』.多賀出版.404pp. 福地純一郎、伊藤有希(2011).『Rによる計量経済分析』.朝倉書店.186pp. 熊谷悦生、舟尾暢男(2008).『Rで学ぶデータマイニング Ⅱシミュレーション編』.オーム社.248pp. 水野浩孝、山元一真.『GARCHを使った金融時系列データのモデル化に関する研究』 URL http://www.seto.nanzan-u.ac.jp/ise/gr-thesis/it/proc/2011/08mi136.pdf URL http://web.keio.jp/~nagakura/R_GARCH.pdfアプリケーション R Core Team (2013). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org/.