← Back to Docs
STRATEGY TEMPLATES
The SDK ships 8 reference templates under packages/strategy-sdk/templates/. Each is a complete, runnable Strategy subclass with an academic rationale. Clone one when creating a new strategy and customize the universe, lookbacks, and weighting.
Long-Only
| Template | Book | Logic |
|---|---|---|
momentum_rankingJegadeesh & Titman (1993) — momentum anomaly. | Long-only | Rank the universe by 6-month (126d) trailing return; hold the top names, equal weight. |
mean_reversionDeBondt & Thaler (1985); Lehmann (1990) — short-horizon reversal. | Long-only | Rank by 3-month (63d) return; buy the laggards expecting reversion. |
sector_rotationMoskowitz & Grinblatt (1999) — sector momentum. | Long-only | Group by sector, rank sectors by average 3-month return, tilt toward leaders. |
value_qualityFama-French (1992) value + Novy-Marx (2013) quality. | Long-only | Composite of low price-to-fundamentals and high profitability / low leverage. |
Long-Short
| Template | Book | Logic |
|---|---|---|
long_short_momentumJegadeesh & Titman (1993) — momentum on both tails. | Long-short (130/30) | Long winners, short losers by 6-month return; ~100% net exposure. |
long_short_mean_revLehmann (1990) reversal vs. momentum continuation. | Long-short (130/30) | Long short-term losers, short overextended winners. |
long_short_pairsGatev, Goetzmann & Rouwenhorst (2006) — relative value. | Long-short | Bet on convergence of diverging correlated names (return-rank proxy). |
long_short_sector_neutralStandard quant construction (AQR, Two Sigma). | Long-short (sector-neutral) | Long/short within each sector to isolate stock-selection alpha. |
How to Use a Template
- Create a new strategy and choose "Browse Templates".
- Pick a template — its code loads into the editor.
- Adjust parameters, then run a backtest.
See the First Backtest tutorial and Long-Short Strategies.