Using Maximum Adverse Excursion for Stop Loss Placement

Jul 26, 2021

A catastrophic stop loss is a vital risk management tool for many traders. Here I’ll show you how to optimize your stop loss distance using maximum adverse excursion.

In the diverse world of strategy development, there are often multiple approaches to the same problem.

Traditional parameter optimization is often used to determine your strategy’s stop loss placement.

Here I’ll demonstrate a more visual method using the concept of maximum adverse excursion, and compare the results from both methods.

What is Maximum Adverse Excursion?

Maximum adverse excursion (MAE) is the largest floating loss during a trade. It measures the furthest that prices moved against you.

Let’s say you enter a long trade at $100, and the market progresses as shown:

Your MAE in this case would be the $20, the difference between the entry price and the lowest market price during the trade.

If you never experience a floating loss during a trade, your MAE will be zero.

Plotting Maximum Adverse Excursion

Here’s a case study:

Suppose you have a reversal trend following strategy for the GBPJPY. Since the strategy is always in the market, you decide to add a catastrophic stop loss to limit risk.

To determine stop loss placement using MAE, you first need to plot your individual trade distribution from the backtest.

MT4’s Strategy Tester doesn’t calculate MAE; you can use StrategyQuant to run the backtests instead. For each trade, there are two metrics you’ll need:

  1. Closed profit/loss
  2. MAE

I like to use pips instead of $ values, because currency pip values fluctuate over time.

With these two values, you can plot the following MAE chart using Excel:

For every backtest trade, the chart displays the closed profit/loss in relation to the MAE during the trade.

Green dots are winning trades, while red dots are losing trades.

Notice that the vast majority of wining trades have low MAE values. Winning trades are usually profitable quickly, experiencing only small floating losses.

Also notice the ‘Loss Diagonal’ consisting of losing trades. These trades were exited close to their lowest equity point.

Let’s look at trades A and B. Although they’re located in the same area, they progressed very differently.

Trade A had a MAE of 580 pips, and was eventually closed at a 580-pip loss.

Trade B had a MAE of 600 pips, but managed to recover, eventually closing with a 500-pip win.

Let’s now use this chart for stop loss placement.

Using Maximum Adverse Excursion for Stop Loss Placement

By analyzing the distribution of MAE in relation to the eventual profit/loss, you can estimate how much floating loss a trade can incur before it is unlikely to recover.

You can place your catastrophic stop loss at this MAE level, because the risks associated with the trade are no longer justified.

Adding a stop creates a vertical boundary at a particular MAE value. Once this value is hit, the trade is immediately closed at a loss. Below you can see the same MAE chart, but with a hypothetical 200-pip stop loss.

All trades to the right of this 200-pip stop loss will be shifted onto this line. This seems great because you’ll be removing the big losses, but you’ll also sacrifice a portion of your winning trades.

These winning trades experienced a MAE of 200 pips or more, but managed to recover to close in profit.

An optimal stop loss thus removes the big losses, without choking off too many trades that eventually became profitable.

From the MAE chart, you can estimate that the ideal stop loss would be in the 50-150 pip range.

As a first pass, I recommend placing your stop such that you retain 75-85% of your winning trades. I’ll demonstrate this using an 85% cut-off.

Using the backtest statistics, I’ll place the stop such that any trade that hits the stop level has only a 15% chance of recovery.

The reversal strategy above contains 442 winning trades. This means I need a stop level that retains 376 (85% of 442) winning trades. This corresponds to about a 100-pip stop.

Here’s how the MAE chart looks with a 100-pip stop.

There is a concentration of losses at the 100-pip MAE value where the trades are taken out by the stop loss.

Note that many trades have a MAE of 101 pips because my backtest models a 1-pip slippage. In actual trading, during times of extreme volatility, stop loss slippage can increase drastically.

Comparison with Stop Loss Optimization

How does the above MAE method compare with traditional parameter optimization?

In parameter optimization, a parameter of interest is varied across a wide range, with the optimal value producing the best strategy performance. This versatile method can be used to select anything from trading entries to profit targets and trailing stops.

Here I’ll perform stop loss optimization using StrategyQuant’s Optimizer.

The stop loss was varied from 10 to 250 pips, in steps of 1 pip.

