Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Rebalancing Trailing Stop

Hi Guys, I am using a ATR stop loss, on my algorithm. I buy and hold stocks for 6 months after they have just made a new high. My problem is I am selling positions frequently within those 6 months so I am losing leverage. I start with 10 positions, but then after getting stopped out I get to one position, which decreases my leverage a lot. I tried to return a function that rebalances the portfolio after the trail_stop function, but it did not work.

Here is the article if you want to find more information on about this strategy.

http://www.trendfollowing.com/whitepaper/DoesTrendFollowingWorkOnStocks_120513.pdf