Ranks 10 sector ETFs by 12-month momentum and invests equally in the top 3 performers, rebalancing monthly.
Published: 2026-03-31
URL: https://pyquantnews.substack.com/p/your-monthly-alpha-lab-deep-dive-bad
Welcome to your monthly Alpha Lab deep dive. At the end of each month, you’ll get a deep dive featuring Python code to backtest and analyze a live trading strategy. Remember, you can also drive the conversation and support topics your way. Create new threads to start conversations about the code, strategies, and topics you care about.
In this month’s deep dive inside PyQuant News Alpha Lab, you’ll build a sector momentum rotational strategy designed to systematically capture strength as market leadership shifts over time. We’ll walk through implementing a 12-month momentum ranking model in Python, using a 10-sector ETF universe (VNQ, XLK, XLE, XLV, XLF, XLI, XLB, XLY, XLP, XLU). You’ll rank all sectors monthly by ROC and execute backtest trades based on relative strength.
The strategy follows a simple, repeatable rule set: rank sectors by 12-month momentum, invest equally in the top 3 performers, and rebalance monthly on the first trading day—selling any sectors that fall out of the top group and rotating into the new leaders.
By the end of this deep dive, you’ll have a complete backtest workflow—from strategy logic to performance evaluation—covering key metrics like CAGR, Sharpe ratio, annualized volatility, and maximum drawdown, so you can assess whether the approach meaningfully improves on a buy-and-hold benchmark.