The return/drawdown ratio is negative for very small stop values; excessively tight stops are often a recipe for disaster for trend following systems. You need to be willing to take bigger risks to overcome transaction costs in the form of spread, slippage and commissions.

There is a high plateau in the 90 to 120-pip stop loss region. I would pick the middle of this plateau (105 pips), which is pretty close to the value obtained from the MAE chart.

Wrapping Up

Stop losses are great at limiting your capital downside and market exposure; many traders thus consider them to be mandatory.

Using MAE to determine stop loss placement is a viable alternative to traditional parameter optimization. Obtaining similar results from both methods gives you confidence that your strategy is conceptually sound.

Complementary to MAE is maximum favourable excursion (MFE). MFE is the largest floating profit during a trade, and can be used to study whether profit targets would be beneficial for your strategy.

If you want to experiment with StrategyQuant’s cool features, don’t forget to check out the 14-day free trial!

Powered By

Development Platform

Forex VPS

FXVM Forex VPS

Popular Posts

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

read more

What is Fixed Ratio Money Management?

Have you heard of fixed ratio money management? How does it compare to the popular fixed fractional approach? Here I’ll explain how fixed ratio works, and see how it stacks up against fixed fractional money management.

read more

Build a Diversified Portfolio With QuantAnalyzer

The ability to efficiently trade a diversified portfolio of strategies is one of the biggest advantages of algorithmic trading. Here we will use QuantAnalyzer’s Portfolio Master to build a portfolio consisting of high performing, uncorrelated strategies.

read more

What Is the QQE Indicator?

The QQE is a mysterious indicator that sometimes pops up in trading forums. Does it deserve a place alongside the more traditional momentum indicators like the RSI and CCI? Let’s add it to a trend following strategy to find out!

read more

Make your money work for you!

Get promotions, trading ideas and strategy development tips delivered to your inbox!

Comments

5 Comments

  1. Adrian

    Do you have the code for excel for creating the MAE/MFE chart?

    Reply
    • Wayne

      no it was done manually. Just a quick scatter plot

      Reply
  2. Mike

    Can you further discuss what is “loss diagonal”? It is new to me and I don’t know why it is formed. Thank you! <3

    Reply
  3. Mike

    I believe there shall be a Quant method to decide the optimal stop loss level for MAE instead of visually assign a value defined by 75%-85% winning trade. What do yo think Wayne?

    Reply
  4. Anonymous

    great job!

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Trading Strategies

What’s the Best Time to Trade Forex?

What’s the Best Time to Trade Forex?

The forex markets are open 24/5, but not all hours are created equal. Here I dissect my broker data to determine the best time to trade forex.

Forex Weekend Gaps: Can You Exploit Them?

Forex Weekend Gaps: Can You Exploit Them?

Have you noticed that forex weekend gaps usually reverse within 3 days? Here I’ll program a mean reversion strategy to exploit gaps over the last 18 years!

Money Flow Index: An Improved RSI?

Money Flow Index: An Improved RSI?

The Money Flow Index is sometimes called the volume-weighted RSI. Can it outperform the RSI in this trend following strategy?

Automated Bollinger Bands Squeeze Forex Strategy

Automated Bollinger Bands Squeeze Forex Strategy

StrategyQuant’s BBWR indicator is the perfect tool to detect a Bollinger Bands squeeze. Here I explain how it’s calculated, and use it to program a breakout strategy for the AUDJPY!

Should You Use the Kelly Criterion for Forex Trading?

Should You Use the Kelly Criterion for Forex Trading?

The Kelly criterion is a famous mathematical formula that attempts to maximize your long-term capital growth. In this post, I’ll apply it to a EURUSD breakout strategy and explain some of its potential shortcomings when applied to forex trading.

Can a Trading Pause Improve Your Trend Following Results?

Can a Trading Pause Improve Your Trend Following Results?

A temporary trading pause can improve your win rate if you’re trend following a volatile market. Here I’ll program a trading pause into a simple breakout strategy, and test its effectiveness on the Widow Maker – the GBPJPY.

Laguerre RSI Trend Following Strategy

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

How to Use the Supertrend Indicator

How to Use the Supertrend Indicator

Despite its cool name, the Supertrend indicator often seems to slip under the radar. Here I explain how it’s calculated, and combine it with moving averages to produce a simple trend following strategy.

Strategy Development

Do You Know Your System Quality Number?

