Lesson 7 · 22 min
Classic strategies in the library
Momentum, trend, mean reversion, risk parity — the patterns behind 1,700+ Quant Buffet strategies.
MomentumMean reversionTemplates
Most published quant ideas fall into a small set of families. Quant Buffet encodes them as `backtest.templates` and as custom code in the strategy library. Recognizing the family helps you read any article faster.
Momentum
Winners keep winning over 3–12 month horizons. Library favorite: dual_momentum (623 strategies).
Quant Buffet templates: abs_momentumdual_momentummomentum_rotation
Watch out: Crash risk when trends reverse sharply (2009, 2020).
Template cheat sheet
| Template | Economic story | Library share |
|---|---|---|
dual_momentum | Pick best asset, but go to cash if trend weak | ~35% of catalog |
abs_momentum | Own recent winners equally | ~19% |
momentum_rotation | Rotate into top-N performers monthly | ~14% |
sma_trend | Only hold assets above long average | ~13% |
equal_weight | Diversify naively, rebalance | ~11% |
mean_reversion | Buy oversold z-scores | ~6% |
vol_target / risk_parity | Scale or balance by volatility | Rare but important |
Your first hands-on path
- Finish Lesson 1–6 checklists.
- Open API docs → Examples and paste the minimal SMA strategy into the lab.
- Browse Strategy Library filtered by momentum or mean reversion.
- Change
ASSETSto aMULTI_ASSETbook and re-run — watch Sharpe vs drawdown. - Read the academic paper linked on the strategy page — compare proxy to original.
from backtest.templates import make_dual_momentum
ASSETS = ["SPY", "EFA", "EEM", "TLT", "GLD", "BIL"]
def make_on_day(prices):
return make_dual_momentum(prices, ASSETS, {"lookback": 252, "top_n": 1})Course complete — you can now
- Explain how daily data flows into `make_on_day`.
- Name major asset classes and pick ETF proxies from universes.
- Describe broker / venue / platform layers and cost models.
- Contrast order types with Quant Buffet's weight-based execution.
- Interpret Sharpe & drawdown and fix common lab errors.
- Identify momentum, trend, mean reversion, and risk templates in the library.