Overall Statistics
Total Trades
21
Average Win
1.40%
Average Loss
-0.85%
Compounding Annual Return
10.523%
Drawdown
5.200%
Expectancy
1.115
Net Profit
5.193%
Sharpe Ratio
1.096
Probabilistic Sharpe Ratio
51.946%
Loss Rate
20%
Win Rate
80%
Profit-Loss Ratio
1.64
Alpha
0.035
Beta
0.383
Annual Standard Deviation
0.068
Annual Variance
0.005
Information Ratio
-0.344
Tracking Error
0.086
Treynor Ratio
0.194
Total Fees
$24.54
Estimated Strategy Capacity
$460000000.00
Lowest Capacity Asset
SPY R735QTJ8XC9X
class HyperActiveTanCaribou(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 7, 19)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash
        self.spy = self.AddEquity("SPY", Resolution.Hour).Symbol
        self.sma  = self.SMA(self.spy,1,Resolution.Daily)

    def OnData(self, data):
        '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
            Arguments:
                data: Slice object keyed by symbol containing the stock data
        '''
        if not self.spy in data.Bars or not self.sma.IsReady:return
        if not self.Portfolio.Invested and (self.sma.Current.Value-data.Bars[self.spy].Close)/ self.sma.Current.Value>0.01:
            self.SetHoldings("SPY", 1)
        if self.Portfolio.Invested and (data.Bars[self.spy].Close-self.sma.Current.Value)/ self.sma.Current.Value>0.01:
            self.Liquidate()