Exploit momentum anomalies across multiple asset classes using market-timing filters
By PyQuant News
Published: 2026-01-31
URL: https://pyquantnews.substack.com/p/your-monthly-alpha-lab-deep-dive-673
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 multi-asset trend-following strategy that exploits momentum anomalies across asset classes.
We’ll walk through implementing Mebane Faber’s tactical asset allocation approach using Zipline Reloaded, applying a 10-month moving average filter to a diversified portfolio of ETFs (US equities, international equities, bonds, REITs, and commodities). You’ll learn to use Zipline’s pipeline system to calculate trend signals efficiently, schedule monthly rebalancing logic, and apply realistic commission and slippage models to your backtests.
The strategy uses a simple but powerful rule: hold each asset only when its price exceeds its 10-month simple moving average, equal-weight all qualifying positions, and move to cash when assets fail the trend filter.
By the end of this month’s deep dive, you’ll have a complete implementation of a market-timing strategy designed to achieve equity-like returns with bond-like volatility by avoiding major bear markets across asset classes.
