Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Is there a way to set a stop loss when using calculate_optimal_portfolio?

The question is the title.

I have an algorithm which yields decent returns, but I think I can do better if I have a stop loss. Is there a way to do this when using calculate_optimal_portfolio?