hurst(): number
Hurst index/exponent.
It's a useful statistic for detecting if a time series is mean reverting (anti-persistent), totally random or persistent. A value in the range [0.5) indicates mean-reverting (anti-persistent) A value of 0.5 indicate a random walk A value H in the range (0.5,1] indicates momentum (persistent)
Hurst exponent for a single time series
Hurst exponent for a single time series
import { assertEquals } from "jsr:@std/assert"; const x = [0.003, 0.026, 0.015, -0.009, 0.014, 0.024, 0.015, 0.066, -0.014, 0.039]; assertEquals(hurst(x), 0.3440590389509703);
x: array
array of values
hurst(): array | matrix
Hurst index/exponent.
It's a useful statistic for detecting if a time series is mean reverting (anti-persistent), totally random or persistent. A value in the range [0.5) indicates mean-reverting (anti-persistent) A value of 0.5 indicate a random walk A value H in the range (0.5,1] indicates momentum (persistent)
Hurst exponent for a single time series
Hurst exponent for a single time series
import { assertEquals } from "jsr:@std/assert"; const x = [0.003, 0.026, 0.015, -0.009, 0.014, 0.024, 0.015, 0.066, -0.014, 0.039]; assertEquals(hurst(x), 0.3440590389509703);
x: matrix
array of values