Skip to content
All library documents

Backtesting a Monthly Top Three Sector Momentum Strategy in QSTrader

Article QuantStart

Summary

This tutorial explains how to implement a long-only, monthly rebalanced momentum strategy with QSTrader. It ranks ten US sector ETFs by six-month holding-period return and allocates to the three strongest sectors for the next month. The example accounts for a changing asset universe because one ETF has a shorter history than the others, and it uses a burn-in period to provide enough historical data for signals.

The article walks through configuring daily price data, a data handler, signals, an alpha model, and a backtest session, then describes producing a performance tearsheet. A small cash buffer is used because the framework calculates allocations at market close but executes trades at the next market open, where price slippage may affect fills. The tutorial focuses on wiring the framework together; it gives no performance results or comparison with other strategies. Data availability, implementation details, and the chosen lookback and portfolio size limit what can be inferred from this example.

Key ideas

  • The strategy ranks sector ETFs by 126-day holding-period return and selects the top three.
  • It is long only and rebalances at the end of each month.
  • The asset universe changes when the later-starting sector ETF becomes available.
  • A burn-in period supplies historical observations before signal generation begins.
  • A cash buffer can help accommodate slippage between close-based decisions and next-open execution.

Tags

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