statistical anomaly detector — the bars past the gate

Statistically unusual price, gap and volume bars

An anomaly gate. A robust median + MAD reading — how far a bar sits from AAPL's own typical move, measured against its median so one outlier cannot mask the next — flag only the bars that are unusual for this name: price spikes, overnight gaps and volume surges past the |z| > 3 threshold, measured against an EWMA expected daily move (the recent average move, weighted toward the latest sessions), with a note on what each flag means. The scan runs on real price history only.

AAPL27 flagged · 180 barsexpected move 1.75%/dayσ 28% ann.gate |z| > 3180 real daily barsmedian + MAD robust z · EWMA λ 0.94
Most unusual bar2026-06-26 (54 sessions ago): volume surge at +27.42σ, the highest-severity bar in AAPL's recent history. A single-channel breach — a clean volume surge, not a coincident move.
+3σ gate−3σ gate
2025-12-242026-09-14
price spikeovernight gapvolume surgeper-bar max |z|
Flagged bars27
Price spikes8
Overnight gaps9
Volume surges10
Expected move1.75%
Gate|z| > 3

Flagged bars — every bar past the gate

sort
volume surge2026-06-26 · 54 sessions ago+27.42σsev 3.00
overnight gap2026-07-31 · 30 sessions ago-12.99σsev 3.00
volume surge2026-06-25 · 55 sessions ago+8.34σsev 2.78
price spike2026-01-05 · 173 sessions ago-7.81σsev 2.60
price spike2026-01-06 · 172 sessions ago-7.11σsev 2.37
volume surge2026-01-02 · 174 sessions ago+6.72σsev 2.24
price spike2026-02-12 · 146 sessions ago-5.96σsev 1.99
price spike2026-01-20 · 163 sessions ago-5.83σsev 1.94
volume surge2026-04-30 · 93 sessions ago+5.63σsev 1.88
volume surge2026-06-18 · 59 sessions ago+5.54σsev 1.85
price spike2026-02-02 · 154 sessions ago+5.54σsev 1.85
volume surge2026-03-20 · 121 sessions ago+5.39σsev 1.80
volume surge2026-01-30 · 155 sessions ago+5.04σsev 1.68
price spike2026-01-26 · 159 sessions ago+4.92σsev 1.64
volume surge2026-06-08 · 67 sessions ago+4.57σsev 1.52
overnight gap2026-01-08 · 170 sessions ago-4.38σsev 1.46
overnight gap2026-03-23 · 120 sessions ago+4.11σsev 1.37
overnight gap2026-05-01 · 92 sessions ago+4.01σsev 1.34
price spike2026-06-09 · 66 sessions ago-3.89σsev 1.30
volume surge2026-02-04 · 152 sessions ago+3.88σsev 1.29
overnight gap2026-01-27 · 158 sessions ago+3.58σsev 1.19
price spike2026-02-17 · 144 sessions ago+3.57σsev 1.19
volume surge2025-12-31 · 175 sessions ago+3.36σsev 1.12
overnight gap2026-08-27 · 11 sessions ago-3.25σsev 1.08
overnight gap2026-04-27 · 96 sessions ago-3.20σsev 1.07
overnight gap2026-08-10 · 24 sessions ago-3.13σsev 1.04
overnight gap2026-09-08 · 4 sessions ago-3.12σsev 1.04

Each row is one bar past the gate, identified by its session date and how many sessions back it sits; where no date is available the row keeps the sessions-ago count. The σ is the dominant channel's robust z-score; severity scales with how far past |z| > 3 it ran.

AAPL fired 27 statistically unusual bar(s) — 8 spike(s), 9 gap(s), 10 volume surge(s) — past the |z| > 3 gate, against a ~1.75% expected daily move.
The detector flags only the bars that are unusual for THIS stock, then explains why each one matters. The gate keeps the agent from narrating noise. Computed on real price bars; research — your decisions, your risk.
What "robust z-score" means
AAPL had 27 statistically unusual bar(s) over the window (threshold |z| > 3).
A z-score asks "how many standard deviations from normal is this?" We use a ROBUST version: instead of the average and standard deviation (which a single wild day distorts), we use the median and the Median Absolute Deviation (MAD), scaled by 1.4826 so it lines up with a normal curve. That way one crazy bar does not redefine "normal" and hide the next one.
→ Only these flagged bars are worth a narrative — the rest is noise.
Price spike detected
The biggest move was -7.81σ on bar 6 (severity 2.6035).
A "spike" is a single-day price move far larger than this stock's own recent typical move. That is exactly the kind of bar that usually has a REASON behind it — an earnings surprise, a guidance change, an analyst action — which is why the agent routes it to look for the catalyst rather than shrugging it off.
→ Route to catalyst/conviction layer to find the "why."
Overnight gap detected
An unusual open-vs-prior-close jump of -12.99σ on bar 149.
A "gap" is when the stock OPENS far away from where it closed the day before — the move happened while the market was shut. Gaps almost always trace to overnight news (an earnings print, a deal, a macro shock), so an unusually large gap is a strong signal to go read the tape.
→ Overnight news is the usual culprit — pull the headline.
Volume surge detected
Volume ran +27.42σ above its normal range on bar 125.
Volume is how many shares changed hands. A surge means far more people than usual were trading — conviction, forced flows, or a reaction to news. Big volume CONFIRMS a move: a price spike on heavy volume is more meaningful than the same move on a quiet day.
→ Heavy volume confirms the move is real, not a fluke quote.
Your expected daily move (EWMA)
The model expects roughly a 1.75% move on a normal day right now.
We track volatility with an EWMA (exponentially-weighted moving average): it weights recent days more heavily, so the "expected move" rises after turbulent stretches and falls when things calm down. A bar only counts as a spike when it dwarfs THIS adaptive expectation — so the same +3% means "normal" for a meme stock and "alarming" for a utility.
→ A bar matters only when it dwarfs the expected move.

Glossary

z-score
How many standard deviations a value sits from its typical level. |z| > 3 is roughly a 1-in-370 day under a normal curve.
MAD
Median Absolute Deviation — a robust stand-in for standard deviation that a single outlier cannot inflate.
Volume surge
A day where trading volume is far above its recent typical level — a sign that something drew the crowd in.
EWMA volatility
Exponentially-weighted volatility — an adaptive estimate of the typical daily move that leans on recent days.
Expected move
sigma * sqrt(1) — the one-day standard-deviation of returns the model currently expects.