Overall Statistics
Total Trades
4
Average Win
0.51%
Average Loss
0%
Compounding Annual Return
2.045%
Drawdown
1.600%
Expectancy
0
Net Profit
1.020%
Sharpe Ratio
0.572
Probabilistic Sharpe Ratio
37.290%
Loss Rate
0%
Win Rate
100%
Profit-Loss Ratio
0
Alpha
0.015
Beta
0.008
Annual Standard Deviation
0.031
Annual Variance
0.001
Information Ratio
-2.029
Tracking Error
0.125
Treynor Ratio
2.261
Total Fees
$4.00
Estimated Strategy Capacity
$650000000.00
Lowest Capacity Asset
AMZN R735QTJ8XC9X
class CalmOrangeMosquito(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 12, 8)
        self.SetCash(100000) 
        
        self.AddAlpha(MyAlpha())
        
        self.Settings.RebalancePortfolioOnSecurityChanges = False
        
        self.AddUniverse(self.coarse)
        self.UniverseSettings.Resolution = Resolution.Daily
        
        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):
        self.calls += 1
        if self.calls == 1:
            return self.symbols
        return self.symbols[:1]
        
class MyAlpha(AlphaModel):
    symbols = []
    emitted = False

    def Update(self, algorithm, data):
        if self.emitted:
            return []
        self.emitted = True
        return [Insight.Price(symbol, timedelta(days=10), InsightDirection.Up) for symbol in self.symbols]

    def OnSecuritiesChanged(self, algorithm, changes):
        for security in changes.AddedSecurities:
            self.symbols.append(security.Symbol)
        
        for security in changes.RemovedSecurities:
            algorithm.Debug(f"Removed {security.Symbol}")