DocsMathStatistics

Statistics

34 nodes — Rolling-window statistical measures and risk metrics

Statistics nodes compute measures over a configurable rolling window: central tendency, spread, distribution shape, trend metrics, and risk ratios. Most nodes default to a 20-bar window and output null until the window warms up.

Acceleration
OLS slope over first-differences — measures the rate of change of momentum.
Windowed
ArgMax
0-based index of the highest value in the window. Detects swing highs and peak age.
Windowed
ArgMin
0-based index of the lowest value in the window. Detects swing lows and trough age.
Windowed
Autocorrelation
Lag-1 Pearson correlation — distinguishes trending from mean-reverting regimes.
Windowed
Average
Arithmetic mean (SMA) over the window. Foundation for deviation and Z-score pipelines.
Windowed
Count
Number of non-null values in the window. Essential for data density validation.
Windowed
Cumulative Sum
Running total from bar zero. Converts returns into equity curves or cumulative volume.
Full-series
Coefficient of Variation
Std / |mean| × 100 — normalised volatility for cross-asset comparison.
Windowed
Entropy
Shannon entropy via uniform binning — high entropy means noise; low means trending.
Windowed
Gain
Sum of positive first-differences — total upward movement within the window.
Windowed
Intercept
OLS y-intercept of the rolling regression. Anchors the trend line at its start.
Windowed
IQR
Q3 − Q1 — outlier-robust spread measure, insensitive to fat-tail price spikes.
Windowed
Kurtosis
Excess kurtosis — positive values indicate fat tails and elevated tail-risk.
Windowed
Lin Reg Slope
OLS slope in price-units per bar. The canonical trend-velocity indicator.
Windowed
Loss
Sum of absolute negative first-differences — total downward movement (positive output).
Windowed
MAD
Mean absolute deviation — the spread measure used in CCI, robust to outliers.
Windowed
Max
Highest value in the window (N-bar high). Core component of Donchian channels.
Windowed
Max Drawdown
Largest peak-to-trough decline as a fraction of the peak within the window.
Windowed
Median
Middle sorted value — a robust central tendency measure unaffected by outliers.
Windowed
Min
Lowest value in the window (N-bar low). Core component of Donchian channels.
Windowed
Momentum
(last − first) / |first| — the window's rate-of-return. Classic momentum factor.
Windowed
Q1 (First Quartile)
25th percentile of the window. Defines the lower bound of the central distribution.
Windowed
Q3 (Third Quartile)
75th percentile of the window. Defines the upper bound of the central distribution.
Windowed
R-Squared
OLS coefficient of determination — measures how linearly clean the trend is (0–1).
Windowed
Range
Max − min over the window — simplest volatility proxy and Donchian channel width.
Windowed
RMS
√(mean(x²)) — measures signal energy or amplitude regardless of sign.
Windowed
Sharpe Ratio
Mean / std — rolling risk-adjusted return proxy assuming zero risk-free rate.
Windowed
Skewness
3rd standardised moment — negative skew warns of asymmetric downside tail risk.
Windowed
Slope
OLS slope over the window. Positive → uptrend; negative → downtrend; zero → flat.
Windowed
Sortino Ratio
Mean / downside-std — penalises only negative volatility, unlike Sharpe.
Windowed
Std Error Bands
OLS fitted ± multiplier × std error. Produces upper, middle, and lower band series.
Windowed · 3 outputs
Sum
Total of non-null values in the sliding window. Complements CumSum for fixed-period sums.
Windowed
Variance
Population variance Σ(x−μ)²/n. Apply Sqrt for standard deviation and Bollinger Bands.
Windowed
Volatility
Std of period-over-period returns — realised volatility for vol-targeting strategies.
Windowed