Entry Stop Loss -- Significantly enhances sim, but achievable OOS?

One of William O’Neil’s sell rules in his CANSLIM system (as outlined in his book “How to Make Money in Stocks”) is a 7-8% stop loss rule from your entry point. He is adamant in his book that there are no exceptions, i.e. ALWAYS sell if your position if drops 7-8% from entry.

For those who are not familiar, CANSLIM is a growth oriented strategy. For more value oriented investors, a drop in price usually means to buy more of stock. As a growth investor, O’Neil disagrees with this strategy of averaging down.

BTW, for those new to P123 there are some “off the shelf” CANSLIM/O’Neil ranking systems and screens under the P123 ranks/screens.

Curious, I’ve tested the entry stop loss at several thresholds.

Last month Andreas was gracious enough to share the concepts of his latest trading system. I’ve made my own system which is similar, and is also similar to the concepts outlined in CANSLIM.

FYI this is a small/micro/low volume strategy. CANSLIM was originally intended for larger issues. However the sim results with and without stoploss are impressive.

See attached/below 20 year results, variable slippage, minimum daily volume $100k. No stop loss rule.

Also below, 7% stop loss, 10%, 15%.

Overall results, 7% stop loss
• Total gain over the period doubles
• Turnover doubles
• % winners decreases about 1/3
• Most significant loss in single stock decreases from 70% to 30%
• Minor improvement to max drawdown

Overall results, 10% stop loss

  • Performance increases, turnover improves (decreases) from 7% stop loss, and % winners improves.

15% shown below as well.

I’ve tried this tactic on another small/micro strategy (with more of a balanced tilt, not as much growth emphasis), results being quite different. The aggressive 7% and 10% stop losses actually drop overall sim performance significantly.

Putting stop losses into practice:

My skeptical side tells me that this stop loss works well on paper but difficult in practice and OOS, even when using variable slippage.

When using entry stop losses, I understand P123 would e-mail a notification that a stock has dropped past the limit. I’m assuming this would be at close.

I’m then assuming the sim assumes that said stock is sold at open next day.

With increased turnover, many more trades, and less % winners, I see this strategy being difficult to trade, i.e. require good, timely and often trading (potentially daily), and psychological strength to see that only 30-40% of your stocks are winners (which is what O’Neil actually states is normal).

That said, I would really like to hear any practical experience from the community:

  1. Do any of you use aggressive (10%) entry stop losses to benefit your strategy?
  2. Is the trading doable? Any real world OOS issues/problems/tips?
  3. Is the increased performance from achievable?

Any other practical experience or thoughts on this would be much appreciated!

Cheers,
Ryan









Hey, Ryan, I can summarize my experience: Using any type of stop-loss strategies significantly reduces my (small-cap) models’ performances–both on a return basis and a Sharpe-ratio basis. (I will note, however, unlike CANSLIM, price momentum is a very minor factor in my models.)

if the jt_base strat without stop loss is with variable settings, then this is super fantastic!!!

I tested a lot with SL as well, but looked only good on paper. I checked about 100 SL execution prices on tradestation and there was now way
I would have gotten the calculated SL Prices.

My advice, do not use the SLs on anything else then big caps.

I would rather go further in robustness testing the strat.

Buy rules (put them on sequentially)
EvenId = 0 and Trunc(100Mod(Ln(SalesA+1),0.02)) = 0
EvenId = 0 and Trunc(100
Mod(Ln(SalesA+1),0.02)) = 1
EvenId =1 and Trunc(100Mod(Ln(SalesA+1),0.02)) = 0
EvenId = 1 and Trunc(100
Mod(Ln(SalesA+1),0.02)) = 1

Then test 3,5,10,25,50 and 100 Stocks with it.

Then test all the major sectors (e.g. sector = Tech) and canada and all major universes (SP500 etc.)

The less buy and sell rules the better (from a robustnes standpoint)-

Do small changes to the weighting of the ranking, only small changes in the cap curve should be expected (if yes, then this is a good sign).

The cap curves will obviously change, but if they look almost always constructive, you got something!

If the results are good, you are ready to go, scale into the trading system and follow it (actually that is the hardest part!)
And do not spend the winnings, but reinvest them (After tax).

Good luck!

Best Regards

Andreas

I used to use stop losses, at first fixed, and then ATR-based. I got terribly whipsawed and lost tons of money. The problem with testing stop-losses is that the simulations don’t (and can’t) take into account what actually happens in the market, which is that you often end up selling significantly below your stop-loss level because you can’t find a buyer at that price. Stop losses guarantee that you sell at a low price, which is a terrible guarantee. People who use stop losses have succumbed to the sunk cost fallacy. What matters is not how much you paid for a stock but how much you expect that stock to make you in the future. There should be no relationship between the two. Selling decisions should be based on the latter consideration, not the former. I buy a stock for $100 and my brother buys it for $70. Is it worth more to one of us than it is to the other? No. It’s exactly the same stock with exactly the same prospects. When I decide whether to sell the stock tomorrow or to hold it for another six months, the logic of my decision should not be influenced by how much I paid for it. But if I use a stop loss, I’m defying that logic completely.

Ditto on stop losses. I think we have all tried stop losses at one time or another but where is the correct stop loss threshold and will that persist in the future? Drops in stock prices are usually buying opportunities for other participants. How many corrections get bought up? When you are ready to buy back in you have probably lost out on that opportunity to rebound and make your loss permanent. That is the actual sunk cost. If you watch stock price behavior the majority under and overshoot price which pushes you out on the undershoot and pulls you in the overshoot. Diversification in stocks and assets is the better way to limit drawdowns but you may sacrifice upside.

