Overall Statistics |
Total Trades 533 Average Win 0.30% Average Loss -0.25% Compounding Annual Return 8855.739% Drawdown 11.600% Expectancy 0.346 Net Profit 49.754% Sharpe Ratio 40.478 Probabilistic Sharpe Ratio 87.158% Loss Rate 39% Win Rate 61% Profit-Loss Ratio 1.20 Alpha 29.639 Beta 0.326 Annual Standard Deviation 0.762 Annual Variance 0.581 Information Ratio 28.762 Tracking Error 0.943 Treynor Ratio 94.682 Total Fees $10456.42 Estimated Strategy Capacity $1800000.00 Lowest Capacity Asset AVAXUSD E3 |
from AlgorithmImports import * class CryptoCoarseFundamentalUniverseSelectionAlgorithm(QCAlgorithm): def Initialize(self): self.SetStartDate(2021, 1, 1) self.SetEndDate(2021, 2, 1) self.SetCash(100000) self.SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Cash) # Warm up the security with the last known price to avoid conversion error self.SetSecurityInitializer(lambda security: security.SetMarketPrice(self.GetLastKnownPrice(security))); self.UniverseSettings.Resolution = Resolution.Daily # Add universe selection of cryptos based on coarse fundamentals self.AddUniverse(CryptoCoarseFundamentalUniverse(Market.Bitfinex, self.UniverseSettings, self.UniverseSelectionFilter)) def UniverseSelectionFilter(self, data): filtered = [datum for datum in data if datum.Price >= 10 and datum.VolumeInUsd] sorted_by_volume_in_usd = sorted(filtered, key=lambda datum: datum.VolumeInUsd, reverse=True)[:10] return [datum.Symbol for datum in sorted_by_volume_in_usd] def OnData(self, data): for symbol in self.Securities.Keys: self.SetHoldings(symbol, 0.1) def OnSecuritiesChanged(self, changes): for security in changes.RemovedSecurities: self.Liquidate(security.Symbol)