from zipline.pipeline import Pipeline from zipline.pipeline.factors import SimpleMovingAverage def make_pipeline(): # Set up our universe: the top 500 most-traded stocks. universe = Q1500US() # Create a factor computing the 10-day mean close price of securities in our universe mean_close_10 = SimpleMovingAverage(inputs=[USEquityPricing.close], window_length=10) # Create a screen to filter out securities with mean_close_10 under $10. is_cheap = mean_close_10 > 10 # Combine the factor and screen into a Pipeline. pipe = Pipeline( columns={ 'mean_close_10': mean_close_10, }, screen=is_cheap ) return pipeIn this example, we define a pipeline that uses a SimpleMovingAverage factor to compute the 10-day mean close price of securities in a specific universe (in this case, the top 500 most-traded US stocks). We then use `set_screen()` to filter out any securities whose mean_close_10 value is less than $10. Overall, the `set_screen()` method is a useful tool for refining the output of a pipeline and ensuring that only the relevant assets are included in the final results.