I am currently trying to implement several Future Trend Following strategies based on Andreas Clenows book "Following The Trend", using Quantconnects new Algorithm Framework.

The strategies use simple rules to detect trends in a large, cross-sector universe of Future and a position sizing based on a risk factor and volatiliy.

The very first strategy just uses Moving Average Crosses to trigger rebalancing signals. 

The algorithm is initialized by:

class MovingAverageCrossTrendFollowing(QCAlgorithm):

def Initialize(self):
self.SetStartDate(2019, 8, 3) # Set Start Date
self.SetCash(100000) # Set Strategy Cash
# self.AddEquity("SPY", Resolution.Minute)
self.AddAlpha(EmaCrossAlphaModel(50, 200, Resolution.Minute))

self.SetExecution(ImmediateExecutionModel())

self.SetPortfolioConstruction(ATRBasedPositionSizing(riskFactor = 0.2))

self.SetRiskManagement(MaximumDrawdownPercentPerSecurity(0.01))

self.SetUniverseSelection(FuturesUniverseSelectionModel(self.SelectFuturesSymbols))

Where the FuturesUniverseSelectionModel just selects all Futures currently available through Quantconnect:

def SelectFuturesSymbols(self, utcTime):
ticker = [Futures.Indices.SP500EMini,
Futures.Grains.BlackSeaCornFinanciallySettledPlatts,
Futures.Grains.Wheat,
...
Futures.Dairy.ClassIVMilk,
Futures.Dairy.NonfatDryMilk]
return [ Symbol.Create(ticker, SecurityType.Future, Market.USA) for ticker in tickers]

Currently I get a 

Runtime Error: SystemError : <bound method 'OnWarmupFinished'> returned a result with an error set SystemError : <bound method 'OnWarmupFinished'> returned a result with an error set (Open Stacktrace)

during backtesting.

What could be the problem, here? 

Author