Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
2 Basic Questions About Using Pipeline Outputs.

Hey all, two quick questions from a beginner:

  1. How do I call a security from pipeline? My pipeline has a few filters/screens on it, but when I try to handle_data on the output, it says I need to use sid to reference a security.

def before_trading_start(context, data): context.output = pipeline_output('my_pipeline').sort('sma_2') log.info(context.output.head(5)) def handle_data(context, data): for stock in context.output: order_target_percent(stock, 0)

  1. Where can I find documentation on using if/then commands? For example: IF sma_2 > sma_5, THEN order_target_percent(stock, #)?

Thanks in advance!