Overall Statistics
Total Trades
444
Average Win
0.37%
Average Loss
-0.41%
Compounding Annual Return
34.122%
Drawdown
19.100%
Expectancy
-0.003
Net Profit
14.833%
Sharpe Ratio
0.971
Probabilistic Sharpe Ratio
45.747%
Loss Rate
47%
Win Rate
53%
Profit-Loss Ratio
0.89
Alpha
-0.225
Beta
1.963
Annual Standard Deviation
0.249
Annual Variance
0.062
Information Ratio
0.022
Tracking Error
0.189
Treynor Ratio
0.123
Total Fees
$719.78
Estimated Strategy Capacity
$110000000.00
Lowest Capacity Asset
CHWY X5BUF5UE90F9
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

        #1. Set the leverage to 2
        self.UniverseSettings.Leverage = 2
       
    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:
            #2. Leave a cash buffer by setting the allocation to 0.18 instead of 0.2 
            # self.SetHoldings(security.Symbol, ...)
            self.SetHoldings(security.Symbol, 0.18)