Overall Statistics
import pandas as pd

class MyAlgo(QCAlgorithm):
    def Initialize(self):
    # Reference to AAPL
        self.SetStartDate(2017,10,2)
        self.SetEndDate(2017,10,6)
        self.SetCash(1000)
        self.secs = ["AAPL", "IBM", "CAT"]
        for stock in self.secs:
            self.stock = self.AddEquity(stock)
            
        self.Log("hello")
        self.secs_df = pd.DataFrame(index=self.secs)

    def OnData(self, data):
        ''' Runs every tick defined by resolution in initialize under equity'''
        # Position 100% of our portfolio to be long in AAPL
        len_sec = len(self.secs_df)
        self.Log("total securities to trade" + str(len_sec))
        for stock in self.secs_df.index:
            self.SetHoldings(stock, 1.0/len_sec)
            shares_held = self.Portfolio[stock].AbsoluteQuantity
            self.Log('hold {:.0f} shares of {}'.format(shares_held, stock))