Hi everyone,
I am pursuing a strategy which rebalances monthly. I allocate about 30% of my portfolio to 10 momentum stocks and 70% of my portfolio to safe assets IEI, TLT and GLD. However, during my backtest, with a starting capital of 10000 and a start date of 2011, 1, 1, my algorithm triggers buys for the 10 momentum stocks, GLD, TLT but does not include IEI for some reason. Can someone please help me out? Is this issue perhaps related to lack of capital or something? Thank you!
def rebalance(self):
long_list = self.long
# complete rebalancement
if self.reb2 % 12 == 0:
# liquidate all positions
self.Liquidate()
for i in long_list:
self.SetHoldings(i, 0.3/self.num_fine)
self.SetHoldings(self.gld, 0.12)
self.SetHoldings(self.iei, 0.24)
self.SetHoldings(self.tlt, 0.34)
Gahl Goziker
Hi Ethan,
Please attach a backtest which demonstrates the issue so that we can assist more easily.
Best,
Gahl Goziker
John Fogel
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!