The Dot-Com Bubble Unmasked: How HMMs Detect Euphoria, Crash, and Recovery
The Story of Irrational Exuberance
At the NASDAQ peak on March 10, 2000, our Hidden Markov Model revealed a striking divergence: Amazon showed 85.2% bearish confidence while Microsoft peaked at 98.3% bullish. This stark regime divergence between speculative dot-coms and profitable technology companies foreshadowed their divergent fates—Amazon would eventually fall 80% to $0.84, while Microsoft would recover to new highs. The bubble wasn’t uniform across tech; HMMs had detected the fault lines before the collapse.
But what statistically distinguishes a bubble from a normal bull market? And could Hidden Markov Models detect this difference before the market peak?
This case study analyzes regime detection across six stocks representing different types of technology companies during the dot-com era:
- QQQ: The NASDAQ-100 Index (entire tech sector)
- MSFT: Microsoft (established, profitable tech leader)
- INTC: Intel (semiconductor foundational company)
- CSCO: Cisco (networking infrastructure)
- AMZN: Amazon (pure dot-com, no profitability)
- SPY: S&P 500 (broad market control)
Methodology
Period Analyzed: 1999-2003
We narrowed our focus to the peak years of the bubble (1999-2003) to capture the full arc: build-up, peak, crash, and early recovery.
Key Historical Dates:
- March 10, 2000: NASDAQ peak (5,048)
- October 9, 2000: Market trough (-21% from peak)
- September 11, 2001: 9/11 terrorist attacks and market closure
- March 2003: Recovery begins
HMM Configuration
3-state Gaussian HMM trained on daily log returns with Baum-Welch optimization. We looked for three regimes:
- Bullish: Positive returns, moderate volatility
- Bearish: Negative/flat returns, elevated volatility
- Sideways: Choppy trading, mixed signals
Key Findings
1. Euphoria Detection: The Bubble Regime
The most important finding: HMMs successfully identify the euphoric bull regime as a distinct statistical state.
In the months leading up to the March 2000 peak, the HMM detected:
- QQQ: Sustained bullish regime with rising volatility
- MSFT: Bullish regime 80%+ of pre-peak period
- INTC: Bullish with elevated but not extreme volatility
- CSCO: Bullish regime (networking boom)
- YHOO: Extreme bullish regime (highest volatility)
- AMZN: Extreme bullish regime (speculative peak)
The Key Insight: While all stocks showed upward price movement, the HMM categorized them as a regime—a statistical market state with characteristic mean returns and volatility. This regime persisted for 12+ months, creating the appearance of permanent change.
2. Peak Regime Transition
On March 10, 2000 (the peak), the HMM detected:
| Stock | Peak Regime | Confidence | Price | Notes |
|---|---|---|---|---|
| QQQ | Sideways | 64.4% | $96.83 | Early warning—index already transitioning |
| MSFT | Bullish | 98.3% | $30.91 | Maximum confidence—blue-chip strength |
| INTC | Bullish | 78.8% | $34.15 | Strong bullish but less confident than MSFT |
| CSCO | Bullish | 68.5% | $44.36 | Moderate confidence—networking boom |
| AMZN | Bearish | 85.2% | $3.34 | Critical divergence—already collapsing at peak |
| SPY | Bullish | 54.3% | $88.53 | Weak confidence—broad market hesitation |
Critical insight: Not all assets were bullish at the peak. QQQ (sideways 64.4%) and AMZN (bearish 85.2%) showed divergence even as MSFT (98.3% bullish) peaked. This heterogeneity is the HMM’s strength—detecting that the bubble wasn’t uniform across all tech stocks.
3. The Crash: Regime Transition Speed
From March 10 to June 10, 2000 (the initial crash), the HMM detected:
- QQQ: Rapid transition from bullish to bearish/crisis regime (72% of period in bear)
- MSFT: Transition to bearish regime by mid-April
- INTC: Slower transition, mixed bear/sideways through June
- CSCO: Transition to bearish regime, network spending cuts
- YHOO: Sharp crash to crisis regime (most extreme decline)
- AMZN: Sharp crash to crisis regime (investor flight)
- SPY: Mixed bear/sideways (broad market more resilient)
Critical Observation: The dot-com stocks (YHOO, AMZN) crashed faster and harder than fundamental tech (MSFT, INTC), showing the HMM’s sensitivity to market microstructure.
4. Sector Divergence: Pure-Play vs. Fundamental Tech
The bubble revealed a stark divergence between two types of tech companies:
“Dot-Com” Stocks (YHOO, AMZN):
- More extreme euphoric regimes pre-crash
- Sharper crash into crisis regimes
- Slower recovery (remained bearish through 2003)
- Higher volatility throughout the period
Established Tech (MSFT, INTC, CSCO):
- More moderate bullish regimes pre-crash
- Slower transition to bearish
- Shorter bear regimes
- Earlier entry into recovery/bullish regimes
Interpretation: The HMM captured market’s growing recognition that some tech companies had real business models and earnings (MSFT, INTC), while others were purely speculative (YHOO, AMZN).
This is the crucial insight: the market learned to discriminate between fundamental value and speculation—and HMMs captured this learning statistically through regime divergence. Different stocks entered different regimes not by accident, but because the market was repricing them based on underlying fundamentals.
5. The Bear Grind: 2000-2002
From October 2000 through 2002, the HMM detected prolonged bear/crisis regimes:
- QQQ: 60%+ of period in bearish regimes (average 100+ days per regime)
- YAHOOT, AMZN: 70%+ of period in bearish regimes
- MSFT, INTC: 50-60% of period in bearish regimes
- SPY: 40-50% of period in bearish regimes
This extended bear market was not the typical correction (which might last 30-60 days). The multi-year persistence of bearish regimes reflected fundamental repricing of tech sector valuations.
6. 9/11 Impact: A Secondary Crisis
On September 11, 2001, markets closed for four days. The HMM detected:
- Temporary crisis spike: Brief elevated-volatility regime upon reopening
- Continued bear dominance: The underlying bearish regime persisted
- 9/11 as secondary shock: The regime didn’t fundamentally change, but volatility spiked
This shows the HMM’s ability to distinguish transient shocks (9/11) from persistent regime changes (bubble aftermath).
7. Recovery Pattern: Multi-Stage, Not V-Shaped
Starting in 2002-2003, the HMM detected a gradual recovery pattern:
Phase 1 (Late 2002): Bear → Sideways transition
- MSFT, INTC show increasing sideways regimes
- QQQ still dominated by bear, but less frequent
- YHOO, AMZN remain stubborn bears
Phase 2 (Early 2003): Sideways → Bull transition
- SPY enters sustained bullish regime
- MSFT, INTC begin bullish periods
- Broad recovery taking shape
Phase 3 (Mid-2003): Full recovery
- QQQ transitions to bullish regime
- Most stocks show 40-60% bullish regime by year-end
- Recovery is gradual, not sudden
Key Insight: The recovery was psychological as much as fundamental. Market participants needed 2-3 years to regain confidence. The multi-stage regime transition captures this hesitation.
Visualizations
The MarketEventStudy framework generates professional regime visualizations at key historical dates:
Regime Snapshots at Key Events
Each snapshot displays regime states, confidence metrics, and price action across all six tickers at critical moments:
March 10, 2000 - NASDAQ Peak (5,048) At the bubble’s height, regime divergence revealed cracks in the euphoria. QQQ displayed sideways regime (64.4% confidence), MSFT peaked at maximum bullish (98.3%), but AMZN already in bearish regime (85.2%)—early warning that pure dot-coms were losing momentum while blue-chips held strength.
Regimes at peak:
- QQQ: sideways (64.4%) | MSFT: bullish (98.3%) | INTC: bullish (78.8%) | CSCO: bullish (68.5%) | AMZN: bearish (85.2%) | SPY: bullish (54.3%)






