vrtest (version 0.97)

Auto.Q: Automatic Portmanteau Test

Description

A robustified portmanteau test with automatic lag selection

Usage

Auto.Q(y,lags)

Arguments

y
financial return time series
lags
maximum lag value, the default is 10

Value

Stat
Automatic portmanteau test statistic
Pvalue
p-value of the test

References

Escanciano, J.C., Lobato, I.N. 2009a. An automatic portmanteau test for serial correlation. Journal of Econometrics 151, 140-149.

Charles, A. Darne, O. Kim, J.H. 2011, Small Sample Proeprties of Alternative Tests for Martingale Difference Hypothesis, Economics Letters, in press.

Examples

Run this code
data(exrates)
y <- exrates$ca                          
nob <- length(y)
r <- log(y[2:nob])-log(y[1:(nob-1)])    
Auto.Q(r)

Run the code above in your browser using DataLab