Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
22.516%
Drawdown
25.300%
Expectancy
0
Net Profit
22.971%
Sharpe Ratio
1.053
Probabilistic Sharpe Ratio
45.903%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.173
Beta
1.314
Annual Standard Deviation
0.35
Annual Variance
0.123
Information Ratio
0.703
Tracking Error
0.313
Treynor Ratio
0.281
Total Fees
$10.74
Estimated Strategy Capacity
$1100000.00
class MuscularVioletDolphin(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2017, 5, 25)  # Set Start Date
        self.SetEndDate(2018, 5, 31)
        self.SetCash(100000)  # Set Strategy Cash
        self.AddEquity("HES", Resolution.Hour)
        self.AddAlpha(MyAlpha())
        self.SetPortfolioConstruction(EqualWeightingPortfolioConstructionModel(lambda time: None))
        self.SetExecution( ImmediateExecutionModel() ) 

class MyAlpha(AlphaModel):
    symbol = None
    emitted = False
    
    def Update(self, algorithm, data):
        if self.emitted:
            return []
        self.emitted = True
        return [Insight.Price(self.symbol, timedelta(days=365), InsightDirection.Up)]
    
    def OnSecuritiesChanged(self, algorithm, changes):
        for security in changes.AddedSecurities:
            self.symbol = security.Symbol