> da=read.table("d-usuk0107.txt") > dim(da) [1] 1588 4 > y=log(da[,4]) > x=diff(y) > summaryStats(x) Sample Quantiles: min 1Q median 3Q max -0.02171 -0.002747 0.0002805 0.003338 0.02093 Sample Moments: mean std skewness kurtosis 0.0001792 0.005139 -0.1425 3.602 Number of Observations: 1587 > autocorTest(x,lag=10) Test for Autocorrelation: Ljung-Box Null Hypothesis: no autocorrelation Test Statistics: Test Stat 10.1844 p.value 0.4245 Dist. under Null: chi-square with 10 degrees of freedom Total Observ.: 1587 > archTest(x,lag=10) Test for ARCH Effects: LM Test Null Hypothesis: no ARCH effects Test Statistics: Test Stat 44.1489 p.value 0.0000 Dist. under Null: chi-square with 10 degrees of freedom Total Observ.: 1587 > x=x*100 > m1=garch(x~1,~garch(1,1)) > summary(m1) garch(formula.mean = x ~ 1, formula.var = ~ garch(1, 1)) Mean Equation: x ~ 1 Conditional Variance Equation: ~ garch(1, 1) Conditional Distribution: gaussian -------------------------------------------------------------- Estimated Coefficients: -------------------------------------------------------------- Value Std.Error t value Pr(>|t|) C 0.02344 0.012268 1.911 0.0562277 A 0.00471 0.002106 2.236 0.0254756 ARCH(1) 0.03577 0.009305 3.844 0.0001259 GARCH(1) 0.94583 0.015492 61.054 0.0000000 -------------------------------------------------------------- AIC(4) = 2344.029, BIC(4) = 2365.507 Normality Test: -------------------------------------------------------------- Jarque-Bera P-value Shapiro-Wilk P-value 15.41 0.0004507 0.9966 0.001301 Ljung-Box test for standardized residuals: -------------------------------------------------------------- Statistic P-value Chi^2-d.f. 9.384 0.6699 12 Ljung-Box test for squared standardized residuals: -------------------------------------------------------------- Statistic P-value Chi^2-d.f. 9.57 0.6536 12 Lagrange multiplier test: -------------------------------------------------------------- Lag 1 Lag 2 Lag 3 Lag 4 Lag 5 Lag 6 Lag 7 Lag 8 Lag 9 Lag 10 0.1566 -1.676 -0.9674 1.211 -0.0534 0.719 0.08344 -0.8265 -0.1659 1.273 Lag 11 Lag 12 C 0.7318 -0.05439 -0.3124 TR^2 P-value F-stat P-value 9.04 0.6995 0.8265 0.7252 > m2=garch(x~1,~garch(1,1),cond.dist="t") > summary(m2) garch(formula.mean = x ~ 1, formula.var = ~ garch(1, 1), cond.dist = "t") Mean Equation: x ~ 1 Conditional Variance Equation: ~ garch(1, 1) Conditional Distribution: t with estimated parameter 13.74716 and standard error 4.978744 -------------------------------------------------------------- Estimated Coefficients: -------------------------------------------------------------- Value Std.Error t value Pr(>|t|) C 0.02482 0.012171 2.040 0.0415647 A 0.00364 0.002146 1.696 0.0900312 ARCH(1) 0.03627 0.010310 3.518 0.0004479 GARCH(1) 0.94980 0.016015 59.305 0.0000000 -------------------------------------------------------------- AIC(5) = 2333.037, BIC(5) = 2359.885 Normality Test: -------------------------------------------------------------- Jarque-Bera P-value Shapiro-Wilk P-value 16.49 0.0002632 0.9965 0.001091 Ljung-Box test for standardized residuals: -------------------------------------------------------------- Statistic P-value Chi^2-d.f. 9.383 0.6699 12 Ljung-Box test for squared standardized residuals: -------------------------------------------------------------- Statistic P-value Chi^2-d.f. 9.353 0.6725 12 Lagrange multiplier test: -------------------------------------------------------------- Lag 1 Lag 2 Lag 3 Lag 4 Lag 5 Lag 6 Lag 7 Lag 8 Lag 9 Lag 10 0.1138 -1.688 -0.8668 1.187 -0.1045 0.754 0.04652 -0.8261 -0.2602 1.26 Lag 11 Lag 12 C 0.7055 -0.05438 -0.2461 TR^2 P-value F-stat P-value 8.82 0.7182 0.8064 0.7453 > predict.garch(m2,5) $series.pred: [1] 0.02482319 0.02482319 0.02482319 0.02482319 0.02482319 $sigma.pred: [1] 0.4007978 0.4025418 0.4042542 0.4059356 0.4075868 $asymp.sd: [1] 0.5110539