Part II ยท Chapter 6
Trading Indicators as Filters
MA crossover signals are simple linear filters of price history. They generate buy/sell triggers but always LAG actual price moves.
Educational illustration only โ NOT investment advice.
Learning objectives
Compute short/long moving averages and crossover signals.
Interpret MAs as linear filters of price history.
Recognize that signals lag the actual price move.
Understand backtest pitfalls (data snooping, costs).
MA Crossover Lab
Seed:
Backtest readout
Number of trades: โ
Buy-and-hold return: โ %
Strategy return (no costs): โ %
Real backtests must include transaction costs, slippage, and proper train/test splits.
๐ Rules
\[ \text{Signal}_t = \begin{cases} +1 \;\; \text{(long)} & \text{if } \text{MA}^{\text{short}}_t > \text{MA}^{\text{long}}_t \\ 0 \;\; \text{(flat)} & \text{otherwise} \end{cases} \]
Cross-up short MA crosses above long โ buy
Cross-down short MA crosses below long โ sell
Lag signal arrives AFTER move
๐ What to look for
- Signals fire after the trend is already in motion โ there's no anticipation.
- In choppy / sideways markets, whipsaws create many small losses.
- Trending markets reward this strategy; mean-reverting markets punish it.
โ ๏ธ Pro Tip: What to Avoid
Student says
"My MA crossover Sharpe is 1.8 โ proven alpha."
Why this is wrong
Train/test contamination, ignored costs, regime-specific results. Many MAs were tried โ multiple-testing inflates the best Sharpe.
Correct interpretation
Report walk-forward OOS Sharpe net of realistic costs vs buy-and-hold benchmark. Most simple MA crossovers do not survive.
๐ Mini-quiz
๐ Key Takeaways
| Concept | Meaning |
|---|---|
| MA crossover | Short MA vs Long MA โ momentum signal |
| Lag | Signal fires AFTER price move |
| Whipsaw | Many quick reversals โ losses |
| Backtest danger | Data snooping inflates Sharpe |