Skip to content
All library documents

Building a Dual-Momentum ETF Rotation Strategy in Zorro

Article Robot Wealth

Summary

This tutorial lays out a Zorro workflow for rotating among ETFs. It describes maintaining an instrument universe in an asset list, setting a calendar-based rebalance date, loading price histories, calculating each ETF’s lookback return, ranking the results, and changing holdings based on the ranking. In the example, the portfolio selects the strongest ETF, but holds a short-term Treasury ETF when the top-ranked risk asset has a negative return.

The article includes illustrative code and a sample universe containing broad equity, international equity, and Treasury ETFs. It also shows a simple capital and margin calculation. It does not report backtest performance, transaction costs, or robustness checks, so the example demonstrates implementation structure rather than evidence that the rule is profitable. The universe, rebalance schedule, lookback, and sizing method are specific choices that would need independent evaluation.

Key ideas

  • The example ranks ETFs by their trailing price returns at scheduled rebalances.
  • It combines cross-asset ranking with a positive-return filter for the top-ranked risk asset.
  • A Treasury ETF serves as the fallback holding when the top risk asset fails that filter.
  • The tutorial focuses on coding the workflow and provides no strategy performance evaluation.

Tags

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