Overall Statistics
Total Trades
450
Average Win
0.40%
Average Loss
-0.40%
Compounding Annual Return
53.430%
Drawdown
18.400%
Expectancy
0.090
Net Profit
22.345%
Sharpe Ratio
1.748
Probabilistic Sharpe Ratio
62.620%
Loss Rate
46%
Win Rate
54%
Profit-Loss Ratio
1.01
Alpha
0.424
Beta
0.198
Annual Standard Deviation
0.275
Annual Variance
0.076
Information Ratio
0.666
Tracking Error
0.287
Treynor Ratio
2.437
Total Fees
$696.03
class LiquidUniverseSelection(QCAlgorithm):
    filteredByPrice = None
    def Initialize(self):
        self.SetStartDate(2019, 1, 11)  
        self.SetEndDate(2019, 7, 1) 
        self.SetCash(100000)  
        self.AddUniverse(self.CoarseSelectionFilter)
        self.UniverseSettings.Resolution = Resolution.Daily
        #Set the leverage to 4
        self.UniverseSettings.Leverage = 4
    def CoarseSelectionFilter(self, coarse):
        sortedByDollarVolume = sorted(coarse, key=lambda c: c.DollarVolume, reverse=True)
        filteredByPrice = [c.Symbol for c in sortedByDollarVolume if c.Price > 10]
        return filteredByPrice[:10] 
    def OnSecuritiesChanged(self, changes):
        self.changes = changes
        self.Log(f"OnSecuritiesChanged({self.Time}):: {changes}")
        for security in self.changes.RemovedSecurities:
            if security.Invested:
                self.Liquidate(security.Symbol)
        for security in self.changes.AddedSecurities:
            #Leave a cash buffer by setting the allocation to 0.18 instead of 0.2 
            self.SetHoldings(security.Symbol, 0.18)