Momentum
One-minute bars are resampled to 15-minute bars. Entry requires two conditions at once: the fast EMA (20 resampled bars) above the slow EMA (60), and the close at or above the 40-bar Donchian high — trend plus breakout, so neither signal fires alone. Position size is capital · min(1, target_vol / realized_vol): when annualised realized volatility exceeds the 60% target, exposure shrinks proportionally.
Exit
Two exits, whichever comes first: price dropping more than 3 × ATR(14) below the peak since entry (trailing stop), or the fast EMA crossing back under the slow (trend gone). Both flatten the whole position.
| Parameter | Default | Meaning |
|---|---|---|
| fast / slow | 20 / 60 | EMA spans on 15-minute resampled closes. |
| breakout | 40 | Donchian-high lookback (resampled bars). |
| atr_period / atr_mult | 14 / 3.0 | Trailing stop: peak minus mult × ATR. |
| target_vol | 0.60 | Annualised volatility target for sizing. |
| resample_min | 15 | Resample interval in minutes. |
Known failure modes
Chop is the tax: repeated entry-stop round trips bleed fees while the trend filter is technically satisfied. The volatility estimate shares the slow EMA's 60-bar span, so early in a session it is noisy and sizing can be too confident until the lookback fills.