Introduction
This algorithm examines the momentum effect in country index exchange-traded funds.
Method
The algorithm picks 35 country index ETFs as the trading universe. As the symbols in the universe don't change over time, we use the MomentumPercent indicator helper method
self.MOMP(symbol, period, resolution)
. This helper method creates a new momentum percent indicator and computes the relative \(n\)-period change in the security. In contrast to the indicator constructor MomentumPercent(period)
, the helper method indicator will be automatically updated on the given resolution.
In Initialize()
, we set the warm-up period to the momentum period and create the dictionary self.data
to save the indicator of
each Symbol. On each month, the top five index ETFs with the best 6-month momentum will be selected to open long position. ETFs which are no longer in this top list will be liquidated. The Scheduled Events API is used to schedule the portfolio to rebalance at the start of each month.
Conclusion
The algorithm result shows that momentum effects do exist in the country indices. The strategy of holding for one month, a portfolio of the five best performing country indices ETFs over the previous six months, was found to out-perform the equal-weighted portfolio by around 90% per annum over the 22-year period from 2002 to 2022.
Derek Melchin
See the attached backtest for an updated version of the algorithm with the following changes:
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Jing Wu
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!