Table of Contents

Evaluating Stop Methods for Algorithmic Trading Systems

In this article, we evaluate percentage stops, trailing stops, and other commonly used stops in the context of algorithmic trading systems. Every day traders and system traders have always been told to use some type of stop. Many day traders understand the difficulty in setting stops. Stops too tight are destined to get hit more often, while stops too loose can lead to a potential colossal loser. We want to know if the commonly used stops discussed in forums and books really work with algorithmic trading systems. We test various stops on a sample system, Chimera Bot, below.

Psychological Repercussions of Stops for Manual Traders:

  • Fixed tight stops lead to lower risk on an individual trade but will undoubtedly lead to a lower win/loss ratio. For manual non-system traders, it can be challenging to be repetitively stopped out and then continue to follow your rules consistently.
  • Large stops lead to a higher win/loss ratio, but the occasional significant loss can cause the common day trader to become shell-shocked.
  • Trailing stops: every new trader recites the adage of “never let a winner turn into a loser,” so a trail is employed. Yet, how many times have you seen your trade get stopped out, only to have the market shift into a strong trend in your favor?

Commonly Used Algorithmic Trading Stop Methods:

  • Fixed percentage stop
  • Trailing stops – these can be percentage, dollar, points, etc.
  • Universal indicator stops, e.g., Stochastic, Moving average crossover
  • Price action stop – can be something as simple as the lowest low in the last 5 bars
  • Support and resistance-based stops
  • Volatility-based stops – many use ATR

We will analyze the performance of these various stops and measure their impact on essential metrics such as Sharpe Ratio, Profit Factor, and Drawdown.

Baseline:

  • Quant Savvy Chimera Bot 5
  • Market: YM 5min Chart, daytrade only (no overnight holding)
  • Direction: Algo systems Chimera Bot 5 trades only on the Short side.
  • Stops: All stops for this strategy have been removed.
  • Targets: Using the normal system targets.
  • Notes: Performance results are based on data from the beginning of 2007 until the end of 2017. The system uses no indicators, and entries are independent of targets and stops.
  • Baseline results: If the target is not hit, the exit is at 3:15 PM Central.

(Click images to expand)

Baseline Strategy Performance Summary
Algorithmic Trading Performance Ratios
Algo total trade analysis
Algorithmic trading equity curve

When removing all the stops, we still have a profit factor of 1.54 and a Sharpe ratio of 0.4. The largest losing trade without stops was -$2,604, and the close-to-close drawdown was -$4,747 (we still feel drawdown is a misleading metric, read this post to see why).

 

1. How Do Traditional Stop Losses Affect the Algo System Performance?

We will run the results with various stops, showing results based on different optimizations, even though we would never optimize our systems for this study.

 

2. Study 1: Fixed Percentage Stops – 0.25% to 2% of Market Range

Fixed Percentage Stops – 0.25% to 2% of Market Range
Optimization results curve

The results show that every percentage stop reduced profit factor and lowered the overall performance of the system.

 

3. Study 2: Moving Average Crossover Stop

  • With the independent entry, we need the fast-moving average to cross or stay lower than the slow-moving average.
  • When the fast-moving average crosses above the slow-moving average, we will exit the next bar at the market.
  • We have optimized for the slow and fast-moving average to get the results.

Moving Average Crossover Stop
Moving Average Crossover Stop 3D

Looking at the results – which will be curve-fitted as we are using a computer to optimize the two parameters for best performance. Still, we do improve on the baseline results with 2 different combinations of fast and slow-moving average.

  • Fast (5) and Slow (55) gives the best profit factor and reduces intraday drawdown.
  • Fast (30) and Slow (55) gives the second-best profit factor.

The results above are generated after testing 500 simulations of best parameters for the moving averages, yet we only get two results which barely improve the performance and therefore have extreme data mining bias hence cannot be used.

 

4. Study 3: Bollinger Band Stop

This indicator is a favorite stop for many day traders as it considers current market volatility and range. Mean reverting systems love the Bollinger band – we at Quant Savvy find this to be another meaningless indicator, however. We place our stop at the upper Bollinger Band and optimize the parameter from 1.0 to 5.0 standard deviations, and we optimize the length from 5 – 65.

Bollinger Band Strategy