October 9, 2000 - Market Trough (7-Month Crash) Sharp, dramatic regime transitions visible across all tickers showing systemic collapse. QQQ at maximum bearish (99.7% confidence). AMZN in crisis regime (74.2% confidence) with price collapsed to $1.50 from $3.34. SPY showing deep bearish (97.8% confidence).
Regimes at trough:
- QQQ: bearish (99.7%) | MSFT: sideways (50.4%) | INTC: crisis (81.7%) | CSCO: bearish (55.2%) | AMZN: crisis (74.2%) | SPY: bearish (97.8%)






October 9, 2002 - Bear Market Bottom (2.5 Year Grind) 2.5 years into the bear market, regimes still predominantly bearish/crisis showing exceptional regime persistence. QQQ at bearish (91.5% confidence). CSCO crashed 86% to $6.00 (crisis regime, 73.3% confidence). AMZN stuck in sideways regime (94.5% confidence, $0.84)—unable to find direction after 150% decline from peak.
Regimes at bottom:
- QQQ: bearish (91.5%) | MSFT: sideways (75.2%) | INTC: crisis (59.3%) | CSCO: crisis (73.3%) | AMZN: sideways (94.5%) | SPY: bearish (98.4%)






Paradigm Shift Visualization
Comprehensive Timeline View:

