Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 53.872% Drawdown 32.300% Expectancy 0 Net Profit 24.860% Sharpe Ratio 1.196 Probabilistic Sharpe Ratio 46.447% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.785 Beta 0.015 Annual Standard Deviation 0.658 Annual Variance 0.433 Information Ratio 0.94 Tracking Error 0.677 Treynor Ratio 52.701 Total Fees $1.05 Estimated Strategy Capacity $210000000.00 |
class CreativeTanBison(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 9, 2) self.SetCash(100000) self.symbol = self.AddEquity("TSLA", Resolution.Daily).Symbol def OnData(self, data): if not self.Portfolio.Invested: quantity = self.CalculateOrderQuantity("TSLA", 1) self.MarketOrder("TSLA", quantity) self.Log(f"Ordering {quantity} TSLA shares at price {data[self.symbol].Price}") self.Plot("Custom", "Cash", self.Portfolio.Cash) def OnOrderEvent(self, orderEvent): if orderEvent.Status == OrderStatus.Filled: self.Log(f"Filled at price {orderEvent.FillPrice}")