William O'Neil spent decades studying the stocks that made the biggest moves. His finding: before a major breakout, the best stocks repeatedly form a specific U-shaped base followed by a short pullback. He called it the Cup with Handle.
NVDA formed a textbook version in 2025. Here's how it looked — and what the pattern teaches.
The Structure
A Cup with Handle has two distinct parts:
The Cup: A U-shaped decline from a prior high. Left rim and right rim reach approximately the same level. The bottom is rounded, not V-shaped. Duration: 7–65 weeks (standard) or 35–220 days (daily chart).
The Handle: A short pullback from the right rim. Tight, controlled, on declining volume. Duration: 5–25 days. The handle's high becomes the pivot.
The pivot = handle high. Breaking above it on volume is the entry trigger. The stop = handle low. A return below the handle means the shakeout failed — sellers are back.
What Each Part Tells You
The Cup: Institutional investors bought on the way up (left side). When the market corrected, they held — the stock didn't crash to the base. Recovery shows they're still defending. The rounded bottom, not a sharp V, tells you the absorption was gradual: sellers were worked through over weeks.
The Handle: A final shakeout. The right side of the cup approaching the prior high creates natural overhead supply from holders who bought at the left rim and waited. The handle shakes them out on lower volume — when they finally sell, institutions absorb. The breakout from the handle high means that overhead supply is cleared.
NVDA — The Teaching Example (Nov 2024 – Jun 2025)
On the weekly chart:
| Date | Event | Price |
|---|---|---|
| Nov 4, 2024 | Left rim (prior high) | 147.63 |
| Apr 7, 2025 | Cup bottom | 86.62 low / 110.93 close |
| Jun 2, 2025 | Right rim (near left side) | 144 high / 141.72 close |
| Jun 9–16, 2025 | Handle — 2 weeks sideways | Flat drift |
| Jun 23, 2025 | Breakout | 157.75 close / 158.71 high |
Cup depth: (147.63 − 86.62) / 147.63 = 41.3% — deeper than O'Neil's standard 33% limit. But it formed during a broad market correction (tariff shock Apr 2025). Deep cups in market corrections often still work.
Handle: Flat, 2 weeks. O'Neil classically wants a downward drift — but a flat handle also works. Institutions absorbing, not letting the price fall.
Breakout: Jun 23, clear volume confirmation.
This is a daily-chart translation of a weekly CWH — the pattern appears on multiple timeframes.
What Makes This Different from Type A/B/C
Type A (Contracting Coil) and Type C (Darvas Box) can contain a CWH-like shape, but they're detected by different logic:
- TypeA: declining recovery highs, horizontal triangle
- TypeC: flat ceiling tested repeatedly
- TypeD (CWH): explicit U-shape confirmed + distinct handle structure + right rim within 8% of left rim
The three other types are horizontal or amplitude-based. TypeD is geometry-based — the U-shape is what defines it.
Relaxed Parameters for Modern Markets
Standard O'Neil: depth ≤33%, handle must drift downward.
Our implementation (detect_cwh_daily): depth ≤45%, flat handles allowed. Why:
1. Bear-market depth: NVDA's cup was 41%. A market-wide selloff of 20%+ can push cup depth past 33% while the stock still recovers cleanly. Too-strict depth filtering would exclude these.
2. Flat handles: Institutional sponsors defending price → flat handle. O'Neil's original spec biased toward weaker markets where handles drifted more. In high-RS stocks with strong institutional support, flat handles are common and valid.
Backtest Results (Thai Market, RS≥80 + SET Confirmed Uptrend, 2005–2026)
Verdict: Falsified on Thai data.
The backtest ran across 880 Thai stocks, 2005–2026, with RS≥80 and SET Confirmed Uptrend filter applied (same methodology as TypeA/B/C). The TypeD results:
| Horizon | n | Median R | % Positive | Stop Rate | Hit ≥2R |
|---|---|---|---|---|---|
| 10 days | 64 | −0.65 | 4.7% | 51.6% | 1.6% |
| 20 days | 64 | −0.40 | 14.1% | 51.6% | 1.6% |
| 30 days | 64 | −0.25 | 39.1% | 51.6% | 3.1% |
| 60 days | 64 | −1.00 | 30.6% | 51.6% | 11.3% |
Compare to the other three types at 30 days:
| Metric | TypeA (Coil) | TypeB (Zigzag) | TypeC (Darvas Box) | TypeD (CWH) |
|---|---|---|---|---|
| Signals (filtered) | 2,910 | 602 | 3,289 | 64 |
| Median R at 30d | +0.11 | +0.06 | +0.19 | −0.25 |
| Hit ≥2R at 30d | 18.1% | 23.6% | 15.7% | 3.1% |
| Stop rate | 31.6% | 40.2% | 26.8% | 51.6% |
| % Positive at 30d | 52.3% | 50.5% | 55.0% | 39.1% |
Every metric is worst-in-class. TypeD is removed from the production scanner as a signal generator.
Why CWH Doesn't Transfer to Thai Data
Three structural reasons:
1. CWH is rare on SET (n=64 over 21 years). The pattern requires 35–220 days of a controlled U-shaped decline and recovery. Thai stocks are more volatile and mean-reverting — they tend to either crash and not recover, or recover sharply in a V rather than a rounded U. The geometry O'Neil observed in US growth leaders simply doesn't form as often in Thailand.
2. The institutional thesis doesn't hold the same way. CWH works in US markets because institutions defend their cost basis during the handle — they absorb selling on declining volume. Thai market institutional participation is structured differently (NVDRs dominate foreign flows, retail participation is higher, and large Thai institutional buyers behave differently from US growth funds). The "smart money holding the line" signal embedded in the U-shape is less reliable.
3. Sample contamination. With only 64 signals, the detector may be labeling formations that look like CWH geometrically but lack the underlying institutional dynamics. A V-shaped recovery followed by a sideways drift could pass the geometric checks without the actual supply-clearing mechanism O'Neil described. This is a known risk when applying US-designed detectors to foreign markets.
What this means for the system: The CWH remains an excellent conceptual framework for reading US stocks (it's the basis of the oneil_branch US system). But on Thai SET, it adds no edge. Use TypeA/B/C for Thai breakout candidates. CWH is for understanding and for US watchlist work.
Exit Strategy for CWH
The handle provides a natural, tight stop: handle low. Entry risk is typically 5–10%.
Partial TP: At 20–25% gain (O'Neil's original sell rule) or at 2R (whichever comes first). Trail behind the MA21 after partial.
Full exit signal: Stock falls back into the cup after breaking out, on heavy volume = failed breakout; exit immediately.
Current TypeD Signals
None. TypeD (CWH) has been removed from the Thai production scanner as a signal generator following the falsification result. The ⌣ CWH label will not appear in breakout_pivots.html for Thai stocks.
It remains active in the US system (oneil_branch) where the original O'Neil research context applies.
Backtest: Thai market 2005–2026, 880 symbols, RS≥80 filter + SET close>200-EMA regime gate. Entry at breakout-day close, exit at t+30d close or stop. Stop = handle low. R = (exit − entry) / (entry − stop). n=64 after filters. Completed 2026-06-13.