Strategies
The four built-in selection strategies — momentum, mean reversion, smart beta, Bollinger Bands — with their exact formulas, parameters, and default lookbacks.
A strategy ranks the universe at each rebalance; TradePilot then holds the
top topN symbols and hands them to the optimizer
for weighting. Four strategies ship built in
(StrategyType = 'momentum' | 'meanReversion' | 'smartBeta' | 'bollingerBands').
You can try each one live on the strategy catalog.
Momentum
Selects assets with the strongest recent price move.
Momentum(i) = P(i, latest) − P(i, latest − t)
Symbols are ranked by descending momentum. Assets with fewer than t prices
are skipped.
t— lookback in trading days (engine default10).
Mean reversion
Selects assets trading furthest below their moving average (most oversold).
Deviation(i) = P(i, latest) − SMA(i, t)
Symbols are ranked by ascending deviation, so the most negative (most
oversold) comes first. The default window is t = 20 trading days.
t/window— moving-average window in trading days (engine default20).
Smart beta
Selects assets with the best risk-adjusted return — the ratio of mean return to its standard deviation over the window.
SmartBeta(i) = mean(R_i) / std(R_i)
Ranked by descending score (std uses the population form, ddof = 0; a zero
std scores 0). Smart beta has no t; it uses the run’s window of returns.
Bollinger Bands
Selects assets that have fallen below their lower Bollinger band (the most oversold relative to their own recent volatility) and never holds assets at or above the upper band.
Middle(i) = SMA(i, t)
Upper(i) = Middle(i) + k · σ(i, t) Lower(i) = Middle(i) − k · σ(i, t)
%b(i) = (P(i, latest) − Lower(i)) / (Upper(i) − Lower(i))
Symbols with %b ≥ 1 are excluded; the rest are ranked by ascending %b,
so the furthest below the lower band comes first (σ is the population std,
ddof = 0; a zero-width band scores %b = 0.5). Like mean reversion this is a
snapshot of the latest bar, not a band-crossing event detector. Engine
function: bollingerBandsStrategy(prices, t = 20, k = 2); the indicator itself
is bollingerBands(prices, period, k) and mirrors tradepilot.metrics.bollinger_bands
in Python.
t— band window in trading days (engine default20).k— band width in standard deviations (2; not exposed in the run form).
Choosing parameters
topNcaps how many ranked assets you actually hold — smaller = more concentrated.t/windowset the memory of the signal — shorter reacts faster and trades more; longer is smoother.- Turnover interacts with transaction costs: fast signals plus real costs can erase paper gains.
To search these systematically instead of guessing, use the Lab’s
Sweep mode (t, topN, rebalanceFreq, and
window are all sweepable).
Custom & AI strategies
Saved strategies store a type, a params object, and optional code — so the
catalog also offers AI strategy templates alongside the four built-ins. See
Strategies workspace.
Related
- Optimizers — how selected assets get weighted
- Engine internals — source and Python parity