Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
First Attempt at Creating a Pipeline - Looking for Help!

This is my first semi-successful attempt at creating a Pipeline. Successful in the sense that I was able to run it without any runtime errors. However, I'm having trouble getting any orders to execute. Any help would be greatly appreciated!

1 response

It looks like you've tried a few things already judging by the commented out statement

#context.security_list = context.output.index

You will need to put that back in to get it to run. However your main problem is the statement

stock_weight = 1/(len(context.longs))

Python is pretty strict about coercion. It thinks you want todo integer math and rounds the answer (to zero in this case). Your algo tries to order 0 shares. The fix is a simple decimal point. Change the line to

stock_weight = 1.0/(len(context.longs))

good luck.