[R-SIG-Finance] ugarchfit: Weighted Ljung-Box Test

Jaimie Villanueva jaimie.villanueva at gmail.com
Tue Mar 24 19:29:32 CET 2015


Dear R users

I recently moved to the latest version of rugarch package (rugarch_1.3-4)
and i notice that the Ljung Box test on the standarized residuals
(squared standarized residuals too) is newer shown up. There is always
appearing "NA" simbols. I don't really understand why.I tried to find it
out by myself but without success.

Is there anyone who can help me out with this?

Here is a little reproducible example along with session info:

*spec = ugarchspec()*
*data(sp500ret)*
*fit = ugarchfit(spec = spec, data = sp500ret)*
*show(fit)*


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

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

Optimal Parameters
------------------------------------
        Estimate  Std. Error  t value Pr(>|t|)
mu      0.000523    0.000087   5.9907   0.0000
ar1     0.870134    0.072199  12.0518   0.0000
ma1    -0.897344    0.064634 -13.8834   0.0000
omega   0.000001    0.000001   1.3970   0.1624
alpha1  0.087715    0.013659   6.4219   0.0000
beta1   0.904935    0.013705  66.0292   0.0000

Robust Standard Errors:
        Estimate  Std. Error    t value Pr(>|t|)
mu      0.000523    0.000129   4.038024 0.000054
ar1     0.870134    0.088227   9.862425 0.000000
ma1    -0.897344    0.080389 -11.162576 0.000000
omega   0.000001    0.000014   0.094157 0.924984
alpha1  0.087715    0.185058   0.473985 0.635511
beta1   0.904935    0.190563   4.748733 0.000002

LogLikelihood : 17902.41

Information Criteria
------------------------------------

Akaike       -6.4807
Bayes        -6.4735
Shibata      -6.4807
Hannan-Quinn -6.4782

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

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

Weighted ARCH LM Tests
------------------------------------
            Statistic Shape Scale P-Value
ARCH Lag[3]        NA 0.500 2.000      NA
ARCH Lag[5]        NA 1.440 1.667      NA
ARCH Lag[7]        NA 2.315 1.543      NA

Nyblom stability test
------------------------------------
Joint Statistic:  174.2204
Individual Statistics:
mu      0.2060
ar1     0.1477
ma1     0.1047
omega  21.3472
alpha1  0.1346
beta1   0.1134

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.4296 6.675e-01
Negative Sign Bias  2.9492 3.199e-03 ***
Positive Sign Bias  2.3921 1.678e-02  **
Joint Effect       28.9841 2.257e-06 ***


Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
  group statistic p-value(g-1)
1    20     178.6    5.738e-28
2    30     188.1    3.136e-25
3    40     217.8    1.084e-26
4    50     227.9    7.064e-25


Elapsed time : 1.343655


*sessionInfo()*

R version 3.1.3 (2015-03-09)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows XP (build 2600) Service Pack 3

locale:
[1] LC_COLLATE=Spanish_Spain.1252
[2] LC_CTYPE=Spanish_Spain.1252
[3] LC_MONETARY=Spanish_Spain.1252
[4] LC_NUMERIC=C
[5] LC_TIME=Spanish_Spain.1252

attached base packages:
[1] parallel  stats     graphics  grDevices utils
[6] datasets  methods   base

other attached packages:
 [1] nortest_1.0-3      ggplot2_1.0.1
 [3] fUnitRoots_3010.78 urca_1.2-8
 [5] fGarch_3010.82     fBasics_3011.87
 [7] rugarch_1.3-4      FinTS_0.4-5
 [9] TSA_1.01           mgcv_1.8-5
[11] nlme_3.1-120       locfit_1.5-9.1
[13] leaps_2.9          MASS_7.3-39
[15] timeSeries_3012.99 timeDate_3012.100
[17] tseries_0.10-34    zoo_1.7-12
[19] quadprog_1.5-5     RODBC_1.3-11

loaded via a namespace (and not attached):
 [1] colorspace_1.2-6
 [2] digest_0.6.8
 [3] DistributionUtils_0.5-1
 [4] expm_0.99-1.1
 [5] GeneralizedHyperbolic_0.8-1
 [6] grid_3.1.3
 [7] gtable_0.1.2
 [8] KernSmooth_2.23-14
 [9] ks_1.9.4
[10] labeling_0.3
[11] lattice_0.20-30
[12] Matrix_1.1-5
[13] misc3d_0.8-4
[14] munsell_0.4.2
[15] mvtnorm_1.0-2
[16] nloptr_1.0.4
[17] numDeriv_2012.9-1
[18] plyr_1.8.1
[19] proto_0.3-10
[20] Rcpp_0.11.5
[21] reshape2_1.4.1
[22] rgl_0.95.1201
[23] Rsolnp_1.15
[24] scales_0.2.4
[25] SkewHyperbolic_0.3-2
[26] spd_2.0-0
[27] stringr_0.6.2
[28] tools_3.1.3
[29] truncnorm_1.0-7
[30] xts_0.9-7


Thanks u all in advance.
-- 
*Jaimie.*

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list