vrtest (version 0.97)

Subsample.test: Subsampling test of Whang and Kim (2003)

Description

The function returns the p-values of the subsampling test.

Usage

Subsample.test(y, kvec)

Arguments

y
a vector of time series, typically financial return
kvec
a vector of holding periods

Value

Holding.Period
holding periods used
Block.Length
block lengths chosen
pval
p-values of the test for each block length used

Details

The block lengths are chosen internally using the rule proposed in Whang and Kim (2003)

References

WHANG,Y.-J., J. KIM, 2003, A Multiple Variance Ratio Test Using Subsampling, Economics Letters, 79, 225-230.

Examples

Run this code
data(exrates)
y <- exrates$ca                  
nob <- length(y)
r <- log(y[2:nob])-log(y[1:(nob-1)])   
kvec <- c(2,5,10)
Subsample.test(r,kvec)

Run the code above in your browser using DataLab