Overall Statistics |
Total Trades 0 Average Win 0% Average Loss 0% Compounding Annual Return 0% Drawdown 0% Expectancy 0 Net Profit 0% Sharpe Ratio 0 Probabilistic Sharpe Ratio 0% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta 0 Annual Standard Deviation 0 Annual Variance 0 Information Ratio -1.643 Tracking Error 0.128 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset |
from AlgorithmImports import * class SquareApricotSardine(QCAlgorithm): import math def Initialize(self): self.SetStartDate(2022, 7, 1) # Set Start Date self.SetEndDate(2022, 7, 15) self.SetCash(2500) # Set Strategy Cash # Add Equity # ------------------------------------------------------------------------------------------------------------------------------------------------ self.SPY = self.AddEquity("SPY", Resolution.Minute) self.SPY.SetDataNormalizationMode(DataNormalizationMode.Raw) self.spy = self.SPY.Symbol self.SetBenchmark(self.spy) # ------------------------------------------------------------------------------------------------------------------------------------------------ # Indicators # ------------------------------------------------------------------------------------------------------------------------------------------------ self.spy_rsi = self.RSI(self.spy, 14, MovingAverageType.Simple, Resolution.Daily, Field.Close) # ------------------------------------------------------------------------------------------------------------------------------------------------ self.SetWarmUp(timedelta(56)) # On Data # ------------------------------------------------------------------------------------------------------------------------------------------------ def OnData(self, data: Slice): # Warming up ALgo # ------------------------------------------------------------------------------------------------------------------------------------------------ if self.IsWarmingUp or not self.spy_rsi.IsReady: return # Plotting RSI self.Plot("RSI", "RSI", self.spy_rsi.Current.Value) # --------------------------------------------------------------------------- ---------------------------------------------------------------------