Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
134.871%
Drawdown
99.900%
Expectancy
0
Net Profit
7639.088%
Sharpe Ratio
1.904
Probabilistic Sharpe Ratio
74.766%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
1.144
Beta
0.609
Annual Standard Deviation
0.638
Annual Variance
0.406
Information Ratio
1.735
Tracking Error
0.633
Treynor Ratio
1.992
Total Fees
$1991.02
Estimated Strategy Capacity
$2000.00
Lowest Capacity Asset
BTCUSD XJ
from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Algorithm")
AddReference("QuantConnect.Common")

from System import *
from QuantConnect import *
from QuantConnect.Algorithm import *
from QuantConnect.Indicators import *
from QuantConnect.Data.Market import TradeBar

class RollingWindowAlgorithm(QCAlgorithm):

    def Initialize(self):
        '''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''

        self.SetStartDate(2016,1,1)  #Set Start Date
        self.SetEndDate(2021, 2, 1)
        self.SetCash(1000000)           #Set Strategy Cash

        self.symbol = self.AddCrypto("BTCUSD", Resolution.Minute,Market.GDAX).Symbol

#################################
        self.SetBrokerageModel(BrokerageName.AlphaStreams)

             
                    
                     
      #########################################################################################
  
  
 ### ENTRY & EXIT ---------------------------------------------------------------------------------
    def OnData(self,data): # Entry
        self.Log("Entry")
        if not self.Portfolio.Invested:
            self.SetHoldings(self.symbol, 1)