I am trying to implement the following momentum strategy, with the following rebalancing routine:
- From three ETFs representing US, EU and Emerging Markets, select the one with the highest momentum
- if the momentum of this ETF is higher than the momentum of a treasury bills etf, invest everything in this ETF
- else, invest everything in a bond ETF
def Rebalance(self):
self.symbolObjects.sort(key=lambda symbolObject: symbolObject.Momentum.Current.Value, reverse=True)
currentLong = self.symbolObjects[0].Symbol
if self.symbolObjects[0].Momentum.Current.Value < self.tBill.Momentum.Current.Value:
currentLong = self.bonds
self.SetHoldings(currentLong, self.leverage, True)
The attached backtest shows, that my implementation does not work as intended.
Why is the US-etf sold 2 consecutive times? Why is there no position after July 2010?
Vladimir
Filib Uster
The problem is not with the code, but with the symbols you are trying to use.
In the QC database there are no such symbols: IUSA, IQQY, ENUM, IBCC.
AGGG: start trading Jan 25, 2020
Try this:
Filib Uster
Much better, thanks.
However, as European Retail Trader, I cannot buy most of the US-ETFs and need a UCIT-surrogat for each of the ETFs you use in your code. Is there a reason, why UCIT-etfs such as the ones I tried to use are not included in the QC - database?
Derek Melchin
Hi Filib,
We offer all data from US main exchanges. The reason we don't have some data may be:
If UCIT ETFs meet this criteria, we don't support it.
Best,
Derek Melchin
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.
PokerWinner
Hi Derek,
Do you plan on adding European securities at some point?
Jared Broad
Hi Pietro,
Yes eventually. For now, we're focused on stabilizing the features we have and improving documentation and tools for people to use the platform. Realistically I think it will not be in Q2 or Q3 though as the market of users interested is small relative to the US markets and its expensive data to add to the platform.
Best,
Jared
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.
Lex Nox
It could be interesting implement UCITs ETF also paying an addon if necessary (EUREX, Xetra, ETFplus), otherwise in Europe the platforn is less usefull. I hope you will implement this functionality soon.
Lex Nox
Also EURONEXT and London Stock Exchange UCITs ETFs could be usefull
Alexandre Catarino
Hi Lex Nox
Thank you for your patience.
QuantConnect has launched a WeFunder campaign to give the community more control over the priorities to implement new features such as supporting new brokerages or a security type such as European Equities.
Best regards,
Alex
Filib Uster
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!