Trend Following Filters and Breakout Rules
Economic framing
Breakout systems enter when price crosses a prior high or low, expressing the hypothesis that large directional moves tend to persist. A 20-day channel reacts sooner than a 100-day channel but pays more whipsaw. The apparent simplicity hides choices on futures rolls, stop treatment, execution timing, and whether the breakout includes the current bar.
The key modeling distinction is between a descriptive relationship and an investable return. A signal can be economically coherent, statistically significant, and still fail after its publication lag, financing, roll conventions, spreads, and capacity limits. Define returns in the investor’s base currency and make the signal available only when its inputs could genuinely have been observed.
Signal construction
Implement signals from lagged, executable closes. Combine channels across horizons or require confirmation from a moving-average and volatility filter. Size positions by forecast volatility rather than contract count, then impose a portfolio-level risk target and correlation limits. Exit rules should be evaluated jointly with entry rules; a faster exit may reduce drawdown while truncating the rare large trend that finances the system.
| Component | Robust implementation | Common failure |
|---|---|---|
| Universe | Tradable instruments with history | Survivorship and stale quotes |
| Signal | Lagged, normalized, winsorized | Looking through revisions |
| Sizing | Volatility and liquidity aware | Equal notional concentration |
| Execution | Dated contracts and conservative costs | Mid-price backtest |
import numpy as np
import pandas as pd
def bounded_position(signal: pd.Series, vol: pd.Series, target=.10):
z = signal.clip(-2, 2) / 2
raw = z * target / vol.clip(lower=.03)
return raw.clip(-.20, .20)
The code is deliberately only a position transform. Production research needs a separate data-validation layer, an instrument master, expiry-aware pricing, and a reproducible version of every input.
Portfolio and risk controls
Test across unselected markets and include conservative slippage around breakouts, where liquidity can be worst. Track hit rate, average win/loss, time in market, tail contribution, and exposure by asset class. Breakout trading strategy details channel mechanics; managed futures and CTA strategies shows how to diversify the resulting sleeves.
| Risk | Diagnostic | Control |
|---|---|---|
| Model risk | Subperiod and parameter dispersion | Ensemble and shrinkage |
| Liquidity | Spread and turnover under stress | Capacity and participation caps |
| Tail loss | Scenario expected shortfall | Gross and factor limits |
| Operational | Missing marks or contract changes | Exceptions and reconciliation |
Research protocol
Use walk-forward evaluation rather than choosing parameters on the full sample. Preserve delisted instruments where relevant, use the actual rebalance calendar, and examine signal decay after a realistic delay. Report gross and net Sharpe, drawdown, expected shortfall, turnover, leverage, and exposures—not only a cumulative chart. A useful falsification test is to perturb lookbacks, rebalance dates, and reasonable cost assumptions; a fragile result should not receive the same capital as an effect that survives those variations.
Separate alpha from risk transformation. Volatility targeting can improve comparability, yet it may mechanically add leverage after quiet periods. Attribution should explain whether returns came from directional beta, carry, convexity, rebalancing, or the intended signal. Governance requires pre-specified limits and an escalation path when data or liquidity assumptions fail.
Key takeaways
- Treat the signal as a conditional forecast, not a permanent economic law.
- Use lagged, executable data and include financing, rolls, and conservative transaction costs.
- Size from risk and liquidity, then control common factors and stressed correlation.
- Favor designs that remain credible after parameter, cost, and regime perturbations.
Measurement details
A practical model records the observation timestamp, the decision timestamp, and the execution timestamp separately. This prevents accidental use of a fixing, macro release, or option quote that was unavailable when the trade would have been placed. Transform raw inputs into robust percentiles or z-scores within a stable universe, and freeze the cross-sectional membership at each rebalance.
| Test | Question answered | Passing evidence |
|---|---|---|
| Availability | Was the input known? | Timestamped source and lag |
| Stability | Is one parameter decisive? | Similar results in a parameter neighborhood |
| Costs | Does the edge survive trading? | Net return at stressed spreads |
| Capacity | Can intended size trade? | Volume and market-impact budget |
Do not infer causality from a favorable in-sample regression. The relationship may proxy for a broad risk premium, and its payoff can vanish when the portfolio is most crowded. Use a holdout period and a paper-trading reconciliation before production capital.
