
That impressive rotation backtest ran on hindsight tickers
I recently audited the Tactical Monthly Rotation strategy from the codex-stock-backtest repository.
I recently audited the Tactical Monthly Rotation strategy from the codex-stock-backtest repository. The developer claims a 15-year return of +13,816% with a 38.96% CAGR and a -29.68% MDD (Maximum Drawdown). My goal was to determine if this performance comes from a robust trading logic or simply from picking winning stocks after the fact.
Reproducing the results
My independent implementation of the logic confirmed the developer’s figures. This logic uses 63-day momentum, 200-day simple moving averages (SMA) for regime filtering, and a risk-off rotation into IEF. Using the same data snapshots, I achieved a +12,561% return with a 38.1% CAGR and a 2.73% monthly return. The PF (Profit Factor, or gross profit divided by gross loss) was 3.06. In other words, the strategy code is logically sound and lacks look-ahead bias. The numbers are honest.
Where the performance actually comes from
To understand if the “alpha” (excess return) comes from the rotation rules or the choice of assets, I broke down the performance by isolating the variables.
| Strategy Component | CAGR | Monthly Return | PF | MDD |
|---|---|---|---|---|
| SPY Buy & Hold | 14.2% | 1.12% | 2.09 | -33.7% |
| Equal-Weight (EW) Universe | 26.4% | 1.97% | 2.25 | -47.0% |
| Tactical Rotation Rules | 38.7% | 2.82% | 3.06 | -30.4% |
| The data shows that nearly half of the excess return (+12.2 percentage points) comes purely from holding the selected universe of 11 stocks rather than the market index. The rotation rules themselves primarily serve to compress the MDD from -47% down to -30%. |
The “winner’s bias” in the universe
When I tested the same rules against a neutral universe (9 sector SPDRs plus SPY and QQQ), the strategy yielded a CAGR of only 8.0% with a PF of 1.67. This significantly underperformed a simple SPY buy-and-hold strategy of 14.2%. Furthermore, I ran the strategy against 30 random universes composed of liquid, pre-2010 large-cap stocks. The developer’s chosen universe outperformed every single one of those 30 random sets. This confirms that the strategy’s success is heavily reliant on a curated list of high-beta tech and semiconductor stocks (like NVDA and SMH) that were identified as winners by 2026.
Verdict
While the implementation is technically honest and the engineering behind the regime filters is solid, the strategy is not a viable candidate for live trading. The performance is driven by a “hindsight universe” rather than a repeatable edge. For my own research, this audit reinforces two points:
- The regime-filtering logic (using a benchmark SMA 200 to reduce exposure) is effective at compressing tail risk, but it functions similarly to techniques I have already implemented.
- Separating the contribution of “universe beta” from “rule alpha” is now a mandatory step in my verification protocol for any external strategy.
How this connects
This verification builds on earlier ones (what failed before and what I tried this time, comparisons between approaches).