Overall Statistics |
Total Orders 1 Average Win 0% Average Loss 0% Compounding Annual Return 15.146% Drawdown 16.500% Expectancy 0 Start Equity 100000 End Equity 119403.58 Net Profit 19.404% Sharpe Ratio 0.387 Sortino Ratio 0.512 Probabilistic Sharpe Ratio 32.647% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha -0.025 Beta 1.042 Annual Standard Deviation 0.167 Annual Variance 0.028 Information Ratio -0.171 Tracking Error 0.128 Treynor Ratio 0.062 Total Fees $3.52 Estimated Strategy Capacity $370000000.00 Lowest Capacity Asset AAPL R735QTJ8XC9X Portfolio Turnover 0.21% |
# 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.Daily) 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 if self.Portfolio.Invested and self.Securities["AAPL"].Price >= 219: self.Liquidate("AAPL") # Exit the position if the price reaches $219