from QuantConnect import * from QuantConnect.Indicators import * from QuantConnect.Algorithm import * from QuantConnect.Algorithm.Framework import * from QuantConnect.Algorithm.Framework.Alphas import * from Alphas.RsiAlphaModel import RsiAlphaModel from Portfolio.MeanVarianceOptimizationPortfolioConstructionModel import MeanVarianceOptimizationPortfolioConstructionModel from Execution.ImmediateExecutionModel import ImmediateExecutionModel from Risk.MaximumSectorExposureRiskManagementModel import MaximumSectorExposureRiskManagementModel from clr import AddReference AddReference("QuantConnect.Common") AddReference("QuantConnect.Algorithm") AddReference("QuantConnect.Algorithm.Framework") AddReference("QuantConnect.Indicators") import datetime from alpha import * from collections import deque class BasicTemplateFrameworkAlgorithm(QCAlgorithmFramework): def Initialize(self): # Set requested data resolution self.UniverseSettings.Resolution = Resolution.Daily self.SetStartDate(2014, 7, 18) #Set Start Date self.SetEndDate(2019, 1, 18) #Set End Date self.SetCash(100000) #Set Strategy Cash #self.SetUniverseSelection(FineFundamentalUniverseSelectionModel(self.CoarseSelectionFunction, self.FineSelectionFunction, None, None)) #QC500UniverseSelectionModel self.SetUniverseSelection(QC500UniverseSelectionModel()) #self.SetAlpha(MyAplhaTest(14, Resolution.Daily)) self.SetAlpha(RsiAlphaModel(15, Resolution.Daily)) self.SetPortfolioConstruction(EqualWeightingPortfolioConstructionModel()) #MeanVarianceOptimizationPortfolioConstructionModel, EqualWeightingPortfolioConstructionModel self.SetExecution(ImmediateExecutionModel()) self.SetRiskManagement(MaximumSectorExposureRiskManagementModel()) # sort the data by daily dollar volume and take the top 'NumberOfSymbols' def OnOrderEvent(self, orderEvent): if orderEvent.Status == OrderStatus.Filled: #self.Debug("Purchased Stock: {0}".format(orderEvent.Symbol)) pass

Hi, 

trying to run a framework algorithm. The default setup works till certain point (selection, trading, etc), then I get an error (Sequence contains no elements).