help for lomackinlay

Perform Lo-MacKinlay variance ratio test

lomackinlay
varname
[if exp]
[in range]
[,
q(numlist)
gaps
robust
]

lomackinlay is for use on time series data, which must be tsset. It
may be applied to a single panel of a panel (xt) data set using an if qualifier.
lomackinlay also supports the by: prefix.

Description

lomackinlay computes a overlapping variance-ratio test on a timeseries. The
timeseries should be in level form; e.g., to test that stock returns vary randomly
around a constant mean, you consider the null hypothesis that the log price series
is a random walk with drift. The log price series would then be given in the
varlist. If the assumption of homoskedastic errors in the process generating
the differenced series is not reasonable, the robust option may be used to
calculate a variance ratio test statistic robust to arbitrary heteroskedasticity. The
standarized variance ratio, labeled R_s, is distributed as Normal under the null
hypothesis of a random walk.

Options

q(numlist) optionally specifies a numlist of values for
the span of differencing. If not provided, the numlist of 2 4 8 16 is applied.

gaps is used to indicate that gaps in the timeseries are allowed.

robust specifies that a heteroskedasticity-robust test statistic should
be computed.

Examples

. webuse wpi1

. lomackinlay ln_wpi

. lomackinlay ln_wpi, robust

. lomackinlay ln_wpi, q(2 3 5 7 9)

References

Campbell, J. Y., Lo, A. W. and A. C. MacKinlay, The Econometrics of Financial Markets.
Princeton: Princeton University Press, 1997.

Lo, A. and MacKinlay, A. C., "Stock market prices do not follow random walks: evidence
from a simple specification test", Review of Financial Studies 1:1, 1988.

Lo, A. W. and A. C. MacKinlay, A Non-Random Walk Down Wall Street.
Princeton: Princeton University Press, 1999. https://www.jstor.org/stable/j.ctt7tccx.9

Tse, Ng and Zhang, "A small-sample overlapping variance-ratio test",
available from www.mysmu.edu/faculty/yktse/JTSA_R.pdf

Author

Christopher F Baum, Boston College

baum@bc.edu

Acknowledgements

Tomasz Stepniak's query to Statalist suggested this problem. I am very
grateful to Allin Cottrell for pointing out several corrections required in the
code and providing corrected code. Brian Fryd also pointed out an error in the
routine and provided a fix, for which I thank him.

Also see

On-line: help for lomodrs (if installed)