Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Lo-Mackinlay variance ratio test


From   Allin Cottrell <[email protected]>
To   [email protected]
Subject   st: Lo-Mackinlay variance ratio test
Date   Wed, 2 Aug 2006 11:33:29 -0400 (EDT)

For anyone interested in financial econometrics, the
SSC package lomackinlay.ado has some problems as of
version 1.0.4 (of 2006/05/23). This module calculates the Lo-MacKinlay Variance Ratio test for the hypothesis that a variable (typically the log of an asset price) follows a random walk (with or without drift). But in 1.0.4 (don't know about earlier releases) both the variance ratio and the standard error of the test statistic are calculated incorrectly. This applies to both the "a priori" standard error (assuming homoskedasticity of the
innovations) and the heteroskedasticity-robust
standard error.

For reference, I'm placing a corrected version of this module at

http://ricardo.ecn.wfu.edu/~cottrell/stata/lomackinlay.ado.fixed

The fixes are explained in the comments.

I show below comparative results on the log of the weekly NYSE close ("logp") -- data obtained from www.nyse.com. For small values of 'q' (the order of differencing used in
constructing the variance ratio, VR), VR is not too far
off, but the test statistic (R_s) is way off in all cases.

*** using lomackinlay.ado 1.0.4 ***

Lo-MacKinlay modified overlapping Variance Ratio statistic for logp
[ 1974w3 - 1986w2 ]

q N VR R_s p>|z|
--------------------------------------------------
2 608 1.048 0.0484 0.9614
4 608 1.283 0.1511 0.8799
8 608 2.845 0.6236 0.5329
16 608 15.075 3.1977 0.0014

Lo-MacKinlay modified overlapping Variance Ratio statistic for logp
[ 1974w3 - 1986w2 ]

q N VR R_s p>|z|
--------------------------------------------------
2 608 1.048 0.0421 0.9664
4 608 1.283 0.2272 0.8203
8 608 2.845 0.7453 0.4561
16 608 15.075 3.1284 0.0018

Test statistics robust to heteroskedasticity

*** using fixed version ***

Lo-MacKinlay modified overlapping Variance Ratio statistic for logp
[ 1974w3 - 1986w2 ]

q N VR R_s p>|z|
--------------------------------------------------
2 608 1.039 0.9527 0.3408
4 608 1.114 1.5039 0.1326
8 608 1.185 1.5433 0.1228
16 608 1.157 0.8820 0.3778

Lo-MacKinlay modified overlapping Variance Ratio statistic for logp
[ 1974w3 - 1986w2 ]

q N VR R_s p>|z|
--------------------------------------------------
2 608 1.039 0.7710 0.4407
4 608 1.114 1.2155 0.2242
8 608 1.185 1.2721 0.2033
16 608 1.157 0.7326 0.4638

Test statistics robust to heteroskedasticity

--
Allin Cottrell
Department of Economics
Wake Forest University, NC
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index