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
-0.024
Tracking Error
0.119
Treynor Ratio
0
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
class FatSkyBlueDog(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 4, 19)
        self.SetEndDate(2021, 6, 19)
        self.SetCash(100000)
        
        self.CustomUniverse = HighVolumeHasDataUniverse(self, 100, 4)
        self.UniverseSettings.Resolution = Resolution.Daily
        #Uncomment to recreate the bug
        #self.SetUniverseSelection(FineFundamentalUniverseSelectionModel(self.CustomUniverse.SelectCoarse, self.CustomUniverse.SelectFine))
        self.AddAlpha(Alpha())

    def OnData(self, data):
        pass

class HighVolumeHasDataUniverse():
    #filters stocks by age of stock, volume and has fundamental data
    #the cutoff selects how much volume it should have
    def __init__(self, algorithm, age, cutoff):
        self.algorithm = algorithm
        self.age = age
        self.cutoff = cutoff
    
    def SelectCoarse(self, coarse):
        filteredByVolume = sorted(coarse, key = lambda x: x.Volume, reverse = True)
        cutoff = int(len(filteredByVolume)/self.cutoff)
        hasFundamental = [x.Symbol for x in filteredByVolume[:cutoff] if x.HasFundamentalData]
        return hasFundamental
    
    def SelectFine(self, fine):
        fineFiltered = [x.Symbol for x in fine if int((self.algorithm.Time - x.SecurityReference.IPODate).days) >= self.age and x.SecurityReference.SecurityType == "ST00000001"]
        return fineFiltered
        
class Alpha():
    def __init__(self):
        pass

    def Update(self, algorithm, data):
        pass
                        
    def OnSecuritiesChanged(self, algorithm, changes):
        pass
class VWMAAlpha():
    def __init__(self):
        pass

    def Update(self, algorithm, data):
        pass
                        
    def OnSecuritiesChanged(self, algorithm, changes):
        pass