1. Runtime Error: Exception of type 'System.OutOfMemoryException' was thrown. in TimeSliceFactory.cs:line 370
  1. def CoarseSelectionFunction(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
  2. self.logger.log("CoarseSelectionFunction Started.")
  3. selected: List[Symbol] = []
  4. for stock in coarse:
  5. if stock.Price > parameters.PRICE_THRESHOLD and stock.DollarVolume > parameters.DOLLAR_VOLUME_THRESHOLD:
  6. selected.append(stock.Symbol)
  7. # Initialize the historical data if not already done
  8. # if stock.Symbol not in self.history:
  9. # self.InitializeIndicators(stock.Symbol)
  10. self.logger.log(f"CoarseSelectionFunction Selected {len(selected)} stocks.")
  11. return selected

Author

Dharmesh Khalasi

September 2024