Overall Statistics |
Total Trades 4 Average Win 0.16% Average Loss -11.83% Compounding Annual Return -11.660% Drawdown 19.900% Expectancy -0.493 Net Profit -11.690% Sharpe Ratio -0.748 Probabilistic Sharpe Ratio 1.441% Loss Rate 50% Win Rate 50% Profit-Loss Ratio 0.01 Alpha -0.055 Beta -0.136 Annual Standard Deviation 0.103 Annual Variance 0.011 Information Ratio -0.742 Tracking Error 0.33 Treynor Ratio 0.568 Total Fees $140.00 Estimated Strategy Capacity $260000000.00 Lowest Capacity Asset GOOCV VP83T1ZUHROL Portfolio Turnover 0.73% |
# region imports from AlgorithmImports import * # endregion class GeekySkyBlueGorilla(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 1, 1) # Set Start Date self.SetEndDate(2021, 1, 1) # Set End Date self.SetCash(1000000) # Set Strategy Cash self.goog = self.AddEquity("GOOG", Resolution.Daily).Symbol self.amzn = self.AddEquity("AMZN", Resolution.Daily).Symbol self.FirstDay = None def OnData(self, data: Slice): if self.FirstDay is None: self.FirstDay = {self.goog:data[self.goog].Price, self.amzn:data[self.amzn].Price} self.LimitOrder(self.goog, 6000, self.FirstDay[self.goog]*0.95) self.LimitOrder(self.amzn, -8000, self.FirstDay[self.amzn]*1.05) pct_change = lambda old,new: (new-old)/old self.Change = {self.goog: pct_change(self.FirstDay[self.goog],data[self.goog].Price), self.amzn: pct_change(self.FirstDay[self.amzn],data[self.amzn].Price),} self.Plot('Changes',self.goog.Value, self.Change[self.goog]) self.Plot('Changes',self.amzn.Value, self.Change[self.amzn]) if self.Portfolio.Invested and self.Portfolio.TotalUnrealizedProfit < -100000: self.Liquidate()