Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How can i fix this error?
API

No matter what i put in for asset i still get the same error can anybody help me with this, i am very new to python and quantopian.

2 responses

Try this. Look at the 'my_rebalance' function for a couple of changes. Notice the change from 'order_percent(security, 0)' to 'order_target_percent(security, 0)'. The former simply orders 0 shares while the later adjusts the holdings to 0 shares. The algorithm never sold anything without that change.

Thank you for the help i really appreciate it!