01 / PYTHON QUANTITATIVE RESEARCH

Signal Research & Backtesting

Do simple, well-known trading signals still work after costs? I backtested two of them on a 25-stock US large-cap universe over the last decade: a cross-sectional momentum strategy (rank the universe on trailing 12-1 month return, hold the top 5 equal-weight, rebalance monthly) and a time-series mean-reversion strategy on SPY (long when the 20-day z-score drops below −1, exit on recovery). Both are charged 10 bps of one-way transaction cost. The engine is ~150 lines of pandas; everything on this page comes out of its JSON export.

Momentum CAGR
+36.0%
+20.6% vs SPY
Sharpe ratio
1.21
SPY 0.86
CAGR / annualized vol, rf = 0
Max drawdown
-35.7%
SPY -33.7%
Monthly hit rate
61.2%
worst month -23.9%

Growth of $100 (log scale)

2016-07-01 to 2026-07-03 · net of 10 bps one-way costs · weekly samples

Momentum (top 5)Mean reversion (SPY)SPY buy & hold
$80$160$320$640$1,2802016-072019-012021-072024-012026-07

Drawdown from peak

How much of the portfolio's prior peak was lost at each point — the metric that decides whether a strategy is actually livable.

Momentum (top 5)Mean reversion (SPY)SPY buy & hold
-30%-20%-10%+0%2016-072019-012021-072024-012026-07

Momentum monthly returns (%)

Blue = positive month, red = negative. Color scale is clamped at the 95th percentile so single outlier months don't wash it out.

Parameter sensitivity — Sharpe ratio

Momentum lookback (rows) × number of holdings (columns). Cells are colored relative to SPY buy-and-hold Sharpe (0.86): blue beats the benchmark. The signal is robust — every configuration clears it — which matters more than any single cell.

Current holdings as of 2026-06

AAPLAMDGOOGLGSJNJ

Method notes

The momentum signal uses the classic 12-1 construction — trailing twelve-month return, skipping the most recent month to avoid the short-term reversal effect. Signals are computed on month-end closes and positions are held the following month, so there is no look-ahead: each month's picks only use information available at the time. Prices are dividend- and split-adjusted (Yahoo Finance adjusted closes).

Limitations I'd flag in a real research note

  • Survivorship bias: the universe is 25 stocks that are large caps today, which flatters historical returns — a production backtest would use point-in-time index membership.
  • Small universe: 25 names is enough to demonstrate the machinery, not to draw statistical conclusions; the classic academic result uses thousands of stocks.
  • The negative result is real: long-only mean reversion on SPY doesn't survive costs in this sample. I left it on the page because knowing a signal doesn't work is half the job.