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 -2.917 Tracking Error 0.188 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset |
# https://www.quantconnect.com/forum/discussion/12180/crypto-universe/p1 class AlertRedOrangeMule(QCAlgorithm): def Initialize(self): self.SetStartDate(2022, 3, 1) self.SetEndDate(2022, 4, 2) self.SetCash(100000) self.volumeBySymbol = {} cryptos = ["BTCUSD", "LTCUSD", "LTCBTC", "ETHUSD", "ETHBTC", "ETCBTC", "ETCUSD", "RRTUSD", "ZECUSD", "ZECBTC", "XMRUSD", "XMRBTC", "DASHBTC", "BTCEUR", "BTCJPY", "XRPUSD", "XRPBTC", "IOTAUSD", "IOTABTC", "IOTAETH", "EOSUSD", "EOSETH", "SANUSD", "SANBTC", "SANETH", "OMGUSD", "OMGBTC", "OMGETH", "BCHABCUSD"] self.cryptos = [self.AddCrypto(ticker, Resolution.Daily, Market.Bitfinex).Symbol for ticker in cryptos] for crypto in self.cryptos: bband = self.BB(crypto, 21, 2, MovingAverageType.Simple, Resolution.Daily) price = self.Securities[crypto].Price lower_band = bband.LowerBand.Current.Value upper_band = bband.UpperBand.Current.Value if price < lower_band or price > upper_band: continue self.volumeBySymbol[crypto] = self.SMA(crypto, 21, Resolution.Daily, Field.Volume) self.SetWarmUp(42, Resolution.Daily) self.Schedule.On(self.DateRules.EveryDay("BTCUSD"), self.TimeRules.At(0, 1), self.HighestVolumeFilter) def HighestVolumeFilter(self): if self.IsWarmingUp: return sort_ = sorted(self.volumeBySymbol.items(), key=lambda x: x[1].Current.Value, reverse=True)[:5] self.customUniverse = [x[0] for x in sort_] self.Log(f"Selected universe contains {[x.Value for x in self.customUniverse]}.")