Lastsave
Lastsave
Lastsave
Warning message:
package �tseries� was built under R version 3.2.5
> adf.test(data,alternative=c("stationary","explosive"),k=trunc((length(data)-
1)^(1/3)))
data: data
Dickey-Fuller = -1.6496, Lag order = 6, p-value = 0.7243
alternative hypothesis: stationary
> pp.test(data[[1]],alternative=c("stationary","explosive"),lshort=TRUE)
Error in embed(x, 2) : wrong embedding dimension
> pp.test(yen[[1]],alternative=c("stationary","explosive"),lshort=TRUE)
Error in NCOL(x) : object 'yen' not found
> pp.test(data[[1]],alternative=c("stationary","explosive"),lshort=TRUE)
Error in embed(x, 2) : wrong embedding dimension
> pp.test(yen[[1]],alternative=c("stationary","explosive"),lshort=TRUE)
Error in NCOL(x) : object 'yen' not found
> rtdata=diff(log(data),lag=1)
> rtdata
Jan Feb Mar Apr May
1990 0.038714512 0.152340725 0.032088315 -0.065240522
1991 -0.084557388 0.250224510 -0.183849441 -0.027908788 0.018692133
1992 -0.022989518 0.007722046 0.081225440 -0.120446153 0.015873349
1993 -0.006688988 0.013333531 0.038965969 -0.025807884 0.006514681
1994 0.011428696 0.039002158 -0.033336420 0.005633818 0.011173301
1995 -0.044016885 0.076961041 -0.057158414 -0.009852296 0.019608471
1996 -0.008510690 0.021142437 -0.016878038 0.008474627 0.004210533
1997 0.022728251 -0.015094626 -0.019194447 0.015384919 0.011385322
1998 0.087011377 -0.006430890 0.037979248 -0.015649772 -3.273995124
1999 0.287682072 0.810930216 0.693147181 -2.890371758 2.079441542
2000 -0.025975486 -0.026668247 0.077961541 0.024692613 0.024097552
2001 -0.133531393 0.040005335 -0.019802627 0.039220713 0.019048195
2002 -0.156569061 0.049596941 -0.066691374 0.082691716 -0.032260862
2003 -0.108213585 0.028170877 -0.013986242 0.054808236 0.026317308
2004 -0.066691374 -0.023256862 0.034685558 -0.022989518 0.056512210
2005 -0.034486176 0.025975486 -0.008583744 -0.035091320 0.077291674
2006 0.021202208 -0.035590945 0.007220248 0.021353124 0.068053463
2007 -0.035932009 0.012121361 -0.024391453 0.036367644 0.005934736
2008 -0.081262964 -0.021391190 0.016086138 0.015831465 0.015584731
2009 -0.068992871 -0.005115101 0.040206420 0.019512814 0.019139340
2010 -0.017316450 -0.026550232 0.013363228 0.004415018 0.021787354
2011 -0.003913899 -0.015810606 -0.008000043 0.004008021 0.027615167
2012 -0.018018506 -0.007299302 0.018149319 0.003590668 0.007142888
2013 -0.024014876 -0.003478264 0.013841051 0.006849342 -0.003418807
2014 -0.029952322 -0.006779687 0.010152371 0.023295563 0.009820046
2015 -0.019293203 0.009693129 0.025398191 0.003129893 0.003120127
2016 -0.125163143 -0.405465108 0.832909123 0.042559614 0.117783036
Jun Jul Aug Sep Oct
1990 0.155754529 -0.049271049 -0.030771659 0.040821995 -0.030459207
1991 0.096992266 -0.078643127 0.087011377 0.024692613 -0.008163311
1992 0.053652713 0.022141126 0.049832374 0.006920443 0.006872879
1993 0.025642431 0.006309169 0.049089610 0.023669744 0.005830920
1994 0.021978907 0.010810916 0.031748698 0.005194817 0.020513540
1995 0.042761859 0.009259325 0.013730193 0.009049836 0.035401927
1996 0.028987537 0.012170536 -0.004040410 0.024001152 -0.003960401
1997 0.044287680 -0.010889400 -0.037179003 0.015037877 0.014815086
1998 0.733969175 -0.274436846 -0.305381650 -1.029619417 4.168214411
1999 0.916290732 0.048790164 0.213574100 0.268263987 -0.060624622
2000 0.023530497 0.045462374 0.021978907 -0.044451763 0.065957968
2001 0.018692133 0.018349139 0.087011377 -0.051293294 0.115831816
2002 0.093818755 -0.015037877 0.029852963 0.084557388 -0.013605652
2003 0.038221213 0.024692613 0.012121361 0.011976191 0.068992871
2004 0.074107972 0.049761510 0.019231362 0.018868484 0.054558984
2005 0.056239718 -0.015748357 0.076372979 -0.022305758 0.100083459
2006 0.025975486 -0.006430890 0.031748698 0.006230550 0.024541109
2007 0.034887259 0.022599832 0.011111225 0.005509656 0.027101930
2008 0.069679921 -0.034233172 -0.015037877 0.096228032 -0.027908788
2009 0.037213596 -0.023095715 0.045670037 0.004454350 -0.017937701
2010 0.038059562 -0.004158010 0.012422520 -0.004123717 0.008230499
2011 0.007751977 0.003853569 0.034029749 -0.011215071 0.014925650
2012 0.014134511 -0.010582109 0.003539827 0.020979790 -0.017452450
2013 0.027028672 0.009950331 -0.016639319 0.010016778 -0.006666691
2014 0.025724891 -0.019231362 -0.009756175 0.032157112 -0.009539023
2015 -3.206491766 -0.619039208 -0.154150680 1.299282984 -0.693147181
2016 0.287682072 -0.149531734 -0.066691374 -0.035091320 0.068992871
Nov Dec
1990 0.040409538 0.094409684
1991 0.016260521 0.062520357
1992 0.013605652 0.013423020
1993 0.005797118 0.005763705
1994 0.010101096 0.049029427
1995 0.004338402 0.021414095
1996 0.007905180 0.027186140
1997 0.014598799 0.035590945
1998 -5.084505143 0.405465108
1999 0.030771659 0.167054085
2000 0.021053409 0.154150680
2001 0.015504187 0.059719235
2002 0.103989714 -0.037740328
2003 0.043485112 -0.010695289
2004 0.017544310 0.025752496
2005 -0.085157808 0.036367644
2006 -0.012195273 0.042048236
2007 0.015915455 0.075985907
2008 0.004705891 -0.014184635
2009 0.031182927 0.021692825
2010 0.008163311 0.039845909
2011 0.003696862 0.032670782
2012 0.020906685 0.017094433
2013 0.009983444 0.009884759
2014 0.015848192 -0.012658397
2015 0.374693449 0.060624622
2016 0.154150680
> adf.test(rtdata,alternative=c("stationary","explosive"),k=trunc((length(rtdata)-
1)^(1/3)))
data: rtdata
Dickey-Fuller = -6.8942, Lag order = 6, p-value = 0.01
alternative hypothesis: stationary
Warning message:
In adf.test(rtdata, alternative = c("stationary", "explosive"), :
p-value smaller than printed p-value
> plot(acf(rtdata,maxlag=10),alpha=0.05)
There were 12 warnings (use warnings() to see them)
> plot(pacf(rtihsg,maxlag=10),alpha=0.05
+
+ > plot(pacf(rtdata,maxlag=10),alpha=0.05)
There were 12 warnings (use warnings() to see them)
> summary(arma(rtdata,order=c(1,0)))
Call:
arma(x = rtdata, order = c(1, 0))
Model:
ARMA(1,0)
Residuals:
Min 1Q Median 3Q Max
-3.39726 -0.00119 0.02070 0.04381 3.75603
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.403905 0.050988 -7.922 2.44e-15 ***
intercept -0.003683 0.026296 -0.140 0.889
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2233, Conditional Sum-of-Squares = 71.47, AIC = 435.11
> summary(arma10<-
arma(rtdata,order=c(1,0),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(1, 0), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(1,0)
Residuals:
Min 1Q Median 3Q Max
-3.400950 -0.004873 0.017020 0.040130 3.752348
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.40390 0.05099 -7.921 2.44e-15 ***
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2233, Conditional Sum-of-Squares = 71.48, AIC = 433.11
Warning message:
In optim(coef, err, gr = NULL, hessian = TRUE, ...) :
one-dimensional optimization by Nelder-Mead is unreliable:
use "Brent" or optimize() directly
> summary(arma(rtihsg,order=c(2,0)))
Error in NCOL(x) : object 'rtihsg' not found
> summary(arma(rtdata,order=c(2,0)))
Call:
arma(x = rtdata, order = c(2, 0))
Model:
ARMA(2,0)
Residuals:
Min 1Q Median 3Q Max
-3.2908082 0.0007378 0.0231899 0.0497061 3.6414934
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.468761 0.055009 -8.522 < 2e-16 ***
ar2 -0.160336 0.055010 -2.915 0.00356 **
intercept -0.004888 0.025992 -0.188 0.85084
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2182, Conditional Sum-of-Squares = 69.61, AIC = 429.6
> summary(arma10<-
arma(rtdata,order=c(2,0),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(2, 0), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(2,0)
Residuals:
Min 1Q Median 3Q Max
-3.295840 -0.004149 0.018303 0.044817 3.636652
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.46872 0.05501 -8.521 < 2e-16 ***
ar2 -0.16032 0.05501 -2.914 0.00357 **
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2182, Conditional Sum-of-Squares = 69.61, AIC = 427.6
> summary(arma(rtdata,order=c(3,0)))
Call:
arma(x = rtdata, order = c(3, 0))
Model:
ARMA(3,0)
Residuals:
Min 1Q Median 3Q Max
-3.303011 0.004436 0.027001 0.051273 3.572749
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.488151 0.055339 -8.821 < 2e-16 ***
ar2 -0.216340 0.060465 -3.578 0.000346 ***
ar3 -0.119144 0.055329 -2.153 0.031289 *
intercept -0.005908 0.025847 -0.229 0.819206
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2157, Conditional Sum-of-Squares = 68.6, AIC = 427.95
> summary(arma10<-
arma(rtdata,order=c(3,0),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(3, 0), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(3,0)
Residuals:
Min 1Q Median 3Q Max
-3.309306 -0.001477 0.021115 0.045344 3.567150
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.48798 0.05534 -8.818 < 2e-16 ***
ar2 -0.21609 0.06046 -3.574 0.000352 ***
ar3 -0.11894 0.05533 -2.150 0.031584 *
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2157, Conditional Sum-of-Squares = 68.62, AIC = 425.95
> summary(arma(rtdata,order=c(0,1)))
Call:
arma(x = rtdata, order = c(0, 1))
Model:
ARMA(0,1)
Residuals:
Min 1Q Median 3Q Max
-3.43696 0.00416 0.02705 0.05233 3.57401
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ma1 -0.460148 0.045995 -10.004 <2e-16 ***
intercept -0.002972 0.014010 -0.212 0.832
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2165, Conditional Sum-of-Squares = 69.3, AIC = 425.16
> summary(arma10<-
arma(rtdata,order=c(0,1),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(0, 1), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(0,1)
Residuals:
Min 1Q Median 3Q Max
-3.442860 -0.001344 0.021540 0.046823 3.568792
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ma1 -0.46000 0.04598 -10 <2e-16 ***
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2166, Conditional Sum-of-Squares = 69.31, AIC = 423.16
Warning message:
In optim(coef, err, gr = NULL, hessian = TRUE, ...) :
one-dimensional optimization by Nelder-Mead is unreliable:
use "Brent" or optimize() directly
> summary(arma(rtdata,order=c(0,2)))
Call:
arma(x = rtdata, order = c(0, 2))
Model:
ARMA(0,2)
Residuals:
Min 1Q Median 3Q Max
-3.277472 0.003516 0.026819 0.051419 3.584619
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ma1 -0.486829 0.057186 -8.513 <2e-16 ***
ma2 0.046709 0.054498 0.857 0.391
intercept -0.003288 0.014526 -0.226 0.821
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2166, Conditional Sum-of-Squares = 69.1, AIC = 427.26
> summary(arma10<-
arma(rtdata,order=c(0,2),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(0, 2), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(0,2)
Residuals:
Min 1Q Median 3Q Max
-3.283603 -0.002373 0.020933 0.045538 3.579373
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ma1 -0.48661 0.05720 -8.508 <2e-16 ***
ma2 0.04691 0.05449 0.861 0.389
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2166, Conditional Sum-of-Squares = 69.11, AIC = 425.26
> summary(arma(rtdata,order=c(1,1)))
Call:
arma(x = rtdata, order = c(1, 1))
Model:
ARMA(1,1)
Residuals:
Min 1Q Median 3Q Max
-3.301266 0.003446 0.026250 0.050844 3.580620
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.087366 0.108630 -0.804 0.421
ma1 -0.395436 0.097318 -4.063 4.84e-05 ***
intercept -0.003172 0.015668 -0.202 0.840
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2161, Conditional Sum-of-Squares = 69.16, AIC = 426.52
> summary(arma10<-
arma(rtdata,order=c(1,1),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(1, 1), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(1,1)
Residuals:
Min 1Q Median 3Q Max
-3.306320 -0.001814 0.020990 0.045593 3.575712
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.08785 0.10862 -0.809 0.419
ma1 -0.39489 0.09734 -4.057 4.98e-05 ***
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2161, Conditional Sum-of-Squares = 69.17, AIC = 424.53
> summary(arma(rtdata,order=c(1,2)))
Call:
arma(x = rtdata, order = c(1, 2))
Model:
ARMA(1,2)
Residuals:
Min 1Q Median 3Q Max
-3.308272 0.003899 0.026632 0.051991 3.560891
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.619811 0.456695 -1.357 0.175
ma1 0.140352 0.464153 0.302 0.762
ma2 -0.248765 0.222859 -1.116 0.264
intercept -0.004982 0.023142 -0.215 0.830
Fit:
sigma^2 estimated as 0.2167, Conditional Sum-of-Squares = 69.12, AIC = 429.33
> summary(arma10<-
arma(rtdata,order=c(1,2),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(1, 2), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(1,2)
Residuals:
Min 1Q Median 3Q Max
-3.314389 -0.001696 0.021038 0.046393 3.555625
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.6214 0.4528 -1.372 0.170
ma1 0.1422 0.4604 0.309 0.757
ma2 -0.2493 0.2212 -1.127 0.260
Fit:
sigma^2 estimated as 0.2167, Conditional Sum-of-Squares = 69.13, AIC = 427.33
> summary(arma(rtdata,order=c(1,3)))
Call:
arma(x = rtdata, order = c(1, 3))
Model:
ARMA(1,3)
Residuals:
Min 1Q Median 3Q Max
-3.277142 0.004191 0.027545 0.051876 3.566380
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.701841 0.470492 -1.492 0.136
ma1 0.217088 0.471039 0.461 0.645
ma2 -0.287886 0.236819 -1.216 0.224
ma3 0.016642 0.068832 0.242 0.809
intercept -0.005744 0.024605 -0.233 0.815
Fit:
sigma^2 estimated as 0.2172, Conditional Sum-of-Squares = 69.07, AIC = 432.13
> summary(arma10<-
arma(rtdata,order=c(1,3),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(1, 3), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(1,3)
Residuals:
Min 1Q Median 3Q Max
-3.284146 -0.001885 0.021443 0.045789 3.561243
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.70342 0.47108 -1.493 0.135
ma1 0.21905 0.47150 0.465 0.642
ma2 -0.28841 0.23706 -1.217 0.224
ma3 0.01695 0.06904 0.246 0.806
Fit:
sigma^2 estimated as 0.2172, Conditional Sum-of-Squares = 69.08, AIC = 430.13
> summary(arma(rtdata,order=c(2,1)))
Call:
arma(x = rtdata, order = c(2, 1))
Model:
ARMA(2,1)
Residuals:
Min 1Q Median 3Q Max
-3.297819 0.003695 0.026910 0.051320 3.587174
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.15202 0.19906 -0.764 0.4450
ar2 -0.04138 0.10353 -0.400 0.6894
ma1 -0.33225 0.19266 -1.725 0.0846 .
intercept -0.00380 0.01733 -0.219 0.8265
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2166, Conditional Sum-of-Squares = 69.09, AIC = 429.21
> summary(arma10<-
arma(rtdata,order=c(2,1),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(2, 1), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(2,1)
Residuals:
Min 1Q Median 3Q Max
-3.303884 -0.002009 0.021202 0.045624 3.581933
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.15250 0.19909 -0.766 0.4437
ar2 -0.04148 0.10350 -0.401 0.6886
ma1 -0.33157 0.19270 -1.721 0.0853 .
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2166, Conditional Sum-of-Squares = 69.1, AIC = 427.21
> summary(arma(rtdata,order=c(2,2)))
Call:
arma(x = rtdata, order = c(2, 2))
Model:
ARMA(2,2)
Residuals:
Min 1Q Median 3Q Max
-3.296740 0.003808 0.026695 0.051757 3.564450
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.652577 0.531856 -1.227 0.220
ar2 -0.015122 0.113709 -0.133 0.894
ma1 0.170924 0.529960 0.323 0.747
ma2 -0.249171 0.224488 -1.110 0.267
intercept -0.005106 0.023934 -0.213 0.831
Fit:
sigma^2 estimated as 0.2167, Conditional Sum-of-Squares = 69.11, AIC = 431.31
> summary(arma10<-
arma(rtdata,order=c(2,2),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(2, 2), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(2,2)
Residuals:
Min 1Q Median 3Q Max
-3.302271 -0.001735 0.021154 0.046204 3.559284
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.65546 0.52924 -1.238 0.216
ar2 -0.01566 0.11399 -0.137 0.891
ma1 0.17394 0.52730 0.330 0.741
ma2 -0.24978 0.22261 -1.122 0.262
Fit:
sigma^2 estimated as 0.2167, Conditional Sum-of-Squares = 69.12, AIC = 429.31
> summary(arma(rtdata,order=c(3,1)))
Call:
arma(x = rtdata, order = c(3, 1))
Model:
ARMA(3,1)
Residuals:
Min 1Q Median 3Q Max
-3.295188 0.003894 0.026524 0.050595 3.544757
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.700930 0.285381 -2.456 0.0140 *
ar2 -0.317372 0.143722 -2.208 0.0272 *
ar3 -0.156385 0.066403 -2.355 0.0185 *
ma1 0.215729 0.285821 0.755 0.4504
intercept -0.006929 0.031406 -0.221 0.8254
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2154, Conditional Sum-of-Squares = 68.5, AIC = 429.45
> summary(arma10<-
arma(rtdata,order=c(3,1),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(3, 1), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(3,1)
Residuals:
Min 1Q Median 3Q Max
-3.300708 -0.001806 0.020827 0.044897 3.539078
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.7009 0.2853 -2.457 0.0140 *
ar2 -0.3173 0.1437 -2.207 0.0273 *
ar3 -0.1564 0.0664 -2.355 0.0185 *
ma1 0.2157 0.2857 0.755 0.4503
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2154, Conditional Sum-of-Squares = 68.51, AIC = 427.45
> summary(arma(rtdata,order=c(3,2)))
Call:
arma(x = rtdata, order = c(3, 2))
Model:
ARMA(3,2)
Residuals:
Min 1Q Median 3Q Max
-3.52018 -0.00219 0.02022 0.04670 3.56512
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.749235 0.168037 -4.459 8.24e-06 ***
ar2 -0.927079 0.161111 -5.754 8.70e-09 ***
ar3 -0.387428 0.075776 -5.113 3.17e-07 ***
ma1 0.289344 0.176264 1.642 0.101
ma2 0.652193 0.156275 4.173 3.00e-05 ***
intercept -0.008006 0.049588 -0.161 0.872
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.213, Conditional Sum-of-Squares = 67.74, AIC = 427.86
> summary(arma10<-
arma(rtdata,order=c(3,2),lag=NULL,coef=NULL,include.intercept=FALSE))
Call:
arma(x = rtdata, order = c(3, 2), lag = NULL, coef = NULL, include.intercept =
FALSE)
Model:
ARMA(3,2)
Residuals:
Min 1Q Median 3Q Max
-3.535762 -0.005879 0.016123 0.043762 3.563130
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
ar1 -0.79576 0.15351 -5.184 2.18e-07 ***
ar2 -0.95219 0.15179 -6.273 3.54e-10 ***
ar3 -0.39857 0.07054 -5.650 1.60e-08 ***
ma1 0.34063 0.16294 2.090 0.0366 *
ma2 0.66507 0.15162 4.387 1.15e-05 ***
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Fit:
sigma^2 estimated as 0.2129, Conditional Sum-of-Squares = 67.72, AIC = 425.75
> res1=resid(arma(rt,order=c(0,1)))
Error in ts(x) : object is not a matrix
> res1=resid(arma(rt,order=c(3,0)))res1=resid(arma(rt,order=c(3,0)))
Error: unexpected symbol in "res1=resid(arma(rt,order=c(3,0)))res1"
> res1=resid(arma(rtdata,order=c(0,1)))
> ks.test(res1,ecdf(res1))
data: res1
D = 0.0031153, p-value = 1
alternative hypothesis: two-sided
> Box.test(res1,lag=1,type=c("Box-Pierce","Ljung-Box"),fitdf=0)
Box-Pierce test
data: res1
X-squared = 0.16358, df = 1, p-value = 0.6859
> ArchTest(res1,lags=12,demean=FALSE)
Error: could not find function "ArchTest"
> local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
> local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Warning message:
package �nlme� was built under R version 3.2.5
> utils:::menuInstallPkgs()
also installing the dependencies �gss�, �stabledist�, �timeDate�, �timeSeries�,
�fBasics�
time<-
Warning messages:
1: package �FinTS� was built under R version 3.2.5
2: package �zoo� was built under R version 3.2.5
> ArchTest(res1,lags=12,demean=FALSE)
data: res1
Chi-squared = 109.81, df = 12, p-value < 2.2e-16
>
arch1=garchFit(~garch(1,0),data=rt,include.mean=F,trace=F,algoritm="lbfgsb+nm",cond
.dist="QMLE")
Error in as.data.frame.default(data) :
cannot coerce class ""function"" to a data.frame
> summary(arch1)
Error in summary(arch1) : object 'arch1' not found
>
arch1=garchFit(~garch(1,0),data=rt,include.mean=F,trace=F,algoritm="lbfgsb+nm",cond
.dist="QMLE")
Error in as.data.frame.default(data) :
cannot coerce class ""function"" to a data.frame
>
arch1=garchFit(~garch(1,0),data=rtdata,include.mean=F,trace=F,algoritm="lbfgsb+nm",
cond.dist="QMLE")
> summary(arch1)
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(1, 0), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algoritm = "lbfgsb+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1
0.080009 1.000000
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 0.08001 0.05254 1.523 0.1278
alpha1 1.00000 0.41070 2.435 0.0149 *
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-91.85773 normalized: -0.2852725
Description:
Mon Jan 16 14:30:03 2017 by user: aLf
>
arch1=garchFit(~garch(2,0),data=rtdata,include.mean=F,trace=F,algoritm="lbfgsb+nm",
cond.dist="QMLE")
>
arch2=garchFit(~garch(2,0),data=rtdata,include.mean=F,trace=F,algoritm="lbfgsb+nm",
cond.dist="QMLE")
> summary(arch2)
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(2, 0), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algoritm = "lbfgsb+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 alpha2
0.08014609 0.99999999 0.00000001
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 8.015e-02 5.240e-02 1.529 0.1262
alpha1 1.000e+00 4.149e-01 2.410 0.0159 *
alpha2 1.000e-08 2.746e-02 0.000 1.0000
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-92.47055 normalized: -0.2871756
Description:
Mon Jan 16 14:33:41 2017 by user: aLf
>
arch3=garchFit(~garch(3,0),data=rtdata,include.mean=F,trace=F,algoritm="lbfgsb+nm",
cond.dist="QMLE")
> summary(arch3)
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(3, 0), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algoritm = "lbfgsb+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 alpha2 alpha3
0.07678795 0.99999999 0.00000001 0.02951389
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 7.679e-02 5.158e-02 1.489 0.1366
alpha1 1.000e+00 4.156e-01 2.406 0.0161 *
alpha2 1.000e-08 2.954e-02 0.000 1.0000
alpha3 2.951e-02 2.088e-02 1.413 0.1575
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-88.14863 normalized: -0.2737535
Description:
Mon Jan 16 14:37:27 2017 by user: aLf
> arch4=garchFit(~garch(4,0),data=rtdata,include.mean=F,trace=F,algoritm="lbfgsb
+ +nm",cond.dist="QMLE")
> summary(arch4)
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(4, 0), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algoritm = "lbfgsb\n+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 alpha2 alpha3 alpha4
0.07656157 0.99999999 0.00000001 0.02797250 0.01417058
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 7.656e-02 5.155e-02 1.485 0.1375
alpha1 1.000e+00 4.489e-01 2.228 0.0259 *
alpha2 1.000e-08 2.970e-02 0.000 1.0000
alpha3 2.797e-02 2.017e-02 1.387 0.1655
alpha4 1.417e-02 1.809e-02 0.783 0.4335
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-88.41471 normalized: -0.2745798
Description:
Mon Jan 16 14:40:47 2017 by user: aLf
> arch5=garchFit(~garch(5,0),data=rtdata,include.mean=F,trace=F,algoritm="lbfgsb
+ +nm",cond.dist="QMLE")
> summary(arch5)
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(5, 0), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algoritm = "lbfgsb\n+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 alpha2 alpha3 alpha4 alpha5
0.07510955 0.21654451 0.00000001 0.02752411 0.02412043 0.16813195
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 7.511e-02 5.071e-02 1.481 0.1386
alpha1 2.165e-01 1.057e-01 2.049 0.0405 *
alpha2 1.000e-08 1.700e-02 0.000 1.0000
alpha3 2.752e-02 2.029e-02 1.357 0.1749
alpha4 2.412e-02 1.715e-02 1.406 0.1596
alpha5 1.681e-01 1.044e-01 1.611 0.1073
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-78.13378 normalized: -0.2426515
Description:
Mon Jan 16 14:42:01 2017 by user: aLf
> arch6=garchFit(~garch(6,0),data=rtdata,include.mean=F,trace=F,algoritm="lbfgsb
+ +nm",cond.dist="QMLE")
> summary(arch6)
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(6, 0), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algoritm = "lbfgsb\n+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 alpha2 alpha3 alpha4 alpha5
0.07523959 0.21298738 0.00000001 0.02722244 0.02380833 0.16500655
alpha6
0.00000001
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 7.524e-02 5.075e-02 1.482 0.1382
alpha1 2.130e-01 1.012e-01 2.105 0.0353 *
alpha2 1.000e-08 1.698e-02 0.000 1.0000
alpha3 2.722e-02 1.986e-02 1.371 0.1705
alpha4 2.381e-02 1.690e-02 1.409 0.1589
alpha5 1.650e-01 1.003e-01 1.645 0.0999 .
alpha6 1.000e-08 3.024e-02 0.000 1.0000
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-78.54997 normalized: -0.243944
Description:
Mon Jan 16 14:43:21 2017 by user: aLf
> arch7=garchFit(~garch(7,0),data=rtdata,include.mean=F,trace=F,algoritm="lbfgsb
+ +nm",cond.dist="QMLE")
> summary(arch7)
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(7, 0), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algoritm = "lbfgsb\n+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 alpha2 alpha3 alpha4 alpha5
0.07537630 0.20848122 0.00000001 0.02693385 0.02345315 0.16274050
alpha6 alpha7
0.00000001 0.00000001
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 7.538e-02 5.066e-02 1.488 0.1368
alpha1 2.085e-01 9.890e-02 2.108 0.0350 *
alpha2 1.000e-08 1.694e-02 0.000 1.0000
alpha3 2.693e-02 1.968e-02 1.369 0.1711
alpha4 2.345e-02 1.655e-02 1.417 0.1563
alpha5 1.627e-01 9.727e-02 1.673 0.0943 .
alpha6 1.000e-08 3.063e-02 0.000 1.0000
alpha7 1.000e-08 1.621e-02 0.000 1.0000
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-78.97554 normalized: -0.2452657
Description:
Mon Jan 16 14:44:43 2017 by user: aLf
> arch8=garchFit(~garch(8,0),data=rtdata,include.mean=F,trace=F,algoritm="lbfgsb
+ +nm",cond.dist="QMLE")
> summary(arch8)
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(8, 0), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algoritm = "lbfgsb\n+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 alpha2 alpha3 alpha4 alpha5
0.07551979 0.20427566 0.00000001 0.02668887 0.02310943 0.15991594
alpha6 alpha7 alpha8
0.00000001 0.00000001 0.00000001
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 7.552e-02 5.060e-02 1.492 0.1356
alpha1 2.043e-01 9.626e-02 2.122 0.0338 *
alpha2 1.000e-08 1.658e-02 0.000 1.0000
alpha3 2.669e-02 1.942e-02 1.374 0.1694
alpha4 2.311e-02 1.621e-02 1.426 0.1539
alpha5 1.599e-01 9.509e-02 1.682 0.0926 .
alpha6 1.000e-08 3.082e-02 0.000 1.0000
alpha7 1.000e-08 1.564e-02 0.000 1.0000
alpha8 1.000e-08 1.458e-02 0.000 1.0000
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-79.41365 normalized: -0.2466263
Description:
Mon Jan 16 14:45:47 2017 by user: aLf
1 1.995395e-01 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
Model:
GARCH(0,5)
Residuals:
Min 1Q Median 3Q Max
-11.91044 -0.04444 0.04864 0.12598 3.43114
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
a0 7.512e-02 7.997e-04 93.931 < 2e-16 ***
a1 1.273e-01 2.623e-02 4.853 1.21e-06 ***
a2 1.978e-15 2.435e-02 0.000 1.000
a3 3.250e-02 2.383e-02 1.364 0.173
a4 3.493e-02 5.663e-02 0.617 0.537
a5 1.161e-01 2.504e-02 4.637 3.53e-06 ***
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Diagnostic Tests:
Jarque Bera Test
data: Residuals
X-squared = 160200, df = 2, p-value < 2.2e-16
Box-Ljung test
data: Squared.Residuals
X-squared = 0.001349, df = 1, p-value = 0.9707
> residu=resid(arch5)
> resku=residu^2
> ks.test(residu,ecdf(residu))
data: residu
D = 0.0031546, p-value = 1
alternative hypothesis: two-sided
Box-Pierce test
data: residu
X-squared = 1.6411, df = 1, p-value = 0.2002
data: residu
Chi-squared = 0.83321, df = 12, p-value = 1
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(1, 1), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algorithm = "lbfgsb+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 beta1
0.06893 1.32756 0.10258
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 0.06893 0.04937 1.396 0.1626
alpha1 1.32756 0.70244 1.890 0.0588 .
beta1 0.10258 0.10195 1.006 0.3143
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-88.96179 normalized: -0.2762789
Description:
Mon Jan 16 15:09:17 2017 by user: aLf
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(1, 2), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algorithm = "lbfgsb+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 beta1 beta2
5.6624e-02 5.5650e-01 1.0093e-08 2.5966e-01
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 5.662e-02 3.878e-02 1.460 0.1443
alpha1 5.565e-01 3.626e-01 1.535 0.1249
beta1 1.009e-08 5.037e-02 0.000 1.0000
beta2 2.597e-01 1.186e-01 2.189 0.0286 *
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-86.28706 normalized: -0.2679722
Description:
Mon Jan 16 15:12:39 2017 by user: aLf
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(2, 1), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algorithm = "lbfgsb+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 alpha2 beta1
6.8882e-02 1.2957e+00 9.3876e-09 1.0482e-01
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 6.888e-02 5.230e-02 1.317 0.1878
alpha1 1.296e+00 7.029e-01 1.843 0.0653 .
alpha2 9.388e-09 3.982e-01 0.000 1.0000
beta1 1.048e-01 1.697e-01 0.618 0.5368
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-89.70962 normalized: -0.2786013
Description:
Mon Jan 16 15:13:03 2017 by user: aLf
Title:
GARCH Modelling
Call:
garchFit(formula = ~garch(2, 2), data = rtdata, cond.dist = "QMLE",
include.mean = F, trace = F, algorithm = "lbfgsb+nm")
Conditional Distribution:
QMLE
Coefficient(s):
omega alpha1 alpha2 beta1 beta2
0.071312 1.009071 -0.076328 0.035137 0.051812
Std. Errors:
robust
Error Analysis:
Estimate Std. Error t value Pr(>|t|)
omega 0.07131 0.05617 1.270 0.204
alpha1 1.00907 0.20946 4.818 1.45e-06 ***
alpha2 -0.07633 0.13212 -0.578 0.563
beta1 0.03514 0.14420 0.244 0.807
beta2 0.05181 0.03306 1.567 0.117
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Log Likelihood:
-84.70247 normalized: -0.2630511
Description:
Mon Jan 16 15:13:40 2017 by user: aLf
1 2.128421e-01 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
Call:
garch(x = rtdata, order = c(2, 2))
Model:
GARCH(2,2)
Residuals:
Min 1Q Median 3Q Max
-11.80172 -0.04437 0.04648 0.12335 4.63464
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
a0 4.606e-02 1.749e-02 2.634 0.00845 **
a1 3.265e-01 1.393e-01 2.344 0.01906 *
a2 1.291e-15 1.633e-01 0.000 1.00000
b1 8.690e-02 3.346e-01 0.260 0.79512
b2 3.122e-01 1.676e-01 1.863 0.06246 .
---
Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
Diagnostic Tests:
Jarque Bera Test
data: Residuals
X-squared = 166580, df = 2, p-value < 2.2e-16
Box-Ljung test
data: Squared.Residuals
X-squared = 0.0034925, df = 1, p-value = 0.9529
> res2=resid(garch22)
> resku2=res2^2
> ks.test(res2,ecdf(res2))
data: res2
D = 0.003125, p-value = 1
alternative hypothesis: two-sided
Box-Pierce test
data: residu
X-squared = 1.6411, df = 1, p-value = 0.2002
Box-Pierce test
data: res2
X-squared = 2.0026, df = 1, p-value = 0.157
data: res2
Chi-squared = 1.8244, df = 12, p-value = 0.9996
>