Overall Statistics
Total Trades
82
Average Win
2.06%
Average Loss
-2.87%
Compounding Annual Return
55.006%
Drawdown
32.700%
Expectancy
-0.045
Net Profit
55.006%
Sharpe Ratio
1.344
Probabilistic Sharpe Ratio
64.872%
Loss Rate
44%
Win Rate
56%
Profit-Loss Ratio
0.72
Alpha
0.47
Beta
-0.293
Annual Standard Deviation
0.3
Annual Variance
0.09
Information Ratio
0.529
Tracking Error
0.332
Treynor Ratio
-1.38
Total Fees
$949.06
class MultidimensionalModulatedInterceptor(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2019, 1, 1)  # Set Start Date
        self.SetEndDate(2020, 1, 1) #Set End Date
        self.SetCash(100000)  # Set Strategy Cash
        self.UniverseSettings.Resolution = Resolution.Daily # Set Resolution to Daily
        self.AddUniverse(self.CoarseSelection, self.FineSelection)
        
        self.month = -1
        
        
    def CoarseSelection(self, coarse):
        
        if self.Time.month == self.month:
            return Universe.Unchanged
        else:
            # Filter for DollarVolume, Price and Fundamental Data availability
            filtered = [x for x in coarse if x.Price > 2 and x.HasFundamentalData]
            return [x.Symbol for x in filtered]
        
    def FineSelection(self, fine):
        
        if self.Time.month == self.month:
            return Universe.Unchanged
        else:
            
            self.month = self.Time.month
            # Filter for market cap and profitable company
            filtered = [f for f in fine if f.CompanyProfile.MarketCap > 300000000 and f.ValuationRatios.PERatio > 0]
                
            sortedByPE = sorted(filtered, key = lambda x : x.ValuationRatios.PERatio, reverse = False)
                
            sortedByPS = sorted(sortedByPE[:100], key = lambda x : x.ValuationRatios.PSRatio, reverse = False)
                
            # retrieve 10 lowest positive PS
            return [f.Symbol for f in sortedByPS][:10]
        
    def OnSecuritiesChanged(self, changes):
        
        for security in changes.RemovedSecurities:
            self.Liquidate(security.Symbol)
            
        for security in changes.AddedSecurities:
            self.SetHoldings(security.Symbol, 0.10)