Overall Statistics |
Total Trades 2209 Average Win 0.22% Average Loss -0.33% Compounding Annual Return 19.487% Drawdown 32.700% Expectancy 0.223 Net Profit 164.230% Sharpe Ratio 0.825 Probabilistic Sharpe Ratio 26.213% Loss Rate 26% Win Rate 74% Profit-Loss Ratio 0.66 Alpha 0.007 Beta 1.052 Annual Standard Deviation 0.181 Annual Variance 0.033 Information Ratio 0.166 Tracking Error 0.087 Treynor Ratio 0.142 Total Fees $59224.08 Estimated Strategy Capacity $8100000.00 Lowest Capacity Asset CHTR UPXX4G43SIN9 |
# Top Dollar Volume Universe class TopDollarVolumeUniverse(QCAlgorithm): def Initialize(self): self.SetStartDate(2016, 6, 24) self.SetEndDate(2021, 12, 6) self.SetCash(10000000) self.filtered = [] self.UniverseSettings.Resolution = Resolution.Minute self.AddUniverse(self.LiquidWithFundamentalsFilter) self.spy = self.AddEquity("SPY",Resolution.Daily) self.Schedule.On(self.DateRules.MonthStart("SPY"), self.TimeRules.AfterMarketOpen("SPY", 10), self.RefactorPortfolio) def LiquidWithFundamentalsFilter(self, coarse): sortedByDollarVolume = sorted(coarse, key=lambda x: x.DollarVolume, reverse=True) self.filtered = [ x.Symbol for x in sortedByDollarVolume if x.Price > 10 and x.DollarVolume > 10000000 and x.HasFundamentalData][:25] return self.filtered def RefactorPortfolio(self): selected = [] for sec in self.filtered: selected.append(sec) for sec in self.Portfolio.Keys: if sec not in selected: self.SetHoldings(sec, 0) for sec in selected: self.SetHoldings(sec, 0.95/len(selected)) self.Plot("Securities", "selected", len(selected))