Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Pls Help With Coding Algo!

I'm trying to code a long-short algo but I'm having a lot of trouble starting it (I'm semi-new to coding). The operations I want the algo to perform are below:

1) Have a pool of 4 penny stocks: 2 long, 2 short (equal capital, rebalances once a month)
A) These stocks will be the 4 most volatile penny stocks of the past month
2) Invests long when the stock's price drops by 1%, short when price rises by 1%
3) Closes when profit=1%, Stops loss at 1%

The functions of the algo aren't too complicated, but making the pool stay up to date is beyond my coding skill level. If you could help me write something that can follow the instructions above I would really appreciate it!

Thanks,
Maximus