Overall Statistics
Total Trades
90
Average Win
1.82%
Average Loss
-1.25%
Compounding Annual Return
8.541%
Drawdown
12.000%
Expectancy
0.285
Net Profit
20.728%
Sharpe Ratio
0.686
Probabilistic Sharpe Ratio
29.379%
Loss Rate
48%
Win Rate
52%
Profit-Loss Ratio
1.46
Alpha
0.08
Beta
-0.078
Annual Standard Deviation
0.111
Annual Variance
0.012
Information Ratio
0.092
Tracking Error
0.259
Treynor Ratio
-0.976
Total Fees
$90.00
class NadionHorizontalCircuit(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2018, 1, 2)  # Set Start Date
        self.SetCash(10000)  # Set Strategy Cash
        # self.AddEquity("SPY", Resolution.Minute)
        self.ziv = self.AddEquity("SPY", Resolution.Daily)
        self.ziv.SetDataNormalizationMode(DataNormalizationMode.Raw)
    
        self.roc = self.ROC("SPY", 5, Resolution.Daily)
        self.SetWarmUp(5)
        
        
    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 self.IsWarmingUp:
            return
        
        if self.roc.Current.Value > 0:
            self.SetHoldings("SPY",1)
        else:
            self.Liquidate("SPY")
class Volatility(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2018, 1, 2)  # Set Start Date
        self.SetCash(10000)  # Set Strategy Cash
        # self.AddEquity("SPY", Resolution.Minute)
        self.ziv = self.AddEquity("ZIV", Resolution.Daily)
        self.ziv.SetDataNormalizationMode(DataNormalizationMode.Raw)
    
        self.roc = self.ROC("ZIV", 5, Resolution.Daily)
        self.SetWarmUp(5)
        
        
    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 self.IsWarmingUp:
            return
        
        if self.roc.Current.Value > 0:
            self.SetHoldings("ZIV",1)
        else:
            self.Liquidate("ZIV")