Overall Statistics
Total Trades
15
Average Win
0.81%
Average Loss
-0.32%
Compounding Annual Return
145.597%
Drawdown
0.600%
Expectancy
1.503
Net Profit
5.565%
Sharpe Ratio
10.539
Probabilistic Sharpe Ratio
99.863%
Loss Rate
29%
Win Rate
71%
Profit-Loss Ratio
2.50
Alpha
1.357
Beta
-0.653
Annual Standard Deviation
0.109
Annual Variance
0.012
Information Ratio
5.92
Tracking Error
0.139
Treynor Ratio
-1.755
Total Fees
$16.72
Estimated Strategy Capacity
$530000000.00
Lowest Capacity Asset
AMZN R735QTJ8XC9X
class CalmOrangeMosquito(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2021, 5, 20)
        self.SetCash(100000) 
        self.Settings.RebalancePortfolioOnSecurityChanges = False
        
        self.AddUniverse(self.coarse)
        self.UniverseSettings.Resolution = Resolution.Daily
        
        self.SetAlpha(ConstantAlphaModel(InsightType.Price, InsightDirection.Up, timedelta(minutes=30))
        )
        
        
        self.SetPortfolioConstruction( EqualWeightingPortfolioConstructionModel(lambda time: None) )
        
        self.SetExecution(ImmediateExecutionModel() )
        
        tickers = ['SPY', 'AMZN']
        self.symbols = [Symbol.Create(ticker, SecurityType.Equity, Market.USA) for ticker in tickers]
        
        self.calls = 0

    def coarse(self, coarse):
        if self.calls == 0:
            self.calls += 1
            # return SPY
            return [self.symbols[0]]
        elif self.calls == 1:
            self.calls += 1
            # return empty
            return []
        elif self.calls == 2:
            self.calls += 1
            # return amazon
            return [self.symbols[1]]
        elif self.calls == 3:
            self.calls = 0 # loop back to spy
            # return empty
            return []