TradeLabs AILearn

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.

Intermediate3 min readUpdated 3 Oct 2026
Markdown
Lesson 17 of 46

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#

StatisticSensitivity to outliers
MeanHigh: one extreme value shifts it
Standard deviationVery high: squared deviations amplify extremes
Pearson correlationHigh: a few points can create or hide a relationship
Ordinary regressionHigh: outliers pull the fitted line. See Regression Analysis
MedianLow
Median absolute deviation (MAD)Low
Spearman rank correlationLow

Detecting outliers#

MethodRule of thumb
Z scoreValues 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 checksPrices outside the day's trading range, negative volumes, impossible jumps
Visual inspectionCharts 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#

  1. Separate errors from genuine events using domain knowledge and multiple data sources.
  2. Fix or remove errors; keep genuine extremes for risk analysis.
  3. Use robust measures for signals and typical behaviour.
  4. Report sensitivity: show results with and without extreme values.
  5. 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.

Check your understanding

3 quick questions on this lesson. Get them all right to finish it.

Turn on JavaScript to take the quiz.

Finished this lesson?Sign in to save your progress across devices.
Next lessonStatistical Significance in TradingStatistical significance helps judge whether trading results reflect a real edge or luck. Learn the t statistic rule of thumb, sample size and multiple testing.

Mentioned in