Hi all, 

I have just started studying Quantconnect, i did the bootcamps but i'm trying to deal directly with the algorithmic framework as it is more in line with my thinking (separation of concerns). 

I am trying to write an algo purely for debugging purposes. I have to admit that one of the biggest challenges for me is to understand which data is spit out of the different event handlers. Would you have any hint on how to overcome this issue? I suspect that this is because everything here is treated as a “complex” object and therefore cannot be represented just by a pandas dataframe. You need to look into the objects to find which methods are actually returning one. 

In the below algo i cannot start the backtest as it stops automatically after processing the execution method. Would you have an idea of why? Unfortunately i cannot attach any backtest as it returns “[STOPPED] Backtest stopped”

from AlgorithmImports import *
class LiquidValueStocks(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2017, 5, 15)
        self.SetEndDate(2017, 9, 15)
        self.SetCash(100000)
        symbols = [Symbol.Create("CL", SecurityType.Future, Market.NYMEX), Symbol.Create("NG", SecurityType.Future, Market.NYMEX)]
        self.AddUniverseSelection(ManualUniverseSelectionModel(symbols))
        self.SetAlpha(CarverModel())
        self.SetPortfolioConstruction(EqualWeightingPortfolioConstructionModel())
        self.SetExecution(ImmediateExecutionModel())
        #self.UniverseSettings.dataNormalizationMode = DataNormalizationMode.BackwardsPanamaCanal

class CarverModel(AlphaModel):

    def __init__(self):
        self.data = []

    def OnData(self, data):
        for symbol, symbol_data in self.data.items():
            if slice.Bars.ContainsKey(symbol):
                return

    def OnSecuritiesChanged(self, algorithm, changes):
        self.data = [x for x in changes.AddedSecurities]
        return
    
    def Update(self, algorithm, data):
        return 
class SymbolData:

    def __init__(self, algorithm, future):
        self._future = future
        self.Symbol = future.Symbol
        self.dch = DonchianChannel(100,35)
        algorithm.WarmUpIndicator(self.Symbol, self.dch, Resolution.Daily)
    
    @property
    def Update(self, bar):
        self.dch.Update(bar.EndTime, bar.Close)
    
    @property
    def Multiplier(self):
        return self._future.SymbolProperties.ContractMultiplier
    
    @property
    def Value(self):
        if self.dch.IsReady:
            return self.dch.Current.Value