Do You Know Your System Quality Number?

The System Quality Number measures the profitability & consistency of your trading system. Here’s how to calculate your SQN and use it to improve your trading!

How to Get a Realistic Backtest Spread

How to Get a Realistic Backtest Spread

Your choice of backtest spread can certainly make or break a strategy. This post will show you how to study the intraday spread variations of your market, and suggest several ways to avoid paying ridiculous spreads.

Do You Know Your Strategy’s Optimization Profile?

Do You Know Your Strategy’s Optimization Profile?

Your strategy’s optimization profile often reveals its robustness, helping you select strategies that will remain profitable in live trading. Here I explain why an optimization profile is important, and how you can easily obtain one using StrategyQuant’s optimizer.

Which MT4 Backtest Report Metrics Should You Use?

Which MT4 Backtest Report Metrics Should You Use?

Understanding your backtest report is an essential part of being a successful strategy developer. Here I explain what the numbers mean, and how you can make use of each metric during strategy development.

Out-of-sample Testing Using Monte Carlo Simulations

Out-of-sample Testing Using Monte Carlo Simulations

Traders often use Monte Carlo simulations to estimate worst-case drawdowns, but did you know they can be used for out-of-sample testing too? This post demonstrates the use of StrategyQuant’s Monte Carlo simulator to randomize historical prices and strategy parameters, helping you select robust strategies for live trading.

How Many Trades Should Your Backtest Have?

How Many Trades Should Your Backtest Have?

We all want a large sample of trades in our backtests, but practical limitations such as data availability often get in the way. Here I’ll explain why 30 trades is insufficient, and how you can use standard error to quantify the uncertainty arising from a small sample size.

Build a Diversified Portfolio With QuantAnalyzer

Build a Diversified Portfolio With QuantAnalyzer

The ability to efficiently trade a diversified portfolio of strategies is one of the biggest advantages of algorithmic trading. Here we will use QuantAnalyzer’s Portfolio Master to build a portfolio consisting of high performing, uncorrelated strategies.

Strategy Optimization Using MT4

Strategy Optimization Using MT4

How do you improve your trading strategy in MT4? This post will show you how to optimize the entry and exit parameters for a moving average crossover strategy. Finally, an intraday time filter will be added to help avoid false breakouts.

Debugging & Backtesting Using MT4

Debugging & Backtesting Using MT4

With a fresh algorithm at your fingertips, how do you verify that it has been programmed correctly? This guide will show you how to use Metatrader 4’s visual backtester to debug and backtest your strategy.

Create Your Trading Algorithm in 15 Minutes (FREE)

Create Your Trading Algorithm in 15 Minutes (FREE)

Converting your trading idea into an algorithm is the first step towards reaping the benefits of automated trading. This guide will cover the creation of a simple moving average crossover algorithm, without any actual programming.

What Is Drawdown in Trading?

What Is Drawdown in Trading?

Are you getting a comprehensive assessment of your strategy’s downside? This post will discuss several methods to measure drawdowns, helping you build and select strategies that better suit your risk appetite.

How to Select the Best Trading Strategy Entry

How to Select the Best Trading Strategy Entry

With an abundance of technical indicators available, selecting your strategy’s entry conditions can be overwhelming. This post will illustrate a method to graphically compare the profitability of different entries.

Live Trading

What’s the Best Time to Trade Forex?

What’s the Best Time to Trade Forex?

The forex markets are open 24/5, but not all hours are created equal. Here I dissect my broker data to determine the best time to trade forex.

How to Find a Real Trading Guru

How to Find a Real Trading Guru

Every day I come across a trading guru offering educational content on the internet. Many of them speak of huge returns with minimal effort. Should these be trusted? Here’s some tips on how to separate the wheat from the chaff.

How to Enjoy Stress-Free Trading

How to Enjoy Stress-Free Trading

Trading is a great way to make some additional income, but not if you’re constantly pulling your hair out. Here I offer 7 tips to help make your trading profitable and stress-free.

How to Select the Best Forex VPS

How to Select the Best Forex VPS

A virtual private server (VPS) is a virtual computer that you can rent and access remotely. It provides a reliable platform on which to execute your forex strategies. This post will help you decide whether you need a VPS, and show you how to select an optimal VPS.

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Pin It on Pinterest

Share This