Overall Statistics |
Total Trades 67 Average Win 1.03% Average Loss -1.82% Compounding Annual Return 1.980% Drawdown 12.500% Expectancy 0.092 Net Profit 10.309% Sharpe Ratio 0.286 Probabilistic Sharpe Ratio 3.711% Loss Rate 30% Win Rate 70% Profit-Loss Ratio 0.57 Alpha 0.017 Beta 0.005 Annual Standard Deviation 0.062 Annual Variance 0.004 Information Ratio -0.765 Tracking Error 0.179 Treynor Ratio 3.88 Total Fees $0.00 Estimated Strategy Capacity $580000.00 Lowest Capacity Asset EURUSD 8G |
class ForexBootCamp(QCAlgorithm): def Initialize(self): self.ticker = "EURUSD" self.period = 10; self.resolution = Resolution.Daily self.SetStartDate(2016, 6, 13) self.SetEndDate(2021, 6, 13) self.SetCash(100000) self.symbol = self.AddForex(self.ticker, self.resolution).Symbol self.rsi = self.RSI(self.symbol, self.period, MovingAverageType.Exponential, self.resolution) self.SetWarmup(self.period) def OnData(self, data): if self.IsWarmingUp: return if self.Portfolio[self.symbol].Quantity <= 0 and self.rsi.Current.Value < 30: self.SetHoldings(self.symbol, 1) elif self.Portfolio[self.symbol].Quantity >= 0 and self.rsi.Current.Value > 70: self.SetHoldings(self.symbol, -1)