vratio
Compute the Lo and MacKinlay (1988) variance ratio test using the original data, or the Wright (2000) rank, rank-score, or sign-based forms of the test.
Multiple comparisons are handled using Wald (Richardson and Smith, 1991) or multiple comparison variance ratio (Chow and Denning, 1993). Significance levels may be computed using the asymptotic distribution, or the wild or permutation bootstrap.
Syntax
Series View: series_name.vratio(options) lag_specification
Series View: series_name.vratio(grid[, options]) start end [step]
In the first form of the command, lag_specification should contain the lag values to test in the form of a list of integers, scalars, or a vector containing integer values greater than 1.
In the second form of the command, we include the “grid” option and specify a grid of lag values in the form
start end [step]
where start is the smallest lag, end is the largest required lag, and the optional step indicates which intermediate lags to consider. By default, step is set to 1 so that all lags from start through end will be included.
Options

 out=arg (default=“table”) Output type: “table” or “graph” of test results. data=arg (default=“level”) Form of data in series: “level” (random walk or martingale), “exp” (exponential random walk or martingale), “innov” (innovations to random walk or martingale). method=arg Test method: “orig” (Lo-MacKinlay test statistic), “rank” (rank statistic), “rankscore” (score statistic), “sign” (sign variance ratio statistic). probcalc=arg (default=“anorm”) Probability calculation: “norm” (asymptotic normal), “wildboot” (wild bootstrap), when “method=orig”. biased Do not bias correct the variances. iid Do not use heteroskedastic robust S.E. noc Do not allow for drift / demean the data (for default “data=level”). stack Compute estimates for stacked panel (in panel workfiles). rankties=arg (default=“a”) Tie handling for ranks: “i” (ignore), “a” (average), “r” (randomize). prompt Force the dialog to appear from within a program. p Print results.
Bootstrap Options

 btreps=integer (default=1000) Number of bootstrap repetitions btseed=positive_integer Seed the bootstrap random number generator.If not specified, EViews will seed the bootstrap random number generator with a single integer draw from the default global random number generator. btrnd=arg (default=“kn” or method previously set using rndseed) Type of random number generator for the bootstrap: improved Knuth generator (“kn”), improved Mersenne Twister (“mt”), Knuth’s (1997) lagged Fibonacci generator used in EViews 4 (“kn4”) L’Ecuyer’s (1999) combined multiple recursive generator (“le”), Matsumoto and Nishimura’s (1998) Mersenne Twister used in EViews 4 (“mt4”). btdist=arg (default=“twopoint”) Bootstrap distribution: “twopoint”, “rademacher”, “normal” (when “probcalc=wildboot”).
Examples
The commands
jp.vratio(data=exp, biased, iid) 2 5 10 30
jp.vratio(out=graph, data=exp, biased, iid) 2 5 10 30
compute the Lo-MacKinley and the joint Chow-Denning and Wald tests for the homoskedastic random walk using periods 2, 5, 10, and 30. The results are displayed first in table, then in graph form. The individual test z-statistics use the asymptotic normal distribution and the Chow-Denning statistic uses the asymptotic Studentized Maximum Modulus distribution for evaluating significance.
series logjp = log(jp)
logjp.vratio(noc, iid, grid) 2 10 2
computes the same tests using periods 2, 4, 6, 8, and 10, with the bias-corrected variances computed without allowing for a mean/drift term.
To compute a heteroskedastic robust version of the last test, we simply remove the “iid” option:
logjp.vratio(noc, grid) 2 10 2
To compute the significance levels using the wild bootstrap,
jp.vratio(data=exp, biased, probcalc=wildboot, btreps=5000, btseed=1000, btrng=kn) 2 5 10 30
jp.vratio(data=exp, probcalc=wildboot, btdist=normal, btreps=5000, btseed=1000, btrng=kn) 2 5 10 30
Both commands produce bootstrap significance levels using 5000 replications with the Knuth generator and a seed of 1000. The second command substitutes bias corrects the variance estimates and changes the bootstrap random number distribution from the default two-step to the normal.
To perform Wright’s rank and rank-score based tests,
vector(4) periods
periods.fill 2, 5, 10, 30
jp.vratio(data=exp, method=rank, btreps=5000, btseed=1000, btrng=kn) periods
jp.vratio(data=exp, method=rankscore, btreps=5000, btseed=1000, btrng=mt) periods
In panel settings, you may compute the statistic on the individual cross-sections and perform a joint Fisher test
exchange.vratio(data=exp, biased, probcalc=wildboot, btreps=5000, btseed=1000, btrng=kn) periods
or you may compute the statistic on the stacked data
series dexch = @dlog(exch)
dexch.vratio(stack, data=innov) periods
Cross-references
See “Variance Ratio Test” for discussion.