• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Decoding Markets

  • Top Posts
  • Courses
  • Resources
    • Books
  • Free Class
  • Blog
You are here: Home / Amibroker / Testing Different Trend Following Stops

May 26, 2015 By Joe Marwood Leave a Comment

Testing Different Trend Following Stops

A number of students on my trend following course have mentioned a couple of different trailing stop ideas, so I thought I would put them to the test and see how they perform. Following is an exploration into two different methods; an idea from Nick Radge and a chandelier stop from Charles Le Beau.

Note: the full video tutorial, code and back-test results are included in the course itself.

chandelier exit trend following stopsNick Radge Stop

So, a couple of students mentioned an idea from Nick Radge of The Chartist, where the trailing stop stays at 40% during a bull market and then tightens to 10% during a bear market.

I don’t have access to Nick’s system but I’m told Nick bases this on the broader S&P 500 Index. When the 10 week MA for the S&P 500 is trending up, the stop loss for a stock stays at 40% and when the 10 week MA is trending down, the stop loss changes to 10%.

So what I’m going to do first is run the original system and then I’m going to change the trailing stop slightly and see the effects.

So running the original system between 1/1/1998 and 1/1/2012 returns 20.01% with a drawdown of 28%. This is with a fixed percentage trailing stop of 35%.

Original system
CAR: 20.01%
MDD: 28%

Now, I’m going to see what happens if we change the trailing stop to 10% whenever the S&P 500 drops below the 90 day moving average.

And this is easy to code up in Amibroker.

All we need to do is add in an extra line, so this says that when the S&P is in bullmarket mode (above the 90 day MA), we will use a 35% trailing stop and when the market is not in bull market mode we will use a 10% stop.

Trailpercent = IIF(bullmarket, 35, 10);

We also need to make sure our applystop line has this  ‘true’ parameter added at the end. Setting this last value to true means that the stop loss won’t be fixed and it can vary throughout the duration of the trade.

ApplyStop(stopTypeTrailing, stopModePercent, trailpercent, True, True );

So now we can run this variable stop loss idea and see the results.

Variable stop 1
CAR: 12.77%
MDD: 26%

Unfortunately, making the stop loss tighter when the S&P 500 drops below its 90 day MA didn’t worked out too well.

The drawdown has dropped but our compounded annual return has fallen to just 12.77%.

Next, I’m going to run a closer version to Nick Radge’s idea.

So in this example, I’ll use the 50 day moving average in place of the 10 week moving average. So when the 50 day MA is trending higher, the stop loss will be 40% and when it’s trending lower the stop loss will be 10%.

So as you can see, once again the results are no better. Annual return has dropped to 7.37% and the drawdown is now at 30%.

Variable stop 2
CAR: 7.37%
MDD: 30%

So does this mean this is a useless idea?

Well no not at all, and I still highly recommend Nick’s strategies.

It’s just that this type of stop clearly works better with Nick’s rules and not the rules that I’ve developed. I don’t know what the full rules are to Nick’s system or the settings so I can’t say.

Chandelier Exit

So now I’m going to go back to the original rules and I’m going to run the system with a Chandelier stop, which is based on the ATR (Average True Range) of a stock.

The basic idea is that when a stock is volatile the average true range is wider so the stop loss should be looser, and when the stock is not so volatile the stop loss can be tighter.

Typically, you take the ATR value (often 14) and times that by a multiplier to get the number of points with which to place your stop away.

So we can set this up in Amibroker with the following line:

ApplyStop(stopTypeTrailing, stopModePoint, 3*ATR(14), True, True );

We are now saying that our trailing stop will be held 3*ATR(14) points away from the recent high.

Next, I optimised the multiplier to see which chandelier stop works best during the in-sample period.

From the optimisation, the best multiplier was 8 x ATR 14 which produced an annual return of 21.09% so you can say that it’s actually worked quite well.

But even though we have optimised this result, when you look at CAR/MDD this still isn’t as good as the original system.

Here are the full results for the different types of stops tested:

trend following stops and ideas

Obviously, we could test some more variables but I’m going to stop there. I am not a big fan of the chandelier stop when trading stocks, mainly because I don’t think you can predict stock volatility very easily. A fixed trailing stop is also easier to manage and maintain.

For now, the original system rules work just fine and with fewer moving parts.


Thank You For Reading

joe marwood profile pictureJoe Marwood is an independent trader and the founder of Decoding Markets. He worked as a professional futures trader and has a passion for investing and building mechanical trading strategies. If you are interested in more quantitative trading strategies, investing ideas and tutorials make sure to check out our program Marwood Research.


Disclaimer

This post expresses the opinions of the writer and is for information, entertainment purposes only. Joe Marwood is not a registered financial advisor or certified analyst. The reader agrees to assume all risk resulting from the application of any of the information provided. Past performance is not a reliable indicator of future returns and financial trading is full of risk. Margin trading can lead to losses more than in your account. Mistakes in backtesting and presenting of analysis regularly occur. Please read the Full disclaimer.

Filed Under: Amibroker, Strategies/ Systems, Trend Following

Recommended Educational Resources:


  • Discover New Trading Strategies
  • Learn Japanese Candlesticks (Free)
  • Mental Models For Trading (Free)
  • Indicators For Amibroker (Free)
  • Tools For Options Traders (Free)
  • Historical Data For 8000 Stocks (Free)

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published.

Primary Sidebar

Access Marwood Research image

Popular

amibroker strategies page

10 Ideas For A New Trading System

Investing With Intelligent Machines

Slide 3 Books

The 100 Best Trading And Investing Books Of All Time

small picture of jesse livermore

25 Jesse Livermore Trading Rules : Ultimate Guide To The Boy Plunger

positions sizing with RSI 2 on spy equity curve

Using The RSI Technical Indicator For Dynamic Position Sizing

easy-money-trading

The Easiest 100 Ticks I Ever Made (And Worst)

Stock screen image

20 Traps All Traders And Investors Must Avoid

How to 10x Your Momentum Trading Strategy

How To 10x Your Momentum Returns

Search

Recommended Resources

  • Discover New Trading Strategies
  • Learn Japanese Candlesticks (Free)
  • Mental Models For Trading (Free)
  • Indicators For Amibroker (Free)
  • Tools For Options Traders (Free)
  • Hist. Data For 8000 Stocks (Free)

Financial Disclaimer

Financial trading is risky and you can lose money. Joe Marwood is not a registered investment advisor and nothing on this site is to be regarded as personalized investment advice. Past performance is not indicative of future results. Data errors and mistakes do occur. Please see the full disclaimer.

Footer

About The Author

Joe Marwood is an independent trader and investor specialising in financial market analysis and trading systems. He worked as a professional futures trader for a trading firm in London and has a passion for building mechanical trading strategies. He has been in the market since 2008 and working with Amibroker since 2011.

Joe Marwood Profile PIc

Recent Posts

  • Investing With Intelligent Machines
  • Trend Following With ETFs and Large Cap Stocks
  • Should You Trade This Earnings Pullback Strategy?
  • Simple Algo Trading With Alpaca And Streak
  • Is Value Investing Dead? Dissecting The Value Investing Narrative
  • How To Screen For Stocks With Norgate Data
  • Do Stocks Have A Floor?
  • What Trading Signals Work Best For Long-Term Investors?

Search

Privacy policy | Contact | Disclaimer | All Rights reserved. JB Marwood.