Performs a variance ratio test using one of several methods for evaluating the significance. The variance ratio test is a test of one of the implications of a random walk hypothesis for financial time series, that the multi-step returns should increase linearly with the time gap, that is the null hypothesis is
\(\frac{{{\rm{var(r}}_{\rm{t}} (q))}}{{q \times {\mathop{\rm var}} (r_t (1))}} = 1\)
where \({r_t (q)}\) is the \(q\) period return.
Methods of testing this are the subject of Lo and MacKinlay(1988) and (1989). The input typically is a log of a financial price series which is assumed under the null to follow a (possibly drifting) random walk. The CENTER option (on by default) controls whether the series is assumed to have a drift (where a fixed mean per period is extracted), or not. The CORRECT option (also on by default) controls whether the finite sample corrections are applied in estimating the variances, and the ROBUST (off by default) is used to employ heteroscedasticity robust standard error estimates in computing the test statistic. The test statistic has a standard Normal asymptotics.
@vratio( options ) series start end
Parameters
series |
series to be tested. This is the undifferenced series, such as a log price series, unless you use the NODIFF option. |
start, end |
range of series to use. By default, the defined range of series. |
Options
LAGS=number of lags examined (q in the formula above) [2]
[CENTER]/NOCENTER
If CENTER, subtracts a fixed mean from the differenced data.
DIFF/[NODIFF]
If DIFF, difference the data, which means that the null is that the input series is a (possibly drifting) random walk rather than a series of independent increments.
ROBUST/[NOROBUST]
If ROBUST, computes heteroscedasticity robust standard errors
[CORRECT]/NOCORRECT
If CORRECT, corrects for bias in the variance.
[PRINT]/NOPRINT
TITLE=title for report ["Variance Ratio Test, Series ..."]
Variables Defined
%%VRATIO |
variance ratio statistic (REAL) |
%CDSTAT |
test statistic (REAL) |
%SIGNIF |
significance level of test statistic (REAL) |
Example
The series CAN is the log of the US$ to Can$ exchange rate (weekly data). This does the variance ratio test for four different values of \(q\), using DOFOR to control the loop over those values.
dofor k = 2 5 10 30
@vratio(lags=k,robust) can
end dofor k
Output
Variance-Ratio Test on series CAN
From 1974:08:07 to 1996:05:29
Computed with heteroscedasticity robust standard errors
Null is Variance Ratio=1. Two-Tailed Test.
VR(2) 0.998191
Test Statistic -0.038265
Asymptotic P-value 0.969476
Variance-Ratio Test on series CAN
From 1974:08:07 to 1996:05:29
Computed with heteroscedasticity robust standard errors
Null is Variance Ratio=1. Two-Tailed Test.
VR(5) 0.993327
Test Statistic -0.064579
Asymptotic P-value 0.948509
Variance-Ratio Test on series CAN
From 1974:08:07 to 1996:05:29
Computed with heteroscedasticity robust standard errors
Null is Variance Ratio=1. Two-Tailed Test.
VR(10) 0.985629
Test Statistic -0.090618
Asymptotic P-value 0.927796
Variance-Ratio Test on series CAN
From 1974:08:07 to 1996:05:29
Computed with heteroscedasticity robust standard errors
Null is Variance Ratio=1. Two-Tailed Test.
VR(30) 0.954932
Test Statistic -0.158234
Asymptotic P-value 0.874272