Overall Statistics |
Total Orders 0 Average Win 0% Average Loss 0% Compounding Annual Return 0% Drawdown 0% Expectancy 0 Start Equity 100000 End Equity 100000 Net Profit 0% Sharpe Ratio 0 Sortino 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 0 Tracking Error 0 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset Portfolio Turnover 0% |
# region imports from AlgorithmImports import * # endregion class GeekyTanSardine(QCAlgorithm): def Initialize(self): self.SetStartDate(2024, 10, 1) self.SetEndDate(2024, 10, 1) self.SetCash(100000) self.AddEquity("AAPL", Resolution.Daily) self.accessDate = 0 self._universe = self.add_universe(self.MyCoarseFilterFunction) self.symbolDict = {} def MyCoarseFilterFunction(self, coarse): filtered = [f for f in coarse if f.has_fundamental_data]#and f.price > 10 and f.market_cap > 300000000] # sortedByVolume = sorted(filtered, key=lambda f: f.market_cap, reverse=True) #[:self.universeSize] return [f.Symbol for f in filtered] def OnData(self, data: Slice): if self.Time.day != self.accessDate: for symbol, trade_bar in data.bars.items(): # if symbol.value == "AAPL": self.Debug(symbol) # history = self.History(symbol, 252, Resolution.Daily) # count = 0 # rsTotal = 0 # for time, row in history.loc[symbol].iterrows(): # if count == 63 or count == 126 or count == 189 or count == 252: # rsTotal = rsTotal + (trade_bar.close/ row['close']) # self.debug("count : {} , rstotal : {} ".format(count, rsTotal)) # count+=1 # self.symbolDict[symbol] = rsTotal self.accessDate = self.Time.day # for symbol, tradeBar in data.bars.items(): # if symbol.value == "AAPL": #