Kurtosis
The Kurtosis node computes excess kurtosis (Fisher's definition: population kurtosis − 3) over the rolling window. Zero means a normally-shaped distribution (mesokurtic); positive values indicate fat tails (leptokurtic — more extreme events); negative values indicate thin tails (platykurtic). Fat-tailed return distributions are a direct warning for tail-risk events and option mispricing. Requires at least 4 non-null values.
Algorithm
- ▸Compute mean (μ) and population std (σ) of non-null window values
- ▸excess kurtosis = (Σ ((x − μ) / σ)⁴ / n) − 3
- ▸Returns 0 when σ = 0 (constant series)
- ▸Requires ≥ 4 non-null values; returns null otherwise
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| period | number | 20 | Rolling window size. Minimum 4. |
Inputs & Outputs
| Port | Type | Description |
|---|---|---|
| Inputs | ||
| input | number[] | Source numeric array |
| Outputs | ||
| values | number | null | Computed value at each bar; null before the warmup period completes |
| timestamps | number[] | Bar timestamps (UNIX ms), aligned 1-to-1 with values |
Use Cases
Tail Risk Alert
Kurtosis exceeding 3 on a return series indicates the distribution has fat tails — increase position-size conservatism or widen stops during such regimes.
Options Strategy Filter
High kurtosis periods favor long-gamma strategies (strangles/straddles); low kurtosis favors short-gamma approaches, guiding vol strategy selection.
Distribution Quality Monitor
Monitor kurtosis on an indicator series to detect whether its distribution has shifted meaningfully, which can invalidate fixed thresholds calibrated on historical data.