Overall Statistics
Total Trades
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
0%
Drawdown
0%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
-236.591
Tracking Error
0.141
Treynor Ratio
0
Total Fees
$0.00
#Return stocks with volume above XX premarket in November so far
clr.AddReference('QuantConnect.Research')
from QuantConnect.Research import QuantBook


class TachyonMultidimensionalChamber(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 11, 1)  # Set Start Date
        self.SetEndDate(2020, 11, 5)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash
        # self.AddEquity("SPY", Resolution.Minute)
        #self.AddEquity("AAPL", Resolution.Minute,  extendedMarketHours = True)
        self.AddUniverse(self.CoarseSelectionFunction)
        self.UniverseSettings.ExtendedMarketHours = True
        self.UniverseSettings.Resolution = Resolution.Minute
        

  
    def CoarseSelectionFunction(self, universe):  
        selected = []
        tickers = []
        #universe = sorted(universe, key=lambda c: c.Volume, reverse=True)  
        #universe = [c for c in universe if c.Price > 10] #[:100]

        #coarse.Value = closing price of previous day
        #coarse.Volume = volume of previous day, with start date 11/1 volume is 180368663, 190573480 on thinkorswim. self.UniverseSettings.ExtendedMarketHours T or F doesn't change this
        #len(universe) this is all stocks

        for coarse in universe:  
            #qb = QuantBook()
            #currstock = qb.AddEquity(coarse.Symbol)
            #startDate = datetime() #today, from midnight
            #endDate = datetime(2020, 11, 18) #today, until 9:29
            #df = qb.History(currstock.Symbol, startDate, endDate, Resolution.Minute)
            
            if coarse.Volume > 50000000 and coarse.Value > 10 and coarse.HasFundamentalData:
                self.Log(coarse)
                selected.append(coarse.Symbol)
                tickers.append(str(coarse.Value) + " " + str(coarse.Volume) + " " + str(coarse.Market) + " " + str(coarse.Price))
        self.Log(self.Time)
        self.Log(tickers)
        self.Log(len(tickers))
        return selected #list of objects of type Symbol
    
    
    #def OnSecuritiesChanged(self, changes):
    #    for security in changes.RemovedSecurities:
    #        self.Liquidate(security.Symbol)
    #   
    #    for security in changes.AddedSecurities:
    #        self.SetHoldings(security.Symbol, 0.10)
    
    def OnData(self, data):
        '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
            Arguments:
                data: Slice object keyed by symbol containing the stock data
        '''

        


        # if not self.Portfolio.Invested:
        #    self.SetHoldings("SPY", 1)