Outliers and Robust Statistics
Outliers can distort averages, correlations and backtests. Learn how to detect them, robust measures like the median and MAD, winsorising and when they matter.
An outlier is a value far from the rest of the data. In trading, outliers come in two kinds: errors, such as a bad tick that prints a price 50% away from the market, and genuine extreme events, such as a crash day or a takeover jump. Errors should be fixed or removed; genuine extremes often matter most for risk and must be kept. Robust statistics are methods that are less sensitive to outliers, helping researchers see the typical pattern without letting a few values dominate.
How outliers distort common statistics#
| Statistic | Sensitivity to outliers |
|---|---|
| Mean | High: one extreme value shifts it |
| Standard deviation | Very high: squared deviations amplify extremes |
| Pearson correlation | High: a few points can create or hide a relationship |
| Ordinary regression | High: outliers pull the fitted line. See Regression Analysis |
| Median | Low |
| Median absolute deviation (MAD) | Low |
| Spearman rank correlation | Low |
Detecting outliers#
| Method | Rule of thumb |
|---|---|
| Z score | Values more than 3 to 4 standard deviations from the mean. See Percentiles, Quantiles and Z-Scores |
| Robust z score | (x minus median) / (1.4826 × MAD), flag values beyond about 3.5 |
| Interquartile range (IQR) | Below Q1 minus 1.5 × IQR or above Q3 + 1.5 × IQR |
| Domain checks | Prices outside the day's trading range, negative volumes, impossible jumps |
| Visual inspection | Charts and histograms |
The standard z score method is itself distorted by outliers, since the mean and standard deviation include them. Robust z scores avoid this.
Robust measures#
MAD = median(|x - median(x)|)
robust standard deviation ≈ 1.4826 × MAD (for normal data)
Other robust tools:
- Trimmed mean: drop a percentage of the highest and lowest values, then average.
- Winsorising: cap extreme values at chosen percentiles, such as the 1st and 99th.
- Rank based methods: Spearman correlation, rank transformed signals.
- Robust regression: methods such as Huber regression that reduce outliers' influence.
Winsorising signals in quant research#
Quantitative strategies often winsorise or rank signals across stocks before combining them. For example, a company with a tiny positive earnings figure might show a P/E of 5,000, which would dominate a raw value signal. Capping extremes or using ranks keeps a few companies from distorting the portfolio. See Combining Signals and Factor Investing Explained.
When outliers are the point#
In risk management, extreme values are not noise to be removed; they are the main concern. Tail events drive drawdowns, margin calls and ruin. Removing genuine crash days from a backtest makes a strategy look far safer than it is. See Fat Tails and Maximum Drawdown.
Practical guidelines#
- Separate errors from genuine events using domain knowledge and multiple data sources.
- Fix or remove errors; keep genuine extremes for risk analysis.
- Use robust measures for signals and typical behaviour.
- Report sensitivity: show results with and without extreme values.
- Document every adjustment to keep research reproducible. See Backtest Reproducibility.
Frequently asked questions#
What is an outlier in trading data?#
A value far from the rest of the data, caused either by a data error or by a genuine extreme market event.
What are robust statistics?#
Statistical methods, such as the median and median absolute deviation, that are less affected by outliers than the mean and standard deviation.
Should I remove outliers from a backtest?#
Remove data errors, but keep genuine extreme events, since they are often the most important for understanding risk.
Next, learn what makes a result convincing in Statistical Significance in Trading.
3 quick questions on this lesson. Get them all right to finish it.
Turn on JavaScript to take the quiz.
Mentioned in
- Covariance and CorrelationMath and Statistics
- Bootstrap and Permutation TestsMath and Statistics
- Skewness and KurtosisMath and Statistics
- Fundamental DataData and Alternative Data
- Historical Data for BacktestingResearch and Backtesting
- Robustness and Stress TestingResearch and Backtesting