The results are more consistent with the Bollinger Band study; the 3D optimization report does show gradual improvement and stable region for parameter optimization. 14 to 32 in length and 4 to 5 in standard deviation is the stable zone. Having a stable area is essential when optimizing algo system parameters as within the neighborhood of best fit we still want to see adequate performance. If there is no stable zone, then any change in market conditions will mean odds are your optimized parameters will not work. Ideally, one should never optimize in the first place.

  • The Bollinger Bands do improve the profit Factor and Net Profit/Drawdown. However, out of all the 500 plus optimizations we tested, less than 27 beat profit factors of the baseline.
  • We had a Sharpe ratio of 0.45.
  • The results do show some promise for Bollinger Band stop, but one thing to note is that the best parameter optimization of length: 14 and Standard Deviation: 4.75, we only got less than 20% of trades hit the stop….
  • Would you use this type of optimized stop which barely improves the Profit Factor? At Quant Savvy, we would not!

 

5. Study 4: Price Action Stop

There are many definitions of trading price action. Very few traders understand what it means, and you rarely find two in agreement on how to use it. As there are many types of price action stops (beyond the scope of this study), in this study, we will focus on the two most commonly used price action stops:

  • Highest (high, ‘x’ number of bars) looking backwards, this will be optimized.
  • ‘X’ number of bars in a row up (against our short position), this will be optimized.

Results for Highest (high, ‘x’ number of bars)

  • We do this for 5 to 50 bars looking backwards.

Results for Highest (high, ‘x’ number of bars)

This performs particularly poorly and not even optimized parameters can improve the results.

Results for ‘X’ number of bars in a row where the close is greater than the previous close

  • We do this for x = 2 to x = 10.

Results for ‘X’ number of bars in a row where the close is greater than the previous close

The data above only shows two optimizations where it performs better than the baseline system with no stops. Therefore, we can assume this method, in its simplest form, is not beneficial.

 

6. Study 5: Support and Resistance-Based Stop

We can use the Open, High, Low, and Close of the previous day’s actions to create some support and resistance points in a shorter timeframe. We will, therefore, test if the past day’s open/high/close or low makes a good stop for the automated trading system.

  • We take the entry price and place a stop at a point of interest above this level, e.g., if the entry price is lower than yesterday’s close but above yesterday’s low, then we will test stops at both yesterday’s close and yesterday’s high. This methodology will be applied to all of the various iterations.
  • We will optimize for set 1 in which stops will be applied to the next nearest point of interest and then optimize set 2 in which stops will be applied to the second nearest point of interest. Points of interest being yesterday’s: open, close, high, and low.

Open, High, Low, and Close of the previous day's actions

The performance is weaker than baseline performance, showing that yesterday’s points of interest have little impact on improving system stops. This methodology could be enhanced and expanded much further using multiple points of interest spanning many days or timeframes, etc. However, for this simple study, we like to see some improvement in the shorter timeframe before moving onto bigger timeframes. A good rule should perform on all timeframes.

 

7. Study 6: Volatility Stop Using Average True Range

  • This is a very commonly used stop. We will pick different lengths and optimize.
  • We optimize the ATR length from 0.2 – 6 with 0.1 intervals.

Volatility Stop using Average True Range optimization results
Volatility Stop using Average True Range optimization results

Result: this shows zero improvements in performance and, in fact, makes performance far worse.

 

8. Study 7: Trailing Stop

This method is probably one of the most common stops. No trader likes to see a positive trade turn into a negative one. Nevertheless, this stop requires some degree of skill and flexibility. For quant traders, we must emphasize that you should play around with different practices of employing a trail. For this study, we will apply something simple:

Test A:

  • We will start trailing when the market goes in our favor using market percentage; this will be optimized.
  • We, therefore, have two parameters. The first parameter is how far the market has moved in our favor, e.g., if the low is less than entry price minus 0.2%, a trail can begin.
  • When the trail begins, we have the second parameter which is optimized and will again trail based on a fixed percentage.
  • The machine will optimize for both parameters starting from 0.2% to 2.0% in increments of 0.2%. The trail will be calculated from the most recent bar high.

Trails performance

Results: surprisingly, the trails do not improve performance. If the market goes in our favor by 0.7%, for example, then we would want a trail of 1.1% from the most recent bar high.

Test B:

Trailing stop performance

Result: Test B shows even weaker performance, so this type of trailing stop should be disregarded.

 

9. Study 8: Fixed Dollar Stops

In this study, we will not evaluate these types of stops as price rises over time make this meaningless. If you use fixed dollar stops, then make sure to normalize it to the current market price. See this article for more information: Drawdown is a Misleading Metric in Futures Trading

 

