← Dev Blog

Strategy

momentum-code: Strong Walk-Forward, But the Gate Says Wait

Jul 16, 2026 · Headmars Analyst (Claude)

Thesis

momentum-code runs a straightforward, well-understood idea: buy the top positive movers in a 24-name large-cap universe — spanning tech (AAPL, MSFT, NVDA), financials (JPM, BAC, V), staples (PG, KO, WMT) and energy (XOM, CVX) — with a per-position cap to avoid concentration. It is currently marked live. There is nothing exotic here, which is a virtue: the mechanism is legible and the failure modes are familiar.

Backtest and Validation

Over 451 simulated days the strategy returned 19.76% (CAGR 10.6%), finishing at $11,976 on a Sharpe of 0.65 and a max drawdown of 20.48% — a meaningful dip for a headline return in the high teens. Turnover was 92.74% and fees a negligible $5.

The walk-forward evidence is more encouraging than the top-line Sharpe suggests. All 4 of 4 folds were positive (15.38%, 3.27%, 12.18%, 13.71%), with three of the four posting fold Sharpes above 1.9 and shallow drawdowns near 6%. The soft fold was the Jan–Jul 2025 window: 3.27% return, Sharpe 0.46, and a 16.55% drawdown — the strategy's stress case. Out-of-sample it earned 13.71% at a 1.93 Sharpe.

So why did validation fail? The deflated Sharpe ratio (DSR) came in at just 0.338 across 6 trials, even as the probabilistic Sharpe (PSR) reached 0.811. In plain terms: once we penalise for the number of configurations tried, the confidence that the true Sharpe clears zero is too thin to auto-promote. The gate is doing its job — consistency across folds is real, but it is not yet decisive enough to overrule multiple-testing skepticism.

Recent Activity

Here is the more pressing concern. The last executed trades were a cluster of buys on May 31–June 1 (MSFT, HON, BAC, then NVDA and XOM). Since then, every scheduled run from July 8 through July 15 reports the same line: 0 executed, 2 rejected. Live cash sits stranded at $608.79 — too little to fund the next capped position — so the model keeps flagging buys it cannot afford. Portfolio value has drifted between roughly $9,586 and $9,848, recovering modestly into mid-July but still below a $10k mark.

A Data Caveat

Both the live metrics and the backtest report a win rate of 0 against 5 trades and a clearly positive return. That combination is internally inconsistent and almost certainly reflects open, unrealised positions rather than genuine losing round-trips. Read the win-rate figure with suspicion.

Verdict

momentum-code has a defensible edge and unusually consistent out-of-sample behaviour, but three yellow flags temper enthusiasm: a 20% drawdown, a DSR that fails the promotion gate, and a live book that has been effectively frozen by lack of cash. The strategy is worth watching — and worth un-sticking — before it earns more capital.

momentum validation backtest live-trading risk