Overall Statistics |
Total Trades 8200 Average Win 0.04% Average Loss -0.04% Compounding Annual Return -1.612% Drawdown 62.300% Expectancy -0.102 Net Profit -8.564% Sharpe Ratio 0.086 Probabilistic Sharpe Ratio 1.627% Loss Rate 57% Win Rate 43% Profit-Loss Ratio 1.07 Alpha -0.118 Beta 0.775 Annual Standard Deviation 0.279 Annual Variance 0.078 Information Ratio -0.654 Tracking Error 0.244 Treynor Ratio 0.031 Total Fees $8229.72 Estimated Strategy Capacity $1200000.00 Lowest Capacity Asset OXY R735QTJ8XC9X |
class AlertYellowGreenAnguilline(QCAlgorithm): def Initialize(self): self.SetStartDate(2016, 3, 30) # Set Start Date self.SetCash(100000) # Set Strategy Cash self.pair1 = self.AddEquity("VLO", Resolution.Hour).Symbol self.pair2 = self.AddEquity("OXY", Resolution.Hour).Symbol self.sma1 = self.SMA(self.pair1, 14, Resolution.Daily) self.sma2 = self.SMA(self.pair2, 14, Resolution.Daily) self.AutomaticIndicatorWarmUp = True def OnData(self, data): if self.sma1.Current.Value > self.sma2.Current.Value: self.SetHoldings(self.pair2, 0.5) self.SetHoldings(self.pair1, 0) elif self.sma1.Current.Value < self.sma2.Current.Value: self.SetHoldings(self.pair1, 0.5) self.SetHoldings(self.pair2, 0)