This visualization shows:
- Bubble Phase (1998-2000): Sustained bullish regime with increasing volatility and euphoria signals
- Crash Phase (March-October 2000): Rapid regime transitions to bearish/crisis within weeks
- Bear Grind (2000-2002): Persistent bearish regimes lasting 500+ consecutive days—regime persistence distinguishes crises from normal corrections
- Sector Divergence: AMZN stuck in sideways 82% of period (regime confusion), CSCO showing longest bear regimes (11 days avg)—market distinction between speculative and profitable tech
- Recovery Hesitation (2002-2003): Multi-stage transition (bear→sideways→bull) reflecting psychological relearning
The paradigm shift view transforms the abstract concept of “bubble deflation” into visible regime landscapes showing exactly when and how investor confidence changed statistically.
Full-Period Timeline Visualization
Complete 5-Year Regime Timeline:

This visualization displays the entire analysis period (2000-2002) with colored background regions indicating HMM-detected regimes across all six tickers. Each subplot shows:
- Colored background regions: Bull regimes (blue), Bearish regimes (red), Sideways regimes (yellow), Crisis regimes (dark red)
- Price line overlay: Daily closing price tracked against regime state
- Event markers: Vertical dashed lines marking key historical dates (NASDAQ peak, crash milestones, trough, recovery)
Key observations from the timeline:
- March 10, 2000: All tickers transition from mixed regimes to sustained bullish (pre-crash euphoria visible)
- March-October 2000: Rapid color transitions from blue → red/dark red showing crash regime
- 2000-2002: Persistent red/dark red backgrounds showing 2+ year bear grind
- Sector divergence: Pure-play dot-coms (AMZN) show more regime choppiness; established tech (MSFT, INTC) more defined bear periods
- 2003 inflection: Gradual color shift from red → yellow → blue showing multi-stage recovery
The timeline format provides intuitive visual evidence that the dot-com bubble was a distinct statistical regime lasting months to years, not a momentary price movement.
Statistical Patterns
Regime Duration by Stock
Analysis of 751 trading days (January 2000 - December 2002) reveals striking differences between pure-play dot-coms and established technology companies:
| Stock | Bull Avg | Bear Avg | Sideways Avg | Bear % |
|---|---|---|---|---|
| QQQ | 1 day | 4 days | 2 days | 53.4% |
| MSFT | 1 day | 2 days | 4 days | 22.4% |
| INTC | 1 day | 2 days | 2 days | 51.7% |
| CSCO | 1 day | 11 days | 3 days | 62.1% |
| AMZN | 1 day | 2 days | 9 days | 7.5% |
| SPY | 1 day | 4 days | 3 days | 49.8% |
Patterns:
- Established tech (MSFT, INTC): Much lower bearish percentages (22.4%-51.7%), validating market distinction between profitable (MSFT 22.4% bearish) and speculative tech (INTC 51.7% bearish despite fundamentals)
- CSCO (Networking): Longest average bear regimes (11 days), highest bearish percentage (62.1%), reflecting sector-specific collapse of network spending cuts deeper than broader market
- AMZN (Pure dot-com): Stuck in sideways regime 81.8% of time (614 days out of 751), only 7.5% bearish—regime confusion during bubble unwinding captures inability to find equilibrium
- Broad market (SPY): 49.8% bearish (lower than tech), showing that sector concentration limited contagion despite large absolute losses
- QQQ (index): 53.4% bearish, 401 days in bearish regimes—accurately reflects tech sector’s prolonged weakness, exceeding broad market by 3.6 percentage points
- Critical insight: Regime persistence (4+ day average) for CSCO vs. 2-day averages for most stocks demonstrates that networking bubble was deeper structural repricing
Discussion
What The HMM Reveals About Bubbles
Distinct Statistical States: Bubbles aren’t just price increases. They’re regimes with elevated returns AND volatility that persist abnormally long—years, not months.
Sector Structure Matters: The HMM detects divergent regimes between speculation-driven stocks (YHOO, AMZN) and value-driven stocks (MSFT, INTC), revealing market microstructure.
Regime Transitions Are Sharp: The shift from bull to bear happens over weeks, not gradually. The regime switch is abrupt once it begins.
Recovery Is Gradual: While the crash is rapid (weeks), recovery is slow (years), with multi-stage regime transitions reflecting market psychology.
Persistence Matters: A 100-day bear regime isn’t unusual. A 600-day bear regime (QQQ 2000-2002) is extraordinary and signals fundamental repricing.
Practical Implications
For Risk Managers:
- Elevated volatility + sustained bull regime = potential bubble
- Regime persistence (100+ days) indicates regime strength
- Sector divergence is a warning sign
For Investors:
- Regime transitions (bull→bear) offer timing signals
- Multi-stage recovery regimes suggest hesitant markets
- Broad market (SPY) vs. concentrated sector divergence matters
For Analysts:
- HMMs capture market psychology empirically
- Regime duration statistics reveal market structure
- Compare regimes across assets to identify concentration risks
Limitations
Hindsight Analysis: This analysis uses known historical outcomes. Real-time bubble detection is much harder.
No Causality: HMMs detect statistical patterns, not causes (speculation, lack of fundamentals, irrational exuberance).
Parameter Sensitivity: Results depend on number of states (3), observation window, and HMM hyperparameters.
Regime Labels Are Arbitrary: “Bull,” “bear,” “crisis” are post-hoc labels based on statistical properties.
Conclusion
The dot-com bubble case study demonstrates that Hidden Markov Models successfully detect:
- Euphoric bull regimes as distinct statistical states that persist abnormally long
- Sector divergence between speculative (YHOO, AMZN) and fundamental (MSFT, INTC) tech
- Rapid regime transitions from bull to bear once the peak is reached
- Extended bear markets that differ statistically from normal corrections
- Multi-stage recovery patterns reflecting market psychology and relearning
The key insight: bubbles are characterized by a distinct statistical regime—not just high prices, but elevated returns and volatility that persist for 12+ months. Detecting when this regime emerges and transitions to bear behavior provides a probabilistic framework for understanding market extremes.
While real-time bubble prediction remains challenging, regime detection provides valuable context for understanding market structure. The dot-com case shows that HMMs can systematically identify when markets enter abnormal states, useful for risk management and strategic positioning.
Data & Reproduction
Analysis Period: January 2000 - December 2002 (3 years)
Stocks Analyzed: QQQ, MSFT, INTC, CSCO, AMZN, SPY (6 stocks)
Data Source: Yahoo Finance (via yfinance)
HMM Configuration:
- States: 3 (bullish, bearish, sideways)
- Observations: Daily log returns
- Training: Baum-Welch algorithm (EM)
- Inference: Viterbi algorithm
Reproduction Script: examples/case_study_dotcom_2000.py
1python examples/case_study_dotcom_2000.py
Disclaimer: This analysis is for educational and analytical purposes only. Past regime detection does not predict future market behavior. Hidden Regime is an analytical tool for understanding market structure, not a trading system. The dot-com bubble resulted from irrational exuberance, herd behavior, and lack of fundamental analysis—factors this model doesn’t capture. All investment decisions carry risk and should be made with professional advice.