Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
13.232%
Drawdown
19.900%
Expectancy
0
Net Profit
246.696%
Sharpe Ratio
0.986
Probabilistic Sharpe Ratio
40.318%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.002
Beta
0.997
Annual Standard Deviation
0.147
Annual Variance
0.022
Information Ratio
-0.424
Tracking Error
0.005
Treynor Ratio
0.145
Total Fees
$5.54
Estimated Strategy Capacity
$6700000.00
Lowest Capacity Asset
SPY R735QTJ8XC9X
class MuscularGreenCat(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2010, 1, 1)  
        self.SetEndDate(2020, 1, 1)
        self.SetCash(100000) 
        
        spy = self.AddEquity("SPY", Resolution.Minute).Symbol
        self.sma = SimpleMovingAverage(100)
        
        selectUserDefinedConsolidator = True
        
        if selectUserDefinedConsolidator:
            consolidator = TradeBarConsolidator(1)
            consolidator.DataConsolidated += self.OnDataConsolidated
            self.SubscriptionManager.AddConsolidator(spy, consolidator)
        else:
            self.RegisterIndicator(spy, self.sma, Resolution.Minute)
            
        
   
    def OnDataConsolidated(self, sender, bar):
        self.sma.Update(bar.EndTime, bar.Close)
        
        

    def OnData(self, data):
        if not self.Portfolio.Invested and self.sma.IsReady:
            self.SetHoldings("SPY", 1)