Overall Statistics |
Total Orders 1 Average Win 0% Average Loss 0% Compounding Annual Return 13.574% Drawdown 17.200% Expectancy 0 Start Equity 100000 End Equity 117342.93 Net Profit 17.343% Sharpe Ratio 0.323 Sortino Ratio 0.429 Probabilistic Sharpe Ratio 29.843% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha -0.037 Beta 1.052 Annual Standard Deviation 0.168 Annual Variance 0.028 Information Ratio -0.253 Tracking Error 0.128 Treynor Ratio 0.052 Total Fees $3.46 Estimated Strategy Capacity $44000000.00 Lowest Capacity Asset AAPL R735QTJ8XC9X Portfolio Turnover 0.22% |
# region imports from AlgorithmImports import * # endregion class HyperActiveRedOrangeAlpaca(QCAlgorithm): def initialize(self): self.set_start_date(2023, 1, 29) self.set_cash(100000) self.add_equity("AAPL", Resolution.Minute) self.entry_price = None def on_data(self, data: Slice): if not self.Portfolio.Invested: self.SetHoldings("AAPL", 1.0) # Buy Apple with full capital self.entry_price = self.Securities["AAPL"].Price # Record the entry price elif self.Portfolio.Invested and self.Securities["AAPL"].Price >= 219: self.Liquidate("AAPL") # Exit the position if the price reaches $219