A bunch of orders are invalid with error code -7 (Rejected by broker).
This is most likely because the algorithm is buying assets without consideration of remaining cash.
Change from using MarketOrder method to SetHoldings method (example):
self.SetHoldings([PortfolioTarget("SPY", 0.8), PortfolioTarget("IBM", 0.2)])
A bunch of orders are invalid with error code -7 (Rejected by broker).
This is most likely because the algorithm is buying assets without consideration of remaining cash.
Change from using MarketOrder method to SetHoldings method (example):
self.SetHoldings([PortfolioTarget("SPY", 0.8), PortfolioTarget("IBM", 0.2)])