Class HurstExponentRTIndicator

All Implemented Interfaces:
Resettable, RTIndicator

public class HurstExponentRTIndicator extends AbstractWindowSeriesRTIndicator
Rolling Hurst Exponent with O(n) per-tick updates.

Estimates the Hurst exponent using the Rescaled Range (R/S) method over a rolling window of log returns. The Hurst exponent indicates:

  • H < 0.5 — mean-reverting (anti-persistent)
  • H = 0.5 — random walk
  • H > 0.5 — trending (persistent)

The R/S statistic for a series of n returns is:

  R/S = range(cumulative deviations from mean) / stddev
Then H = log(R/S) / log(n).

Note: Unlike most indicators in this module, the Hurst exponent requires O(n) per tick because computing the range of cumulative deviations cannot be maintained incrementally. The rolling window stores returns; on each tick the R/S is recomputed from the window contents.

Maintains a window for log returns plus dual accumulators (sumR, sumRSq) for mean and stddev. Returns 0.5 when stddev is zero or window is not full.