Skip to content
All library documents

Long-Horizon Momentum for US Markets with Optional Shorting

Article Strategy library · Author: exlux

Summary

This strategy takes directional exposure in a selected US market symbol based on the sign of its long-term log return. The configurable lookback defaults to 18 months: positive momentum produces a long signal, while negative momentum produces a short signal only when shorting is enabled; otherwise the strategy stays flat. It evaluates signals on confirmed bars and changes exposure when the signal direction differs from the current position.

The script includes an optional volatility-targeting calculation with a cap on leverage, but that feature is disabled in the supplied settings. It also specifies initial capital, a commission assumption, and SPY as the default symbol. The document supplies code and configuration details rather than a strategy report: it contains no backtest results, performance measures, or discussion of market regimes. The short description at the end is truncated, so claims about broader use across instruments should not be inferred from the available material.

Key ideas

  • The default signal compares price with its level 18 months earlier using log momentum.
  • Positive momentum leads to a long position, while negative momentum leads to a short only if shorting is enabled.
  • The strategy changes positions when the signal direction differs from the current position.
  • Volatility targeting is present in the code but disabled by default.
  • The document provides assumptions and source code, but no performance evidence.

Tags

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