Skewness
The Skewness node computes the Fisher skewness coefficient (3rd standardized moment) of the rolling window. Positive skew means a longer right tail (occasional large gains relative to the center); negative skew means a longer left tail (occasional large losses). Negative skewness in returns is a warning sign — many momentum strategies suffer from left-skewed distributions. Requires at least 3 non-null values.
Algorithm
- ▸μ = mean(vals), σ = population_std(vals)
- ▸skewness = Σ ((v − μ) / σ)³ / n
- ▸Returns 0 when σ = 0
- ▸Requires ≥ 3 non-null values; returns null otherwise
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| period | number | 20 | Rolling window size. Minimum 3. |
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
Return Distribution Quality
Monitor rolling skewness on returns. Negative and worsening skewness warns that strategy returns are developing a crash-prone profile even if Sharpe appears stable.
Mean vs. Median Divergence
Large positive skewness means mean > median (right-skewed); large negative means mean < median. Use this to decide whether Average or Median is the better central tendency measure.
Options Bias
Assets with negative skew in returns tend to be systematically overpriced for out-of-the-money puts (crash insurance). Use rolling skewness to time entry into long-put positions.