Back to Community
Am I using the target weights correctly here to short sale?

hello everyone,
Im relatively new to Quantopian, and im just now sort of starting to understand how to use the algorithm API.

anyways, I developed this very basic algorithm which ranks equities by ROIC, then goes long on the top 20% and short on the bottom 20%.
I came up with this algorithm by looking at various examples and taking bits and pieces from different algorithms until it worked for mine. The only thing im wondering is if it really does what I think its doing, primarily the shorting.

If I have a negative weight for the short sales, does that mean it will be shorted?
I have attached the full code in case anyone is kind enough to provide some insight, and if you have any other suggestions that may come up id be happy to hear them too.
Thank you

Loading notebook preview...