Skip to content
All library documents

Long-Only SMA Crossover Strategy with Fast and Slow Averages

Article Strategy library · Author: ChaoZhang

Summary

This strategy compares a fast and a slow simple moving average. A crossover of the fast average above the slow one opens a long position, while a downward crossover closes it, leaving the strategy flat otherwise. The average lengths can be changed; the published defaults are 30 periods for the fast average and 100 for the slow average. Although date inputs are provided, the source sets the date filter to always true, so the stated implementation does not actually restrict trades to that window.

The document presents the method as a basic trend-following example and gives no measured backtest results. It notes that moving-average signals lag and can cross repeatedly in choppy markets, increasing transaction costs. The rules only participate on the long side and can miss opportunities in falling or ranging markets. No stop-loss is included, so drawdowns may be substantial. Suggested extensions include risk controls, signal filters, and parameter testing across instruments and timeframes.

Key ideas

  • The strategy opens long when the fast SMA crosses above the slow SMA.
  • It exits the long position when the fast SMA crosses below the slow SMA.
  • Published defaults set the fast and slow lengths to 30 and 100 periods.
  • The supplied date inputs do not constrain trading because the filter is always enabled.
  • Lag, repeated signals in choppy markets, and lack of a stop-loss are stated limitations.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.