Overall Statistics |
Total Trades 0 Average Win 0% Average Loss 0% Compounding Annual Return 48.068% Drawdown 8.700% Expectancy 0 Net Profit 10.875% Sharpe Ratio 1.824 Probabilistic Sharpe Ratio 64.002% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.102 Beta 0.262 Annual Standard Deviation 0.183 Annual Variance 0.033 Information Ratio -1.232 Tracking Error 0.447 Treynor Ratio 1.271 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset |
from System.Drawing import Color class TestAlgorithm(QCAlgorithm): def Initialize(self): self.SetStartDate(2021,6,13) self.SetEndDate(2021,9,16) self.SetCash("BTC", 1) self.btc = self.AddCrypto("BTCUSD", Resolution.Minute).Symbol self.Consolidate("BTCUSD", timedelta(minutes=15), self.FifteenMinuteBarHandler) self.SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash) self.SetWarmUp(4320, Resolution.Minute) self.smafast = self.SMA("BTCUSD", 1*1440, Resolution.Minute) self.smaslow = self.SMA("BTCUSD", 3*1440, Resolution.Minute) self.aroon = AroonOscillator(25, 25) fifteenMinuteConsolidator = TradeBarConsolidator(timedelta(minutes=15)) self.SubscriptionManager.AddConsolidator("BTCUSD", fifteenMinuteConsolidator) self.RegisterIndicator("BTCUSD", self.aroon, fifteenMinuteConsolidator) def FifteenMinuteBarHandler(self, consolidated): if self.IsWarmingUp: return if not self.aroon.IsReady: return if not self.smafast.IsReady or not self.smaslow.IsReady: return price = self.Securities["BTCUSD"].Price self.Plot("Price Plot", "Price", price) self.Plot("Price Plot", "smafast", self.smafast.Current.Value) self.Plot("Price Plot", "smaslow", self.smaslow.Current.Value) self.Plot("AROON", "aroonup", self.aroon.AroonUp.Current.Value) self.Plot("AROON", "aroondown", self.aroon.AroonDown.Current.Value)