A trend-following strategy that rotates into the top-performing country ETFs based on 6-month price momentum, capturing persistent cross-country momentum effects.

By PyQuant News

Published: 2026-08-31

URL: https://pyquantnews.substack.com/p/your-monthly-alpha-lab-deep-dive-c11


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 and backtest a geographically diversified trend-following strategy: Momentum Factor Effect in Country Equity Indexes.

The idea is simple but powerful—rank country equity ETFs by their performance over the past six months, then invest in the markets showing the strongest momentum with the expectation that trends will persist. The strategy selects the top 5 performers from a universe of 24 developed and emerging-market ETFs, equal weights positions across the portfolio, and rebalances monthly to capture persistent cross-country momentum effects.

You’ll also walk through the full workflow in Zipline, including country ETF universe construction, 126-day momentum calculation, tradeability and data-history checks, realistic commission and slippage modeling, monthly portfolio rotation, and long-term performance analysis. By trading broad country indexes instead of individual stocks, the strategy aims to capture momentum across much larger underlying markets while maintaining geographic diversification and manageable turnover.

By the end, you’ll have a complete backtest, from momentum ranking and portfolio construction to backtest execution, plus performance evaluation using CAGR, Sharpe ratio, annualized volatility, and max drawdown.