There are a couple of problems with stop losses. One is that market makers or high-frequency traders now, WILL target your stops and take them out. The second problem is liquidity. There tends to be significant slippage in where the stock is sold. The third issue is that since the flash crashes several years ago, most brokerages have instituted something called stop-limit. My broker no longer allowed a pure stop, you had to use a stop-limit. The limit was a price below which the trade would not be executed. This, of course, eliminates the purpose of a stop order. If you set the limit price slightly below the stop price then there is a high probability that the stock won’t be sold. The price will just blow right through the stop and limit price. If you set the limit price to give a lot of cushions then what happens is the stock price skips the range entirely and then the stock price rises until it is within the limit price. In short, you get the worst possible price within the constraints that you have set. If you want to use stops, then make sure they are mental stops and you are watching the markets constantly.

SteveA

Another angle to consider. Finding an optimal stop-loss threshold is an exercise in curve fitting. With that in mind you might reconsider how how your model might not live up to expectations and even significantly underperform. Higher level of curve fitting will generally lead to poorer performance.

I would go as far to say that stop losses while suggested as good investment advice on multiple mainstream investment sites are probably the worst advice you can take.

I would have to say that in general, I don’t like stop-losses. But there is one use that I do like regarding cash management and draw-downs. This works best if you re-balance every 4 weeks or so. Set your stop-loss at 5 - 7% below your purchase price. If your stop-loss gets triggered, you stay in cash until the next re-balance which may be 1 day or 1 month. Essentially, this helps you progressively go to cash and stay there for a few weeks when the market turns down.

So if you do something simple like the Core Combination ranking system in the S&P 500, top 50 stocks with 4 week rebalance and ‘true’ in the sell rules (but allowing immediate repurchase), you get the following. The bottom chart is the same thing without the stop-loss that makes your position sit in cash until the next rebalance.




Well, I’m intrigued! I don’t have models w/ stop-loss rules, but this is definitely worth a port. Just to make things more interesting, I added an ATR based sell rule;

(Close(0)<HighVal(NoBars)-ATR(Min(NoBars,600))*4)&(RankPos>20) // for a 20 holding port

and a buy rule that avoids buying on the way down;

Eval(LastSellDaysLT(#Year),isNA(LastSellPrice<Close(0),True),True)

The 'Entry Based Stop ’ is set to 15%.

This should be interesting.

Walter

Kurtis,
Your model is 100% invested every 4 weeks. Then the stops increase cash until the next rebalancing period.
If you look at the realized trades you will find several that buy and sell on the same day.

You can’t implement this in real life.

Yes Andreas, JT base is conservative, with variable slippage, price >1, price avg high/low, mdt>$100k etc.

Your tips on robustness testing is much appreciated. I’ve put together some screenshots of testing, see attached. Any feedback would be super appreciated.

As for buy rules, I do have several, however 90% of them are universe scrubbing only, i.e. remove utilities, financials, REITs, stale statements etc. Liquidity rules, and only 1 performance based growth rule.

Question on the “scaling in”, I’m familiar with this for a single stock, however for a 25 stock strategy, how do you execute it? Say 25% or 30% of the portfolio in 25 stocks, then at rebalance a few months later add another 33%, and again 33%? Wouldn’t the trades/holdings change each time? Not sure I understand, could you kindly clarify?

Thanks again,
Ryan


RTJT_Robustness tests 20200109.pdf (1.96 MB)

All, excellent input on OOS stop loss experience. I was concerned that there would be losses not accounted for in the sims, thanks for sharing.

Walter, I’ll try your rules as well and report back shortly.

Can you please elaborate George? I don’t understand why this can’t be implemented.

The idea is that yes, the model is 100% invested every 4 weeks. If no stock hits its stop-loss, then at the end of 4 weeks you replace all positions with the next set of ‘best stocks’ according to your ranking system and re-set your stop-losses. So most stocks will be turned over at the 4 week rebalance point.

If a stop-loss is hit at week 2, then that allocation just sits in cash until the end of week 4.

You can even do this with 1 stock if you like. This system buys the highest ranked stock according to sentiment in the S&P 500. It can sell a stock at any time that the stop-loss is hit. But it can only buy once every 4 weeks. And once every 4 weeks it will automatically replace the holding with the highest ranked sentiment stock in the S&P 500.

I don’t understand what makes this unimplementable in the real world.


I was thinking if it would help simulation be more realistic if we had the option of entering a separate slippage for stop loss?

I ran a sim and looked at the realized trades. I found several that buy and sell on the same day. In real life you would only know about this the following day, so you can’t implement the sale on the previous day as required by the sim.

This is not good. We’ll be fixing this soon. In the near future, the stop loss engine will not buy and sell stocks on the same day.

Good!
I also have “fantastic” looking sims, which suffer from the above logical misconseption.
You never know if the high of today came before the low of today or vice versa. That knowledge can only be obtained after the close (as Georg pointed out). Therefore avoiding buy and sell orders for the same day is good and realistic practice and should be implemented.

Moreover it seems stop losses are simulated with return on open price, see related thread here:
https://www.portfolio123.com/mvnforum/viewthread_thread,12068
Stop loss execution is path dependent. With OHLC data, a somehow realistic stop loss feature should calculate the return on the low, or on close, or the day after. And it may be better to have the choice.

Yuval,

It might be helpful to add a slippage parameter which is specified as a percent across the range between the stop loss and the low for the day. This of course wouldn’t be perfect (intraday data would of course be better but that is beyond the granularity of this platform) but it would allow for users to better (not perfectly) model slippage on a stop loss order since in reality users will never get the stop loss percent and might even get less than the close.

Just an idea to consider.

Jeff