This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Cmd+Shift+Enter.
setwd("/Users/aisling/Documents/daydayup/nus_mqf/Financial Time Series/homework/Homework/HW 2/")
The working directory was changed to /Users/aisling/Documents/daydayup/nus_mqf/Financial Time Series/homework/Homework/HW 2 inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
require(quantmod)
载入需要的程辑包:quantmod
载入需要的程辑包:xts
载入需要的程辑包:zoo
载入程辑包:‘zoo’
The following object is masked from ‘package:timeSeries’:
time<-
The following objects are masked from ‘package:base’:
as.Date, as.Date.numeric
Registered S3 method overwritten by 'xts':
method from
as.zoo.xts zoo
载入需要的程辑包:TTR
载入程辑包:‘TTR’
The following object is masked from ‘package:fBasics’:
volatility
Registered S3 method overwritten by 'quantmod':
method from
as.zoo.data.frame zoo
Version 0.4-0 included new data defaults. See ?getSymbols.
gdp = getSymbols('GDPC96',src='FRED', auto.assign=F)
‘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.
gdp.df = data.frame(date = time(gdp), coredata(gdp) )
head(gdp.df)
require(fBasics)
gr=diff((gdp.df[,2]))/gdp.df[-282,2]
require(ggfortify)
载入需要的程辑包:ggfortify
载入需要的程辑包:ggplot2
Registered S3 methods overwritten by 'ggplot2':
method from
[.quosures rlang
c.quosures rlang
print.quosures rlang
Registered S3 method overwritten by 'dplyr':
method from
print.rowwise_df
autoplot(ts(gr), ts.colour = 'blue', ts.geom = 'ribbon', main = "GNP")
qplot(gr[1:281],gr[2:282], xlab = "index", ylab = "return", geom = "point")
par(mfcol=c(2,1))
acf(gr)
pacf(gr)
m0 = ar(gr , method="mle")
m0$order #An AR(3) is selected based on AIC
[1] 3
autoplot(ts(m0$resid),ts.colour = "blue", ts.geom = 'ribbon', main="AR(3) fit for GNP")
t.test(gr)
One Sample t-test
data: gr
t = 13.772, df = 280, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
0.006698639 0.008932837
sample estimates:
mean of x
0.007815738
Box.test(m0$resid,lag=10,type="Ljung")
Box-Ljung test
data: m0$resid
X-squared = 6.4222, df = 10, p-value = 0.7786
(pv1=1-pchisq(6.4412,10-3))
[1] 0.4892768
sprintf(" Since pv1 = %s ,pv1 > 0.05 ,Do not reject null hypothesis of independence, the model AR(3) is adequate",pv1)
[1] " Since pv1 = 0.489276819373675 ,pv1 > 0.05 ,Do not reject null hypothesis of independence, the model AR(3) is adequate"
(m1 <- arima(gr,order=c(3,0,0)))
Call:
arima(x = gr, order = c(3, 0, 0))
Coefficients:
ar1 ar2 ar3 intercept
0.3461 0.1255 -0.0930 0.0078
s.e. 0.0593 0.0624 0.0594 0.0008
sigma^2 estimated as 7.629e-05: log likelihood = 933.26, aic = -1856.51
tsdiag(m1)
(p1 <- c(1,-m1$coef[1:3]))
ar1 ar2 ar3
1.00000000 -0.34608624 -0.12549869 0.09300821
(roots=polyroot(p1))
[1] 1.824805+1.15939i -2.300281+0.00000i 1.824805-1.15939i
Mod(roots)
[1] 2.161966 2.300281 2.161966
(k=2*pi/acos(1.824805/2.161966))
[1] 11.10089
sprintf("There are complex solutions, hence the business cycles exist, the average length of business cycles is %s",k)
[1] "There are complex solutions, hence the business cycles exist, the average length of business cycles is 11.1008924427193"
require(forecast)
pre <- forecast(m1,level = c(95), h = 9) # Prediction
autoplot(pre)
#dev.off() # make sure no graphics error
x <- gdp.df[,2]
log_x = diff(log(x))
#basicStats(log_x)
autoplot(ts(log_x), ts.colour = 'blue', ts.geom = 'ribbon', main = "GNP")
Ignoring unknown parameters: ts.colour, ts.geom
par(mfcol=c(2,1))
acf(log_x,lag=12,main="ACF lag=12")
pacf(log_x,lag.max=12,main="PACF lag=12")
auto.arima(log_x)
Series: log_x
ARIMA(4,1,1)
Coefficients:
ar1 ar2 ar3 ar4 ma1
0.3324 0.1297 -0.0700 -0.0815 -0.9860
s.e. 0.0601 0.0628 0.0628 0.0601 0.0113
sigma^2 estimated as 7.661e-05: log likelihood=930.43
AIC=-1848.87 AICc=-1848.56 BIC=-1827.06
(m_log <- arima(log_x,order=c(4,1,1)))
Call:
arima(x = log_x, order = c(4, 1, 1))
Coefficients:
ar1 ar2 ar3 ar4 ma1
0.3324 0.1297 -0.0700 -0.0815 -0.9860
s.e. 0.0601 0.0628 0.0628 0.0601 0.0113
sigma^2 estimated as 7.525e-05: log likelihood = 930.43, aic = -1848.87
tsdiag(m_log)
(ljunbgbox_1 = Box.test(m_log$resid , lag= 10 ,type="Ljung"))
Box-Ljung test
data: m_log$resid
X-squared = 6.4484, df = 10, p-value = 0.7763
(pv = 1-pchisq(ljunbgbox_1$statistic, 10 - 4))
X-squared
0.3748752
sprintf("p value: %s > 0.05. Do not reject null hypothesis of independence,the model is adequate",pv)
[1] "p value: 0.374875197390212 > 0.05. Do not reject null hypothesis of independence,the model is adequate"
require(forecast)
pre2 <- forecast(m_log,level = c(95), h = 9) # Prediction
autoplot(pre2)
#dev.off() # make sure no graphics error
require(data.table)
载入需要的程辑包:data.table
Registered S3 method overwritten by 'data.table':
method from
print.data.table
data.table 1.12.2 using 4 threads (see ?getDTthreads). Latest news: r-datatable.com
载入程辑包:‘data.table’
The following objects are masked from ‘package:xts’:
first, last
csrp = fread("/Users/aisling/Documents/daydayup/nus_mqf/Financial Time Series/homework/Homework/HW 2/m-dec125910-5112.txt")
csrp = csrp[csrp$prtnam == 10]
head(csrp)
log_csrp = log(csrp$totret+1)
par(mfcol=c(2,1))
pacf(log_csrp )
acf(log_csrp )
(fit<-auto.arima(log_csrp,ic=c('bic')))
Series: log_csrp
ARIMA(0,0,1) with non-zero mean
Coefficients:
ma1 mean
0.2175 0.0096
s.e. 0.0356 0.0027
sigma^2 estimated as 0.003802: log likelihood=1018.18
AIC=-2030.36 AICc=-2030.33 BIC=-2016.52
m_csrp1 = arima(log_csrp,order=c(0,0,1))
tsdiag(m_csrp1,gof=24)
(ljunbgbox_csrp1 = Box.test(m_csrp1$resid , lag= 10 ,type="Ljung"))
Box-Ljung test
data: m_csrp1$resid
X-squared = 2.7869, df = 10, p-value = 0.986
(pv_csrp1 = 1-pchisq(ljunbgbox_csrp1$statistic, 10 - 0))
X-squared
0.9860037
sprintf("p value: %s > 0.05. Do not reject null hypothesis of independence , the model is adequate ",pv_csrp1)
[1] "p value: 0.986003652074264 > 0.05. Do not reject null hypothesis of independence , the model is adequate "
Jan = rep(c(1, rep(0, 11)), 62)
m_csrp2 = arima(log_csrp,order=c(0,0,1), xreg=Jan)
tsdiag(m_csrp2,gof=24)
(ljunbgbox_csrp2 = Box.test(m_csrp2$resid , lag= 10 ,type="Ljung"))
Box-Ljung test
data: m_csrp2$resid
X-squared = 3.3443, df = 10, p-value = 0.9721
(pv_csrp2 = 1-pchisq(ljunbgbox_csrp2$statistic, 10 - 0))
X-squared
0.9721214
sprintf("p value: %s > 0.05. Do not reject null hypothesis of independence , the model is adequate",pv_csrp2)
[1] "p value: 0.972121378634896 > 0.05. Do not reject null hypothesis of independence , the model is adequate"
sprintf("AIC of a model is: %s, while b model is %s , model in part b has smaller AIC .Hence there is indeed some seasonality ", m_csrp1$aic , m_csrp2$aic)
[1] "AIC of a model is: -2030.36065312675, while b model is -2094.91694558133 , model in part b has smaller AIC .Hence there is indeed some seasonality "
at = rnorm(1000)
rt1 = rep(0,1000)
for (t in 3:1000) {
rt1[t]=0.5*rt1[t-1]+1+at[t]+2*at[t-2]
}
sprintf("rt1[t]=0.5*rt1[t-1]+1+at[t]+2*at[t-2] is a time series (ARMA(1,2)) model , and its value at time 1 and 2 is zero ")
[1] "rt1[t]=0.5*rt1[t-1]+1+at[t]+2*at[t-2] is a time series (ARMA(1,2)) model , and its value at time 1 and 2 is zero "
m_rt1 = arima(rt1,order=c(1,0,2))
m_rt1 # i find nothing
Call:
arima(x = rt1, order = c(1, 0, 2))
Coefficients:
ar1 ma1 ma2 intercept
0.524 0.0107 0.5230 1.7674
s.e. 0.040 0.0374 0.0325 0.2041
sigma^2 estimated as 4.028: log likelihood = -2116.17, aic = 4242.35
tsdiag(m_rt1,gof=24)
at = rnorm(100)
rt2 = rep(0,100)
for (t in 3:100){
rt2[t]=0.5*rt2[t-1]+1+at[t]+2*at[t-2]
}
(m_rt2 <- arima(rt2,order=c(1,0,2)))
Call:
arima(x = rt2, order = c(1, 0, 2))
Coefficients:
ar1 ma1 ma2 intercept
0.4119 -0.0258 0.5373 1.5509
s.e. 0.1281 0.1133 0.0999 0.5524
sigma^2 estimated as 4.74: log likelihood = -220.21, aic = 450.41
tsdiag(m_rt2,gof=24)
at = rnorm(10000)
rt3 = rep(0,10000)
for (t in 3:10000){
rt3[t]=0.5*rt3[t-1]+1+at[t]+2*at[t-2]
}
(m_rt3 <- arima(rt3,order=c(1,0,2)))
Call:
arima(x = rt3, order = c(1, 0, 2))
Coefficients:
ar1 ma1 ma2 intercept
0.5022 0.0030 0.5016 1.9895
s.e. 0.0130 0.0124 0.0096 0.0605
sigma^2 estimated as 4.001: log likelihood = -21123.25, aic = 42256.49
tsdiag(m_rt3,gof=24)
at = rnorm(1000)
rt1 = rep(0,1000)
for (t in 3:1000){
rt1[t]=0.5*rt1[t-1]+1+at[t]+2*at[t-2]
}
rt2 = rep(0,1000)
rt2[1] = 20
rt2[2] = 10
for (t in 3:1000){
rt2[t]=0.5*rt2[t-1]+1+at[t]+2*at[t-2]
}
sprintf("rt1[1000] = %s , rt2[1000] = %s ",rt1[1000],rt2[1000])
[1] "rt1[1000] = 1.56121886821331 , rt2[1000] = 1.56121886821331 "
gm=fread("/Users/aisling/Documents/daydayup/nus_mqf/Financial Time Series/homework/Homework/HW 2/d-gmsp9908.txt")
head(gm)
require(fUnitRoots)
载入需要的程辑包:fUnitRoots
log_gm=log(gm$sp+1)
adftest4 = adfTest(log_gm)
p-value smaller than printed p-value
sprintf("p value: %s < 0.05. Reject null hypothesis of non stationary",adftest4@test$p.value)
[1] "p value: 0.01 < 0.05. Reject null hypothesis of non stationary"
par(mfcol=c(2,1))
pacf(log_gm)
acf(log_gm)
auto.arima(log_gm)
Series: log_gm
ARIMA(1,0,5) with zero mean
Coefficients:
ar1 ma1 ma2 ma3 ma4 ma5
-0.9434 0.8693 -0.1694 -0.0506 -0.0039 -0.0737
s.e. 0.0233 0.0304 0.0264 0.0273 0.0264 0.0200
sigma^2 estimated as 0.0001752: log likelihood=7311.3
AIC=-14608.59 AICc=-14608.55 BIC=-14567.78
m_gm = arima(log_gm, c(1,0,5))
tsdiag(m_gm)
ljungbox_gm1 = Box.test(m_gm$resid , lag= 10 ,type="Ljung")
(pv_gm1 = 1-pchisq(ljungbox_gm1$statistic, 10 - 1))
X-squared
0.9186324
sprintf("p value: %s > 0.05. Do not reject null hypothesis of independence",pv_gm1)
[1] "p value: 0.918632387085003 > 0.05. Do not reject null hypothesis of independence"
require(aTSA)
载入需要的程辑包:aTSA
载入程辑包:‘aTSA’
The following object is masked from ‘package:forecast’:
forecast
The following object is masked from ‘package:graphics’:
identify
arch.test(arima(m_gm$residuals,c(1,0,5)))
ARCH heteroscedasticity test for residuals
alternative: heteroscedastic
Portmanteau-Q test:
order PQ p.value
[1,] 4 986 0
[2,] 8 2012 0
[3,] 12 3005 0
[4,] 16 3514 0
[5,] 20 4082 0
[6,] 24 4534 0
Lagrange-Multiplier test:
order LM p.value
[1,] 4 1275 0.00e+00
[2,] 8 427 0.00e+00
[3,] 12 255 0.00e+00
[4,] 16 178 0.00e+00
[5,] 20 137 0.00e+00
[6,] 24 108 6.03e-13
[Hint: First fit an ARMA model for the returns, and then check the residuals of the fitted model for ARCH effect.]
require(fGarch)
载入需要的程辑包:fGarch
m_gm_garch1=garchFit(~arma(1,5)+garch(1,1),data=log_gm,trace=F)
summary(m_gm_garch1)
Title:
GARCH Modelling
Call:
garchFit(formula = ~arma(1, 5) + garch(1, 1), data = log_gm,
trace = F)
Mean and Variance Equation:
data ~ arma(1, 5) + garch(1, 1)
<environment: 0x7fa48e7507c0>
[data = log_gm]
Conditional Distribution:
norm
Coefficient(s):
mu ar1 ma1 ma2 ma3 ma4 ma5 omega
1.8798e-04 3.2974e-01 -3.9134e-01 -1.9104e-02 1.1027e-03 -1.1260e-02 -4.8846e-02 1.0075e-06
alpha1 beta1
7.1139e-02 9.2362e-01
Std. Errors:
based on Hessian
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
mu 1.880e-04 1.297e-04 1.450 0.147160
ar1 3.297e-01 3.226e-01 1.022 0.306771
ma1 -3.913e-01 3.225e-01 -1.213 0.224947
ma2 -1.910e-02 3.042e-02 -0.628 0.530032
ma3 1.103e-03 2.590e-02 0.043 0.966041
ma4 -1.126e-02 2.270e-02 -0.496 0.619836
ma5 -4.885e-02 2.335e-02 -2.092 0.036432 *
omega 1.008e-06 2.937e-07 3.430 0.000604 ***
alpha1 7.114e-02 9.068e-03 7.845 4.44e-15 ***
beta1 9.236e-01 9.670e-03 95.513 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Log Likelihood:
7867.301 normalized: 3.128151
Description:
Fri Jul 26 22:37:20 2019 by user:
Standardised Residuals Tests:
Statistic p-Value
Jarque-Bera Test R Chi^2 250.0153 0
Shapiro-Wilk Test R W 0.9882654 1.583554e-13
Ljung-Box Test R Q(10) 2.693501 0.9877461
Ljung-Box Test R Q(15) 11.97112 0.6812141
Ljung-Box Test R Q(20) 17.75243 0.6037129
Ljung-Box Test R^2 Q(10) 14.36861 0.1568325
Ljung-Box Test R^2 Q(15) 17.8363 0.2713694
Ljung-Box Test R^2 Q(20) 19.5147 0.4886311
LM Arch Test R TR^2 15.10128 0.2359443
Information Criterion Statistics:
AIC BIC SIC HQIC
-6.248351 -6.225170 -6.248382 -6.239937
plot(m_gm_garch1)
Make a plot selection (or 0 to exit):
1: Time Series
2: Conditional SD
3: Series with 2 Conditional SD Superimposed
4: ACF of Observations
5: ACF of Squared Observations
6: Cross Correlation
7: Residuals
8: Conditional SDs
9: Standardized Residuals
10: ACF of Standardized Residuals
11: ACF of Squared Standardized Residuals
12: Cross Correlation between r^2 and r
13: QQ-Plot of Standardized Residuals
13
Make a plot selection (or 0 to exit):
1: Time Series
2: Conditional SD
3: Series with 2 Conditional SD Superimposed
4: ACF of Observations
5: ACF of Squared Observations
6: Cross Correlation
7: Residuals
8: Conditional SDs
9: Standardized Residuals
10: ACF of Standardized Residuals
11: ACF of Squared Standardized Residuals
12: Cross Correlation between r^2 and r
13: QQ-Plot of Standardized Residuals
0
m_gm_garch2=garchFit(~arma(1,5)+garch(1,1),data=log_gm,trace=F,cond.dist = 'std')
summary(m_gm_garch2)
Title:
GARCH Modelling
Call:
garchFit(formula = ~arma(1, 5) + garch(1, 1), data = log_gm,
cond.dist = "std", trace = F)
Mean and Variance Equation:
data ~ arma(1, 5) + garch(1, 1)
<environment: 0x7fa48dd1f688>
[data = log_gm]
Conditional Distribution:
std
Coefficient(s):
mu ar1 ma1 ma2 ma3 ma4 ma5
2.6512e-04 3.2689e-01 -3.9092e-01 -2.8491e-02 2.7998e-03 -1.1520e-02 -4.0589e-02
omega alpha1 beta1 shape
6.1675e-07 7.1623e-02 9.2747e-01 9.3629e+00
Std. Errors:
based on Hessian
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
mu 2.651e-04 1.521e-04 1.744 0.0812 .
ar1 3.269e-01 3.095e-01 1.056 0.2909
ma1 -3.909e-01 3.097e-01 -1.262 0.2069
ma2 -2.849e-02 3.013e-02 -0.946 0.3443
ma3 2.800e-03 2.700e-02 0.104 0.9174
ma4 -1.152e-02 2.244e-02 -0.513 0.6077
ma5 -4.059e-02 2.210e-02 -1.837 0.0663 .
omega 6.168e-07 2.879e-07 2.142 0.0322 *
alpha1 7.162e-02 1.034e-02 6.926 4.32e-12 ***
beta1 9.275e-01 1.029e-02 90.114 < 2e-16 ***
shape 9.363e+00 1.632e+00 5.737 9.64e-09 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Log Likelihood:
7896.908 normalized: 3.139924
Description:
Fri Jul 26 22:46:47 2019 by user:
Standardised Residuals Tests:
Statistic p-Value
Jarque-Bera Test R Chi^2 336.4595 0
Shapiro-Wilk Test R W 0.9868748 1.804912e-14
Ljung-Box Test R Q(10) 2.829662 0.9851532
Ljung-Box Test R Q(15) 11.49686 0.7166439
Ljung-Box Test R Q(20) 17.03243 0.6508669
Ljung-Box Test R^2 Q(10) 12.16103 0.274424
Ljung-Box Test R^2 Q(15) 15.84869 0.3921786
Ljung-Box Test R^2 Q(20) 17.26528 0.6356867
LM Arch Test R TR^2 12.88408 0.377522
Information Criterion Statistics:
AIC BIC SIC HQIC
-6.271100 -6.245600 -6.271138 -6.261845
plot(m_gm_garch2)
Make a plot selection (or 0 to exit):
1: Time Series
2: Conditional SD
3: Series with 2 Conditional SD Superimposed
4: ACF of Observations
5: ACF of Squared Observations
6: Cross Correlation
7: Residuals
8: Conditional SDs
9: Standardized Residuals
10: ACF of Standardized Residuals
11: ACF of Squared Standardized Residuals
12: Cross Correlation between r^2 and r
13: QQ-Plot of Standardized Residuals
13
Make a plot selection (or 0 to exit):
1: Time Series
2: Conditional SD
3: Series with 2 Conditional SD Superimposed
4: ACF of Observations
5: ACF of Squared Observations
6: Cross Correlation
7: Residuals
8: Conditional SDs
9: Standardized Residuals
10: ACF of Standardized Residuals
11: ACF of Squared Standardized Residuals
12: Cross Correlation between r^2 and r
13: QQ-Plot of Standardized Residuals
0
m_gm_garch3=garchFit(~arma(1,5)+garch(1,1),data=log_gm,trace=F,cond.dist = 'sstd')
summary(m_gm_garch3)
Title:
GARCH Modelling
Call:
garchFit(formula = ~arma(1, 5) + garch(1, 1), data = log_gm,
cond.dist = "sstd", trace = F)
Mean and Variance Equation:
data ~ arma(1, 5) + garch(1, 1)
<environment: 0x7fa48e7441d8>
[data = log_gm]
Conditional Distribution:
sstd
Coefficient(s):
mu ar1 ma1 ma2 ma3 ma4 ma5
1.8570e-04 2.9793e-01 -3.7254e-01 -4.2571e-02 2.4321e-03 -1.5038e-02 -4.8347e-02
omega alpha1 beta1 skew shape
6.4686e-07 7.2390e-02 9.2556e-01 8.8944e-01 1.0000e+01
Std. Errors:
based on Hessian
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
mu 1.857e-04 1.212e-04 1.532 0.1256
ar1 2.979e-01 3.043e-01 0.979 0.3276
ma1 -3.725e-01 3.045e-01 -1.223 0.2212
ma2 -4.257e-02 3.235e-02 -1.316 0.1882
ma3 2.432e-03 2.966e-02 0.082 0.9346
ma4 -1.504e-02 2.267e-02 -0.663 0.5071
ma5 -4.835e-02 2.332e-02 -2.073 0.0382 *
omega 6.469e-07 2.866e-07 2.257 0.0240 *
alpha1 7.239e-02 1.007e-02 7.186 6.67e-13 ***
beta1 9.256e-01 1.015e-02 91.189 < 2e-16 ***
skew 8.894e-01 2.492e-02 35.696 < 2e-16 ***
shape 1.000e+01 1.861e+00 5.372 7.77e-08 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Log Likelihood:
7905.746 normalized: 3.143438
Description:
Fri Jul 26 22:48:23 2019 by user:
Standardised Residuals Tests:
Statistic p-Value
Jarque-Bera Test R Chi^2 337.984 0
Shapiro-Wilk Test R W 0.986483 1.006707e-14
Ljung-Box Test R Q(10) 5.989618 0.8161347
Ljung-Box Test R Q(15) 15.06451 0.4467806
Ljung-Box Test R Q(20) 20.56417 0.4231719
Ljung-Box Test R^2 Q(10) 12.36954 0.2610858
Ljung-Box Test R^2 Q(15) 15.94966 0.385405
Ljung-Box Test R^2 Q(20) 17.52388 0.6187409
LM Arch Test R TR^2 13.03785 0.3662954
Information Criterion Statistics:
AIC BIC SIC HQIC
-6.277333 -6.249515 -6.277378 -6.267237
plot(m_gm_garch3)
Make a plot selection (or 0 to exit):
1: Time Series
2: Conditional SD
3: Series with 2 Conditional SD Superimposed
4: ACF of Observations
5: ACF of Squared Observations
6: Cross Correlation
7: Residuals
8: Conditional SDs
9: Standardized Residuals
10: ACF of Standardized Residuals
11: ACF of Squared Standardized Residuals
12: Cross Correlation between r^2 and r
13: QQ-Plot of Standardized Residuals
13
Make a plot selection (or 0 to exit):
1: Time Series
2: Conditional SD
3: Series with 2 Conditional SD Superimposed
4: ACF of Observations
5: ACF of Squared Observations
6: Cross Correlation
7: Residuals
8: Conditional SDs
9: Standardized Residuals
10: ACF of Standardized Residuals
11: ACF of Squared Standardized Residuals
12: Cross Correlation between r^2 and r
13: QQ-Plot of Standardized Residuals
0
sprintf("We should choose the model m_gm_garch3 according to the QQ plot .")
[1] "We should choose the model m_gm_garch3 according to the QQ plot ."
predict(m_gm_garch3,4)