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.
Growth of $100 (log scale)
2016-07-01 to 2026-07-03 · net of 10 bps one-way costs · weekly samples
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 monthly returns (%)
Blue = positive month, red = negative. Color scale is clamped at the 95th percentile so single outlier months don't wash it out.
| Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2026 | 6.1 | -5.5 | -3.2 | 25.2 | 8.0 | 2.9 | 0.1 | |||||
| 2025 | 5.8 | -5.5 | -10.7 | 7.5 | 10.9 | -1.3 | -3.2 | -1.8 | 13.2 | -1.1 | -5.8 | 1.1 |
| 2024 | 4.9 | 16.8 | 1.1 | -7.8 | 11.6 | 7.2 | -3.2 | 4.6 | 0.7 | 5.4 | 7.0 | -1.5 |
| 2023 | -2.0 | -4.4 | 1.4 | 5.6 | 9.6 | 10.0 | 4.1 | -1.5 | -8.7 | -0.4 | 13.0 | 4.0 |
| 2022 | -7.0 | -3.5 | 6.1 | -13.6 | 4.7 | -9.5 | 5.2 | -4.9 | -5.3 | 15.9 | 2.8 | -2.0 |
| 2021 | 0.8 | -4.4 | -1.7 | 6.9 | -1.2 | 8.2 | -2.2 | 9.6 | -2.9 | 15.7 | -4.6 | -2.6 |
| 2020 | 3.0 | -2.9 | -6.0 | 20.8 | 8.5 | 11.9 | 21.8 | 28.8 | -7.8 | -6.8 | 17.6 | 6.9 |
| 2019 | 16.5 | 3.1 | 2.4 | 4.4 | -3.7 | 6.5 | 3.1 | 2.7 | -1.5 | -0.4 | 3.1 | 6.0 |
| 2018 | 21.4 | -2.8 | -2.0 | 3.6 | 8.4 | 2.2 | 0.3 | 11.0 | 1.6 | -23.9 | 5.3 | -9.2 |
| 2017 | -1.6 | 10.9 | -1.2 | -3.3 | 6.2 | 1.3 | 9.3 | 1.2 | 2.0 | 3.0 | -2.1 | -0.5 |
| 2016 | 16.4 | 2.4 | 2.9 | 1.5 | 7.7 | 7.8 |
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.
| Top 3 | Top 5 | Top 8 | Top 10 | |
|---|---|---|---|---|
| 3-month | 1.12 | 1.24 | 1.23 | 1.22 |
| 6-month | 1.48 | 1.22 | 1.09 | 1.09 |
| 9-month | 1.11 | 1.06 | 1.10 | 1.16 |
| 12-month | 1.26 | 1.21 | 1.13 | 1.08 |
Current holdings as of 2026-06
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.