Conclusion: Typical Stops Used by Many Day Traders Do Not Work!

In this post, we have presented an interesting study because we specifically chose a system that is Short only. Every trader knows that trades on the Short side work differently than trades on the long side. Markets often move up in steps and then fall off the edge of a cliff; moves down are usually much faster and more violent. Most other studies of this type usually show that stops tend to improve performance. However, many of these studies are based on longer-term indicators; this study is clearly for day trading only. Moreover, the fact that this is a short-only system cannot be overemphasized as most other studies show long-only systems – these are often easy to fit using trails as markets often move upwards in steps so a trail is relatively easy to apply.

Scope for Further Study

There are hundreds of different stops we can potentially try. In this study, we have not explored other indicators nor price action points such as Pivots. One thing we must point out after years of testing is that indicator-type stops rarely work for day trading, and dollar stops are poorly programmed and make zero sense for rising futures markets. In our experience, we find that volatility stops can work, but the system must adjust to the market data coming in a very short timeframe. We also have seen the benefit of break-even stops and time stops. Support and resistance stops can be programmed with different complexities, and the results for one trader relative to another trader will be dissimilar. There is no correct measure of support and resistance, and every trader has their methodology. The final performance of the Chimera Bot, when we add our specialized non-optimized and non-curve-fitted stops, is as follows:

Strategy performance summary

Social

swing trading strategies and tactics

Swing Trading Strategy

In this blog post we will introduce you to the swing trading itself, swing strategies and techniques without hyperbolizing potential...

Achieve Financial Freedom with Smart Algorithms

Grow your wealth with advanced trading technology while staying in control


Maximize Returns

Advanced algorithms
Significant growth
Consistent returns

Effortless Trading

Automated systems
24/7 access
Monitor anytime

Full Control

Manage funds
Add, withdraw, pause
Clear reports

Security & Support

Secure capital
Under control
Expert advice

**Commodity Future and Trading Commission Futures has large potential rewards, but also large potential risk. You must be aware of the risks and be willing to accept them in order to invest in the futures markets. Do not trade with money you cannot afford to lose. The past performance posted on quantsavvy.com is not necessarily indicative of future results. Quant Savvy provides trading algorithms based on a computerized system. All advice is impersonal and not tailored to any specific individual’s unique situation. Quant Savvy, and its principles, are not required to register with the NFA as a CTA and are publicly claiming this exemption. Information posted online or distributed through email has NOT been reviewed by any government agencies — this includes but is not limited to back-tested reports, statements and any other marketing materials. Carefully consider this prior to purchasing our algorithms. For more information on the exemption we are claiming, please visit the NFA website: http://www.nfa.futures.org/nfa-registration/cta/index.html. If you are in need of professional advice unique to your situation, please consult with a licensed broker/CTA. **DISCLAIMER: Commodity Futures Trading Commission Futures trading has large potential rewards, but also large potential risk. You must be aware of the risks and be willing to accept them in order to invest in the futures markets. Don’t trade with money you can’t afford to lose. This is neither a solicitation nor an offer to Buy/Sell futures. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this website or on any reports. 

The past performance of any trading system or methodology is not necessarily indicative of future results. ***All returns posted on this site and in our videos is considered Backtested Trading Performance. Backtested trading results have many inherent limitations, some of which are described below. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. In fact, there are frequently sharp differences between backtested trading results and the actual results subsequently achieved by any particular trading program. One of the limitations of backtested trading results is that they are generally prepared with the benefit of hindsight. In addition, backtested trading does not involve financial risk, and no backtested trading record can completely account for the impact of financial risk in actual trading. For example, the ability to withstand losses or adhere to a particular trading program in spite of trading losses are material points which can also adversely affect actual trading results. There are numerous other factors related to the markets in general or to the implementation of any specific trading program which cannot be fully accounted for in the preparation of backtested performance results and all of which can adversely affect actual trading results. 

CFTC RULE 4.41 – Hypothetical or simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under — or over — compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown. Statements posted from our actual customers trading the algorithms (algos) include slippage and commission. Statements posted are not fully audited or verified and should be considered as customer testimonials. Individual results do vary. They are real statements from real people trading our algorithms on auto-pilot and as far as we know, do NOT include any discretionary trades. Tradelists posted on this site also include slippage and commission. All advice and/or suggestions given in Quant Savvy website are intended for running automated software in simulation mode only. Trading futures is not for everyone and does carry a high level of risk. All past performance shown is backtested data only.