Class SkewnessRTIndicator

All Implemented Interfaces:
Resettable, RTIndicator

public class SkewnessRTIndicator extends AbstractWindowSeriesRTIndicator
Rolling Skewness with O(1) per-tick updates.

Measures the asymmetry of the distribution of values in the rolling window. Positive skewness indicates a right tail; negative indicates a left tail. Commonly used to detect asymmetry in return distributions.

Uses the sample (adjusted) skewness formula:

  g₁ = [n / ((n-1)(n-2))] * Σ((x_i - x̄) / s)³
which can be computed from three power-sum accumulators (sum, sumSq, sumCub) via:
  m₂ = sumSq/n - mean²
  m₃ = sumCub/n - 3*mean*sumSq/n + 2*mean³
  skew = (n² * m₃) / ((n-1)(n-2) * m₂^1.5)

Returns 0 when n < 3 or when standard deviation is zero.