Overall Statistics
Total Trades
13
Average Win
0%
Average Loss
-5.52%
Compounding Annual Return
13.606%
Drawdown
24.400%
Expectancy
-1
Net Profit
3.809%
Sharpe Ratio
0.505
Probabilistic Sharpe Ratio
37.409%
Loss Rate
100%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.216
Beta
-0.245
Annual Standard Deviation
0.429
Annual Variance
0.184
Information Ratio
0.284
Tracking Error
0.765
Treynor Ratio
-0.884
Total Fees
$17.87
class VerticalNadionGearbox(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 2, 20)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash
        
        symbols = [ Symbol.Create("SPY", SecurityType.Equity, Market.USA) ]
        self.SetUniverseSelection( ManualUniverseSelectionModel(symbols) )
        self.UniverseSettings.Resolution = Resolution.Daily
        
        self.AddAlpha(MyAlphaModel())
        
        self.SetPortfolioConstruction(EqualWeightingPortfolioConstructionModel())
        
        self.SetRiskManagement(MaximumDrawdownPercentPerSecurity(0.05))
        
        self.SetExecution(ImmediateExecutionModel())


    def OnData(self, data):
        pass
        
class MyAlphaModel(AlphaModel):
    emitted = False
    
    def Update(self, algorithm, data):
        if self.emitted:
            return []
        else:
            self.emitted = True
            return [Insight.Price("SPY", timedelta(365), InsightDirection.Up)]