Adding Stops and Scaling Out to a Mean Reversion Strategy

I came on an idea recently that I had tested. I have tested adding max loss stops to a mean reversion strategy, with no success. See this post for more on that. About eight years ago, I tested scaling out of trades. But this person claimed that adding the two together was how to improve a mean reversion strategy. Interesting idea I had not tested.

I have a one question poll below about what to do with my research. Take 15 seconds to fill it out.

Base Strategy Rules


  • Stock is member of the Russell 1000
  • Close is above $1
  • The 21 day moving average of Dollar Volume is greater than $10 million
  • Close is above the 100 day moving average
  • RSI(2) crosses below 5


  • Enter the today at 1/2 of ATR(10) below previous close
  • 20% of portfolio in each position
  • Only enter orders so if they all fill will not have more than 5 open posiions


  • RSI(2) greater than 30, sell on next open



Scaling Out

Now we add the scaling out rule. On the original exit signal, we exit (25,50,75)% of the position. The rest of the position is exited when the close is below the 3 day low of lows. This exit is on the next open.


We see a large drop in CAR with either no change or large increase in MDD. That did not seem to help. What about having a max loss stop?

Adding Max Loss Stop

Using the rules from scaling out, we now add a max loss stop of (4,12)%. The stop is evaluated at the closing price and exited on the next open. Using end of day stops tends to produce better results.


The number just get worse.


Fill the form below to get the spreadsheet with lots of more information. This includes other parameters (stop % and N Day Low exit), yearly breakdown, worst 5 drawdowns and more statistics.


We all want our research to produce great results. I do a lot of research that does not lead to tradeable results. I like seeing but want to know your thoughts. Fill in the poll to guide me what to do with this research. Poll will close on 3/31/2016. Thank you.

The results were clear with 95% of you saying to keep posting research like this.

Final Thoughts

Although this led nowhere, one must always be testing ideas. Sometimes the combination of two ideas that did not work separately work great together. Or an idea that did not work years ago, now is working.

Good Quant Trading,

Fill in for free spreadsheet:


Click Here to Leave a Comment Below

Gerard - March 16, 2016 Reply


Nice idea.
What exactly do you mean by “Enter the today at 1/2 of ATR(10) below previous close”?


    Cesar Alvarez - March 16, 2016 Reply

    For example, the previous close is 50 and the ATR10 is 2.5. We then enter today if the price is below (50 – 2.5*5) or $48.75. Does this clear it up?

Jacopo - March 16, 2016 Reply

could you show the code for your posts please

matt haines - March 16, 2016 Reply

Hey Cesar. I find that for swing trades like this one, often the best stop is simply a ‘time’ stop. Set a duration and exit after that. All depends on the trade of course, but I can’t the number of times I’ve tried optimizing profit targets, stop losses and what-not, only to find that “hold for four days no matter what” turns out to be the best choice. (as an example)

    Cesar Alvarez - March 16, 2016 Reply

    Matt it is funny that you mention that but I have found out the same thing on other strategies. In general for mean reversion adding any kind of stop seems to make the numbers worse. I don’t think I have done a time stop post. I might have to do one.

Brian - March 16, 2016 Reply

For the scale-out rule, I would think you’d want to close out the remainder of the trade when it went even higher (RSI(2) > 50, etc). When designing systems, I think it’s important to use the same underlying premise for both entries and exits. For instance, if you’re buying because you believe the market is oversold in the short-term, you’d want to sell when the market is over-bought (selling on lower lows may not be a great idea, and may even be more of a buy signal in the context of the system).

This is why it’s so hard to get stops to work with mean reversion-type strategies: you’re selling as the price moves against you, when your system is using falling prices as its reason for buying in the first place! If you really want to use “maximum stop losses” as such, they should be placed at a level such that they protect you from losses worse than the worst you have seen in testing. I don’t mean to preach or lecture, just sharing what I have found, and I’d guess you’ve come to similar conclusions in your research.

    Cesar Alvarez - March 16, 2016 Reply

    In general I have found that any time of stops don’t work with mean reversion. The reason for this test was the claim that doing both a max loss and scale out would improve results. Something that I had not tested before.

Kris - March 16, 2016 Reply

There’s certainly value in posting research that did not necessarily lead to tradeable information. It could provide the idea that leads someone to something that does work. At worst, it saves the rest of us some time. Also, its reasonable to keep your most valuable research to yourself. I certainly do this!

    Cesar Alvarez - March 16, 2016 Reply

    I agree with you. I just want to see what others thoughts are on this subject. Right now the large majority of the people want me to post the research that did not lead anywhere.

rasoul - April 2, 2016 Reply

Hi Cesar
Can you share codes of Bollinger Bands Percent for Amibroker.

    Cesar Alvarez - April 2, 2016 Reply

    Here it is
    // %B = (Price – Lower Band)/(Upper Band – Lower Band)
    percentB = (C-BBandBot(C,20,2))/(BBandTop(C,20,2)-BBandBot(C,20,2));

Leave a Reply: