# Subsample.test: Subsampling test of Whang and Kim (2003) In vrtest: Variance Ratio tests and other tests for Martingale Difference Hypothesis

## Description

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

## Usage

 `1` ```Subsample.test(y, kvec) ```

## Arguments

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

## Details

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

## Value

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

Jae H. Kim

## References

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

## Examples

 ```1 2 3 4 5 6``` ```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) ```

### Example output

```\$Holding.Period
[1]  2  5 10

\$Pval
pval
bl=51  0.3851103
bl=82  0.3320719
bl=113 0.3547758
bl=144 0.4482412
bl=175 0.4221992
bl=206 0.4201501

\$Block.length
[1]  51  82 113 144 175 206
```

vrtest documentation built on May 29, 2017, 9:04 a.m.