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 -0.912 Tracking Error 0.116 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(2021, 1, 1) # Set Start Date self.SetEndDate(2021, 1, 15) self.SetCash(100000) # Set Strategy Cash self.volumeBySymbol = {} # example 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"] market = Market.Bitfinex for ticker in cryptos: symbol = self.AddCrypto(ticker, Resolution.Minute, market).Symbol bband = self.BB(symbol, 1, MovingAverageType.Simple, Resolution.Daily) price = self.Securities[symbol].Price lower_band = bband.LowerBand.Current.Value upper_band = bband.UpperBand.Current.Value if price > lower_band and price < upper_band: self.volumeBySymbol[symbol] = self.SMA(symbol, 1, Resolution.Daily, Field.Volume) else: continue self.SetWarmUp(timedelta(days=1)) self.Schedule.On(self.DateRules.EveryDay("BTCUSD"), self.TimeRules.At(0, 1), self.HighestVolumeFilter) def HighestVolumeFilter(self): sort_ = sorted(self.volumeBySymbol.items(), key=lambda x: x[1].Current.Value, reverse=True)[:10] self.customUniverse = [x[0] for x in sort_] self.Log(f"Selected universe contains {[x.Value for x in self.customUniverse]}.")