1) The similar "pipeline" in LEAN is the universe selection. Please see the documentation. You can filter stocks by dollar volume in coarse universe selection. In fine universe selection, you can use thousand of fundamental factors from Morningstar. For example
def Initialize(self):
# what resolution should the data *added* to the universe be?
self.UniverseSettings.Resolution = Resolution.Daily
# this add universe method accepts two parameters:
# - coarse selection function: accepts an IEnumerable<CoarseFundamental> and returns an IEnumerable<Symbol>
# - fine selection function: accepts an IEnumerable<FineFundamental> and returns an IEnumerable<Symbol>
self.AddUniverse(self.CoarseSelectionFunction, self.FineSelectionFunction)
# sort the data by daily dollar volume and take the top 'NumberOfSymbols'
def CoarseSelectionFunction(self, coarse):
# sort descending by daily dollar volume
sortedByDollarVolume = sorted(coarse, key=lambda x: x.DollarVolume, reverse=True)
# return the symbol objects of the top entries from our sorted collection
return [ x.Symbol for x in sortedByDollarVolume[:10]]
# sort the data by "IsPrimaryShare"
def FineSelectionFunction(self, fine):
filteredFine = [x.Symbol for x in fine if x.SecurityReference.IsPrimaryShare]
return filteredFine
This python example is available on GitHub UniverseSelectionAlgorithm.py .
To filter stocks with an indicator like Moving Average, please refer to this example EmaCrossUniverseSelectionAlgorithm.py
You should probably start on this thread and converting-algos-from-quantopian where we're breaking it down feature by feature to help you migrate.
2) To schedule an event to fire every day after market open, you can use the method
self.Schedule.On(self.DateRules.EveryDay("SPY"), self.TimeRules.AfterMarketOpen("SPY", 10), self.EveryDayAfterMarketOpen)
Here is an example of schedule event API.