Spaces:
Sleeping
Sleeping
File size: 3,164 Bytes
3425ac5 3151dff 3425ac5 3151dff 3425ac5 3151dff 3425ac5 3151dff | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ---
title: Did This Stock Actually Change
emoji: π
colorFrom: red
colorTo: green
sdk: gradio
sdk_version: 6.19.0
app_file: app.py
pinned: false
license: mit
short_description: Which moves were real events, which were dice. No API key.
---
# π Did This Stock Actually Change?
Financial charts make every wiggle look like a story; most wiggles are dice. Type a
ticker (free Yahoo data via `yfinance`, **no API key**) and get the honest split:
- **Shock events** β days or clusters that broke out of the stock's normal movement,
with dates and sizes ("β12.3%, sharpest day ~11Γ normal"). Detected by the
[Clutch](https://huggingface.co/spaces/Aluode/Clutch2)'s leaky-integrator gate fed
daily returns normalized by *past-only local* volatility β so one outsized day trips
it instantly, several stressed days in a row accumulate and trip it too (which a
naive threshold misses), and a permanently rougher stock doesn't spam flags.
- **Volatility regime changes** β "a typical day went from Β±1.1% to Β±2.7% around
2025-09-17". Non-overlapping-window vols, strongest-split ratio test, day-level
refinement. At most one per window: only the strongest is claimed.
- **Drift vs luck** β the period's total return compared against what pure chance could
produce at this stock's wobble (2ΟΒ·βn). Most yearly stock moves are **not**
distinguishable from luck, and this page says so, which chart commentary never will.
- **Free headlines** β Yahoo's keyless news feed; if a flagged event is recent, the
headlines may be the *why*. (Recent items only β Yahoo's free feed can't be matched
to events from months back.)
## Measured calibration (synthetic GBM suites, "normal" suspicion)
- pure random walk, 60 seeds β **2.8 shock events/yr** (these are the year's genuinely
biggest moves, labeled with their size in Γ-normal-day units β the reader can judge)
- a β9% overnight gap (5Γ daily vol) β detected **52/60**
- three consecutive β2.2Ο days (slow bleed a threshold misses) β detected **53/60**
- constant volatility β false "regime change" **3/60**; a 1.2%β2.8% vol change β
detected **34/40**, flagged on average 9 days from the true day
- the strict setting trades detection for silence (39/60 on the gap); the eager setting
the reverse. The slider is the trade-off, stated.
Real returns are fatter-tailed than GBM, so real tickers will show somewhat more events
than 2.8/yr β that is the data being eventful, not the detector lying.
Known limits: Yahoo rate-limits shared servers occasionally (the app says so and retries
work); very short histories (<40 days) are refused; the luck bound uses whole-period
volatility, so a mid-window regime change widens it.
Nothing is stored. This describes the past, predicts nothing, and is not investment
advice or a recommendation to buy or sell anything.
## Files
- `stock.py` β data fetch (cached, keyless), news parser, shock gate, vol-regime test, verdicts
- `change.py` / `clutch.py` β the shared engine from the companion Spaces
- `app.py` β the Gradio app
Built by Antti Luode (PerceptionLab). *Do not hype. Do not lie. Just show.*
|