vratiotest
Variance ratio test for random walk
Syntax
Description
returns
the rejection decision h
= vratiotest(y
)h
from conducting the variance ratio test for assessing
whether the univariate time series y
is a random walk.
returns the table StatTbl
= vratiotest(Tbl
)StatTbl
containing variables for the test results,
statistics, and settings from conducting the variance ratio test on the last variable of the
input table or timetable Tbl
. To select a different variable in
Tbl
to test, use the DataVariable
name-value
argument.
[___] = vratiotest(___,
specifies options using one or more name-value arguments in
addition to any of the input argument combinations in previous syntaxes.
Name=Value
)vratiotest
returns the output argument combination for the
corresponding input arguments.
Some options control the number of tests to conduct. The following conditions apply when
vratiotest
conducts multiple tests:
For example,
vratiotest(Tbl,DataVariable="GDP",Alpha=0.025,IID=[false true])
conducts two tests, at a level of significance of 0.025, on the variable
GDP
of the table Tbl
. The first test does not assume
that the innovations series is iid and the second test assumes that the innovations series
is iid.
Examples
Input Arguments
Output Arguments
More About
Tips
The test finds the largest integer n such that nq ≤ T – 1, where q is the vaule of the
Period
argument and T is the sample size. Then, the test discards the final (T–1) – nq observations. To include these final observations, remove the initial (T–1) – nq observations from the input series before you run the test.
References
[1] Campbell, J. Y., A. W. Lo, and A. C. MacKinlay. Chapter 12. “The Econometrics of Financial Markets.” Nonlinearities in Financial Data. Princeton, NJ: Princeton University Press, 1997.
[2] Cecchetti, S. G., and P. S. Lam. “Variance-Ratio Tests: Small-Sample Properties with an Application to International Output Data.” Journal of Business and Economic Statistics. Vol. 12, 1994, pp. 177–186.
[3] Cochrane, J. “How Big is the Random Walk in GNP?” Journal of Political Economy. Vol. 96, 1988, pp. 893–920.
[4] Faust, J. “When Are Variance Ratio Tests for Serial Dependence Optimal?” Econometrica. Vol. 60, 1992, pp. 1215–1226.
[5] Lo, A. W., and A. C. MacKinlay. “Stock Market Prices Do Not Follow Random Walks: Evidence from a Simple Specification Test.” Review of Financial Studies. Vol. 1, 1988, pp. 41–66.
[6] Lo, A. W., and A. C. MacKinlay. “The Size and Power of the Variance Ratio Test.” Journal of Econometrics. Vol. 40, 1989, pp. 203–238.
[7] Lo, A. W., and A. C. MacKinlay. A Non-Random Walk Down Wall St. Princeton, NJ: Princeton University Press, 2001.
Version History
Introduced in R2009b