Skip to content

Outlier

An outlier is unusual relative to a dataset or model. A latency example separates an IQR flag from a data error and shows what deletion changes.

An outlier is an observation that is unusually far from the rest of the data, or unusually inconsistent with a specified model. The word describes a relationship to a comparison group or model. It does not establish that the observation is wrong.

For a trading desk, that distinction matters. An exceptional execution delay may be a timestamp error, a genuine queue spike, or an ordinary outcome for a different order type. An extreme loss can be exactly the event a risk model needs to retain. A flag starts an investigation; it does not authorise deletion.

A latency flag with an explicit rule

One common screening rule, used with a box plot, flags observations outside the 1.5 × interquartile-range fences. Let Q1Q_1 and Q3Q_3 be the chosen 25th and 75th sample quantiles. Define
IQR=Q3−Q1,L=Q1−1.5 IQR,U=Q3+1.5 IQR.\mathrm{IQR}=Q_3-Q_1,\qquad L=Q_1-1.5\,\mathrm{IQR},\qquad U=Q_3+1.5\,\mathrm{IQR}.

Here a value is flagged if x<Lx<L or x>Ux>U; equality with a fence is allowed. This is a descriptive screening convention, not a hypothesis test with a universal false-alarm probability.

Consider ten synthetic order-execution latencies, measured consistently in milliseconds:
1,  2,  3,  4,  5,  6,  7,  8,  9,  25.1,\;2,\;3,\;4,\;5,\;6,\;7,\;8,\;9,\;25.
Use R type-7 linear interpolation: at probability pp, the fractional rank is h=1+(n−1)ph=1+(n-1)p, with interpolation between adjacent sorted observations. The lower and upper quartile ranks are 3.25 and 7.75, giving Q1=3.25Q_1=3.25 ms, Q3=7.75Q_3=7.75 ms and IQR=4.5\mathrm{IQR}=4.5 ms. The fences are therefore −3.5 ms and 14.5 ms. Only 25 ms is flagged. The negative lower fence is an arithmetic threshold; no negative latency was observed. Other quartile algorithms can produce different fences, especially in small samples, so the rule and quantile convention belong beside the result.
Ten synthetic execution latencies, 1 through 9 and 25 ms, with the upper type-7 IQR fence at 14.5 ms. All values remain visible. Omitting 25 ms changes the mean from 7 to 5 ms and median from 5.5 to 5 ms.
Ten synthetic execution latencies, 1 through 9 and 25 ms, with the upper type-7 IQR fence at 14.5 ms. All values remain visible. Omitting 25 ms changes the mean from 7 to 5 ms and median from 5.5 to 5 ms.
Original synthetic example. Filled dots are recorded observations. The lower panel compares two explicitly different datasets; it is a sensitivity check, not a recommendation to omit the flagged record.
The sample mean is 70/10=770/10=7 ms. Omitting the 25 ms record leaves a total of 45 ms across nine orders, so the mean becomes 45/9=545/9=5 ms. The median changes from 5.5 ms to 5 ms. These summaries answer different questions: the median describes the middle recorded latency, while the mean includes the full contribution of the slow order.

If the delay was genuine and all ten orders satisfy the study's inclusion rules, a report of 5 ms describes a filtered subset. It no longer describes the mean latency across those ten orders. The slow event may also be the operational problem the desk was trying to measure.

Unusual compared with what?

The comparison group needs an economic definition: instrument, venue, order type, session, horizon and measurement units. Pooling routine small orders with large auctions can make valid observations from one group look exceptional in the pooled sample. A cluster of unusual observations may signal a regime change, dependence or a missing explanatory variable.

The reference distribution also matters. A large observation under a normal model may be less surprising under a heavy-tailed distribution. Applying a normal-model outlier test to a skewed or heavy-tailed series can flag distributional mismatch. Conversely, several extreme records can distort estimated location and spread enough to mask one another. No single cutoff certifies data quality.

Regression adds another distinction:

Diagnostic ideaWhat is unusual?What to investigate
Response outlierThe response relative to the fitted relationshipResidual size on an appropriate comparable scale
High leverageThe combination of predictor valuesWhether the observation occupies an unusual part of predictor space
InfluenceThe fitted result's sensitivity to an observationChanges in coefficients or predictions when that observation is omitted

A crisis day can have an extreme market-factor return, giving high leverage, while its fund return lies close to the fitted relation. High leverage alone does not establish influence. A univariate return flag cannot answer either regression question without the predictor data and fitted model.

Keep the record, investigate the cause

Check source timestamps, units, duplicate identifiers, corporate-action adjustments and matching dates before changing the data. If an error is verified, correct it from a reliable source where possible and preserve the original value and an audit trail. If a record falls outside the stated target population, explain the inclusion rule independently of whether its value is inconvenient.

For a genuine extreme observation, consider whether the analysis needs a richer model, separate groups, or a robust summary alongside the original results. A robust estimate can help describe typical behaviour; it does not measure away real tail losses. Winsorisation replaces extreme values with thresholds, and trimming excludes them: both change the calculation and require an explicit purpose. Choosing either after seeing an unattractive result can also undermine subsequent inference.

A useful report shows the original result, the stated flagging convention, the investigation outcome and any sensitivity analysis. In this example, that means retaining the distinction between a 7 ms full-sample mean and a 5 ms mean after omission.

For financial time series, Financial Return Characteristics explains how skewness, heavy tails and volatility clustering affect the comparison. Order Statistics and Sample Quantiles develops the median and interquartile range used in the screening rule. Both full lessons require membership; public previews are available.

Sources

Last updated
  • descriptive statistics
  • data quality
  • outliers
  • execution latency
  • robust statistics
← Back to the glossaryBack to top ↑