Memory Cycle v1 — Walk-Forward Backtest
Headline
The mechanical rules in the v1 framing doc DRAMATICALLY underperform buy-and-hold on both names across the 2019-2025 window. The strategy is not overfit per-se — it's structurally broken.
| Metric | MU | SMH |
|---|---|---|
| Walk-forward total return | +109.34% | +109.87% |
| Walk-forward Sharpe (per-fold-annual) | 0.39 | 0.85 |
| Max drawdown | 16.1% | 13.8% |
| Buy-and-hold same period | +301.57% | +245.06% |
| Delta vs buy-and-hold | -192.23% | -135.19% |
| Total trades | 25 | 26 |
The strategy left ~190 percentage points of return on the table for MU and ~135 for SMH over 7 years. That is not a small overfit; the rules are systematically harmful.
Equity curve (per-fold)
Each fold starts fresh at $20k (2R worth of capital allocated to a single name).
MU
| Test Yr | Start | End | Strat % | BH % | Sharpe | DD % | Trades |
|---|---|---|---|---|---|---|---|
| 2019 | 20000 | 20174 | +0.87 | +32.11 | 0.15 | 8.2 | 3 |
| 2020 | 20000 | 19224 | -3.88 | +17.86 | -0.11 | 16.1 | 4 |
| 2021 | 20000 | 20103 | +0.52 | +13.05 | 0.14 | 3.1 | 2 |
| 2022 | 20000 | 17639 | -11.81 | -23.70 | -0.83 | 16.0 | 4 |
| 2023 | 20000 | 21430 | +7.15 | +35.30 | 1.37 | 3.1 | 3 |
| 2024 | 20000 | 20954 | +4.77 | +1.32 | 1.29 | 2.9 | 3 |
| 2025 | 20000 | 43391 | +116.95 | +118.09 | 2.84 | 12.7 | 6 |
SMH
| Test Yr | Start | End | Strat % | BH % | Sharpe | DD % | Trades |
|---|---|---|---|---|---|---|---|
| 2019 | 20000 | 23223 | +16.12 | +31.63 | 2.08 | 5.7 | 4 |
| 2020 | 20000 | 26369 | +31.84 | +26.01 | 1.42 | 13.8 | 5 |
| 2021 | 20000 | 21046 | +5.23 | +20.92 | 1.21 | 2.2 | 2 |
| 2022 | 20000 | 17599 | -12.00 | -17.48 | -1.01 | 12.2 | 4 |
| 2023 | 20000 | 21459 | +7.29 | +37.36 | 2.17 | 1.4 | 3 |
| 2024 | 20000 | 21209 | +6.04 | +21.98 | 1.73 | 2.5 | 3 |
| 2025 | 20000 | 26024 | +30.12 | +24.44 | 1.65 | 11.5 | 5 |
Per-fold trade logs (MU)
2019 (DRAM cycle recovery year):
- 2019-01-02 T1 entry @ $31.94 (0.5R)
- 2019-01-03 T2 entry @ $30.23 (-5.3% pullback, 0.5R)
- 2019-06-12 PHASE-MARKER EXIT @ $32.15 (90d return -16.8%) — closed at slight gain, missed the +60% MU year-end rally to ~$54
2020 (COVID year, set up the massive boom):
- 2020-01-02 T1 entry @ $54.02
- 2020-02-25 T2 entry @ $50.81 (-5.9%)
- 2020-03-09 T3 entry @ $44.83 (-17%, full position)
- 2020-05-12 PHASE-MARKER EXIT @ $44.56 (90d return -17.5%) — closed at the COVID bottom, missed the +60% rally into year-end
- MU finished 2020 at ~$75, the strategy exited at $44.56
2021 (sideways year):
- 2021-01-04 T1 entry @ $72.22
- 2021-07-08 PHASE-MARKER EXIT @ $75.20 (90d return -18.6%) — exited at a SMALL GAIN on a temporary swing, missed the rest of the year
2022 (DRAM cycle crash):
- Full position built by 2022-01-20
- 2022-05-12 PHASE-MARKER EXIT @ $66.29 (90d return -29.2%) — sold halfway down. Continued to ~$50 in October, but strategy was already out. Strategy LOST less than buy-hold here (-12% vs -24%), the one fold where the phase-marker exit helped.
2023 (DRAM cycle bottom + recovery):
- 2023-01-03 T1 entry @ $49.63 (only 0.5R because price never pulled back enough to trigger T2/T3)
- 2023-11-10 PROFIT TRIM 1 @ $74.66 (+50%)
- 2023-12-29 liquidated @ $84.66
- BH went +35% on the full $10k position; strategy went +7% on the 0.5R position
2024 (sideways then weak):
- 2024-01-02 T1 entry @ $81.69
- 2024-04-01 PROFIT TRIM 1 @ $123.43 (+51%) — good
- 2024-08-02 PHASE-MARKER EXIT @ $92.13 — sold the dip, MU ended 2024 only slightly higher
2025 (AI/HBM boom year):
- 2025-01-02 T1 entry @ $87.01
- 2025-04-03 T2 + T3 entries @ $74.16 (-14.8%, both triggers hit on same bar)
- 2025-09-05 PROFIT TRIM 1 @ $131.18 (+50.8%)
- 2025-10-01 PROFIT TRIM 2 @ $181.89 (+109%)
- 2025-12-30 liquidated @ $292.51 — finally a clean win, strategy +117% vs BH +118%
Parameter sensitivity (MU)
Sweep ±20% around each lockable parameter, all others held at default.
| Parameter | Base | -20% | -10% | 0% (locked) | +10% | +20% |
|---|---|---|---|---|---|---|
| tranche_2_pullback_pct | -5.0% | 108.9% | 109.3% | 109.3% | 107.7% | 108.4% |
| tranche_3_pullback_pct | -10.0% | 102.6% | 109.3% | 109.3% | 109.3% | 111.2% |
| phase_marker_trigger_pct | -15.0% | 8.2% | 7.8% | 109.3% | 109.3% | 103.8% |
(Cells show aggregate walk-forward total return %.)
The phase-marker trigger is a cliff. Tightening the exit threshold from -15% to -13.5% (a 10% adjustment) drops total return from +109% to +7.8%. That is not a smooth gradient — it's a discontinuity. The strategy lives on a knife-edge where any tightening of the exit causes it to fire prematurely on noise.
Tranche pullback parameters are robust within the swept range — they don't materially change outcomes because the strategy rarely gets all 3 tranches deployed before the phase-marker exit fires anyway.
"Is this overfit?" diagnostic
No — it's worse than overfit. It's structurally wrong for the thesis horizon.
Overfit would mean "great in-sample, bad out-of-sample." Here, the locked rules are bad EVERYWHERE. The strategy underperforms buy-and-hold in every single fold except 2022 (where it lost less in a down year) and 2025 (where it roughly matched). It doesn't matter that we held parameters fixed across folds — the rules themselves are misaligned with the thesis horizon.
The structural problem: the framing doc says "no per-trade stops" but then defines a phase-marker exit at 90d return < -15%, which IS a per-trade stop. It just wears a "phase marker" jacket. Look at the trades:
- 2019-06-12: exited at $32.15. MU finished 2019 at ~$54 (+68% from exit).
- 2020-05-12: exited at $44.56. MU finished 2020 at ~$75 (+68% from exit). The COVID-low exit is the textbook "selling the bottom" failure.
- 2021-07-08: exited at $75.20. MU finished 2021 at ~$93 (+24% from exit).
- 2024-08-02: exited at $92.13. MU finished 2024 at ~$84 (-9%, the one time the exit didn't hurt).
In 3 of 4 phase-marker exits, the strategy locked in losses or small gains while the underlying was 1-3 months away from a major rally. That is the classic momentum-stop trap on a multi-year thesis.
The framing doc DID anticipate this when it said: "Tight stops shake us out of multi-year theses on noise. Instead, the THESIS itself has a stop (the anchor-break condition)." But the implementation collapsed the anchor-break condition into a 90d price-momentum proxy because we don't have DRAM spot or hyperscaler capex feeds. That proxy is materially worse than no exit at all.
Anchor-break sensitivity / proxy disclosure
The thesis defines 3 phase markers (DRAM spot trend, hyperscaler capex direction, HBM cadence). None are available as free historical feeds. The backtest collapses all 3 into a SINGLE price-momentum proxy: MU's own 90d trailing return.
This is the most load-bearing caveat in the report. The proxy is fundamentally weaker than the original thesis because:
- Reflexivity bug. The real phase markers are fundamental data that lead price; the proxy IS price. Using price-derived signal to time price entries/exits is tautological and lossy.
- 2-of-3 confirmation lost. The original spec says "single phase marker flips bearish but other 2 hold → trim to 1R." With a single price proxy, the "2-of-3 confirmation" filter that would prevent premature exits is gone.
- Lead-time lost. DRAM spot prices and hyperscaler capex revisions are reported with lag but reflect supply/demand fundamentals. Price-momentum reacts to anything (rate fear, sentiment swings, macro shocks unrelated to memory).
A faithful test of the thesis as written REQUIRES real DRAM spot price data + hyperscaler capex revision data. Without those, this backtest is testing a degraded version of the strategy and the result understates what the thesis could deliver. But the price proxy is the same data we'd actually have at trade-time on a paper run if we don't build a phase-marker feed first, so the result is also a true upper bound on "if you literally run this strategy with no exotic data feeds."
What buy-and-hold tells us
The most striking finding is HOW MUCH money buy-and-hold left on the table for the strategy. Across both names, buy-hold beats the mechanical strategy by 50-100 percentage points on a per-fold basis, and 135-192 percentage points cumulative.
This is consistent with the academic literature on cyclicals (Asness, Marathon, Druckenmiller writings): the right play on a structural multi-year cycle is conviction-sized exposure held through volatility, NOT tactical adjustments that try to time within-cycle pullbacks. The strategy's tranche-accumulation logic is fine, but the exit logic shoots it in the foot.
Caveats
- Macro-cycle backtests have inherent overfit risk. 7 folds over 7 years is statistically thin. The 2025 fold (+117%) is so strong it skews aggregate stats; without 2025 the strategy is dramatically negative vs buy-hold (run a leave-one-out check before reading too much into the +109% aggregate).
- No transaction costs modeled. ~3-6 trades per fold × 7 folds × 2 tickers = ~50 trades. At $0 commission (Alpaca) and ~5bps spread on liquid names like MU/SMH, transaction friction is ~$2-5k cumulative across all folds — material but not dominant.
- No slippage modeled. Trades execute at daily close.
- DRAM spot data is a price-momentum proxy, not a real feed. Documented above. Most load-bearing caveat.
- Hyperscaler capex revisions and HBM cadence excluded entirely. The real 2-of-3 anchor confirmation logic is absent.
- 2017-2018 not used in test windows. Train period starts 2017; first test fold is 2019. We are missing the 2017-18 DRAM cycle top in test data.
- Yahoo Finance historical data, not point-in-time. Adjusted for splits/dividends as reported NOW. Survivorship bias is present (MU survived; the test universe is curated from today's vantage).
- No portfolio-level exposure cap. Each fold is run on a single name in isolation. Combined MU + SMH allocation in real deployment would have correlation effects not modeled.
- Tranche-2 and tranche-3 sometimes trigger on the same bar (e.g. 2025-04-03 MU: -14.8% gap, both T2 and T3 fire at the same price). Realistic but worth noting — the spec didn't anticipate gap-down opens.
Recommendation for paper deployment
ARCHIVE the v1 mechanical rules. ITERATE the strategy spec before paper deployment.
Specifically:
Remove the phase-marker price-momentum proxy as an exit trigger. It is the single load-bearing source of underperformance. Until we have real DRAM-spot + capex-revision feeds, the exit logic should be: hold through the test window, exit only on fundamental thesis break (founder + Ray manual review, not a price rule).
If you must have a mechanical exit on price data alone: consider a much wider trigger (>-30% trailing 90d, which only fires in true cyclical capitulations) AND require confirmation from a longer window (e.g. 6-month return < -25%). The current -15% / 90d is too jumpy.
The tranche-accumulation logic is sound. Per-fold trade logs show T2/T3 entries firing at price points that subsequently produced 50%+ rallies (2020 COVID lows, 2025 April dip). The buy-the-dip portion of the strategy is value-additive; only the exit rule is broken.
Build the real phase-marker feed before re-running. Quarterly DRAM contract pricing from TrendForce/DRAMeXchange (free summaries published in trade press), and hyperscaler quarterly capex guidance revisions from 10-Q filings. Both are cron-scrapable. This is the cheapest path to a thesis-faithful exit rule.
In the meantime, the honest answer to "is the memory cycle thesis backtestable": YES, the THESIS is empirically supported (buy-and-hold MU 2019-2025 returned +302%, dominating SPY). But the STRATEGY spec in the framing doc materially underperforms the thesis. The capital-cycle reading is right; the execution rules are wrong.
Concrete next step: revise the framing doc to remove the price-momentum exit, re-run this backtest with HOLD-TO-FOLD-END semantics, and compare against buy-and-hold. If the only-tranche-entry version matches or modestly exceeds buy-hold (because dollar-cost-averaging into pullbacks at -5%/-10%/-15% beats a single-shot entry at the start of the window), the revised spec is paper-deploy-ready. If it merely matches buy-hold, then there's no strategy edge here and we should just buy-and-hold MU on a thesis-confirmed entry signal.
Files
- Driver:
/tmp/memory_cycle_backtest.py - Raw results:
/tmp/memory_cycle_backtest_results.json - Cached bars:
~/.claude/state/alpaca-bars-cache/MU-daily-yf-2017-01-01-2025-12-31.csv,~/.claude/state/alpaca-bars-cache/SMH-daily-yf-2017-01-01-2025-12-31.csv - Thesis: [[01-projects/investing/theses/2026-05-17-memory-cycle-thesis-v1-framing]]
Related
- [[01-projects/investing/README]] — operating-model boundary
- [[.claude/skills/investing-backtest-thesis/SKILL]] — SOP this backtest executed against
- [[.claude/state/investing-toolchain-buildout]] — Stage 2 toolchain milestone