sigmaquant.performance.metrics.skew#
- sigmaquant.performance.metrics.skew(returns)#
Compute the skewness of a return series.
Skewness measures the asymmetry of a distribution around its mean. Positive skewness indicates a longer or fatter right tail, while negative skewness indicates a longer or fatter left tail.
- Parameters:
returns – Sequence of periodic returns or PnL values.
- Returns:
Skewness of the input series.
- Return type:
float
Notes
NaN values are ignored. No finite-sample bias correction is applied.
Let \(\bar{r}\) be the sample mean and \(s\) the sample standard deviation.
The skewness estimator is:
\[\widehat{\text{Skew}} = \frac{1}{T} \sum_{t=1}^{T} \left( \frac{r_t - \bar{r}}{s} \right)^3\]