Back

#variance-ratio

1 APIs with this tag

Variance Ratio Test API

A formal statistical test of whether a market follows a random walk, or whether its returns carry tradeable momentum or mean-reversion that is real rather than noise — the Lo-MacKinlay variance ratio test, computed live from Yahoo Finance daily closes, no key, nothing stored. Most persistence tools give you a single descriptive number; this gives you a hypothesis test with a verdict. The variance ratio compares the variance of multi-day returns to the variance of one-day returns scaled up: under a true random walk the ratio is 1 at every horizon. A ratio above 1 means returns positively autocorrelate (trends persist — momentum); below 1 means they reverse (mean-reversion). Crucially it attaches a heteroskedasticity-robust z-statistic and a p-value at each horizon, so you know whether the deviation from a random walk is statistically significant or just sampling noise — the thing a point estimate cannot tell you. The asset endpoint runs the test at horizons of 2, 4, 8 and 16 days and returns each ratio, z-statistic, p-value and a reject/fail-to-reject verdict, plus an overall read. The screener endpoint ranks the cross-asset universe by their 2-day variance ratio, separating the statistically momentum-like markets from the mean-reverting ones. This is the random-walk hypothesis-test cut — distinct from the Hurst-exponent regime API (a point estimate with no significance), the momentum and the price APIs. It is the test, with the p-value attached.

api.oanor.com/varianceratio-api