pyhctsa.operations.hypothesis_tests.variance_ratio_test

pyhctsa.operations.hypothesis_tests.variance_ratio_test(y, periods=2, iids=0)

Variance ratio test for random walk.

Implements the variance ratio test using the VarianceRatio function from arch.unitroot.

The test assesses the null hypothesis of a random walk in the time series, which is rejected for some critical p-value.

Parameters:
y : array-like

The input time series.

periods : int or list of int, optional

A scalar or vector of period(s) to use for the test.

iids : int or list of int, optional

A scalar or vector of boolean values (0 or 1) indicating whether to assume independent and identically distributed (IID) innovations for each period.

Returns:

Dictionary of test results.

Return type:

dict