Overall Statistics
Total Trades
9112
Average Win
0.01%
Average Loss
-0.04%
Compounding Annual Return
2.028%
Drawdown
13.700%
Expectancy
0.008
Net Profit
2.225%
Sharpe Ratio
0.24
Probabilistic Sharpe Ratio
21.598%
Loss Rate
13%
Win Rate
87%
Profit-Loss Ratio
0.15
Alpha
-0.045
Beta
0.289
Annual Standard Deviation
0.111
Annual Variance
0.012
Information Ratio
-0.932
Tracking Error
0.237
Treynor Ratio
0.092
Total Fees
$9534.26
class QC_MACD_Indicator(QCAlgorithm):
    
        def Initialize(self):
            self.SetStartDate(2020, 1, 1)
            
            self.SetCash(1000000)
            self.AddEquity('SPY')
            self.SetBenchmark('SPY')
            self.SetBrokerageModel(AlphaStreamsBrokerageModel())
            self.SetExecution(ImmediateExecutionModel())
            self.SetRiskManagement(MaximumDrawdownPercentPerSecurity(0.05))
            
            self.AddEquity("TQQQ", Resolution.Minute)
            self.SetWarmup(100)    
            
            self.macA = self.MACD("TQQQ", 12, 26, 9, MovingAverageType.Exponential, Resolution.Minute)
            
        
        def OnData(self, data):
            if self.IsWarmingUp: return
        
            if self.macA.Current.Value < 0:
                if self.macA.Signal.Current.Value < self.macA.Current.Value:
                    self.SetHoldings("TQQQ", .1)