Categories
Forex Daily Topic Forex Stop-loss & argets

Masteting Stop-Loss setting: How about using Kase Dev-Stops?

The stop-loss setting is a crucial component to the long-term success of a forex and crypto trader. The market forces cannot be adapted to the wishes of traders. Successful traders must accept that fact instead of fighting it for the sake of being right. “What cannot be cannot be, and, furthermore, it is impossible,” said some time ago, a well-known politician in a phrase that did not pretend to be comical. But it states a clear fact: Fight against the markets is like Don Quixote fighting Windmills.

In previous articles, we explained John Sweeney’s MAE method, and also average true range-based stop-loss settings. In this article, we are going to talk about Cynthia Kase’s Dev-Stops.

Cynthia Kase is a well-known and successful futures trader, speaker, and author of several books on trading and technical analysis. She conceded high importance to stop settings. Cynthia says something undeniable to most of us, Technical literature has mostly focused on entries, and almost nothing on entries besides some words on stop-loss or trailing stops. She says that this is like teaching how to drive a car but without explaining where the brake pedal and how to press it.

In her book “Trading with the Odds,” she explains that this situation is mostly due to greed and fear. Traders don’t like to lose, and most of them don’t know when to get out of a trade. Also, she explains that fear of losing causes people to hang on their losses in the hope the market will turn and recover them. Another explanation for this situation is that the beginning of technical analysis was on the stock market, and no company wants its stock downgraded from buy to hold or, worse, to sell. As opposed to Forex, only a handful of people make money shorting stocks, so exits are much less critical on the stock market.

Stops based on fear and greed

Most traders want to squeeze out the most of a trade. Therefore, they decided to use the highest possible leverage. To reduce the dollar risk, they desire to put it as close as possible to the entry-level. But, as said earlier, using obvious levels of support/resistance and set the stop order just two or three pips below is absurd. Better send your money directly to the charity, since they will make much better use of it than the institution that is going to collect your hard-earned money for free.

Risk is imposed by the market

The critical point is not to impose our conditions on the market, but read what the market is telling us in terms of Risk. In trading, Risk is proportional to volatility. Your dollar risk is the amount the price can move against you in a given interval, times your position size.

Volatility is measured using the Range and also by the standard deviation of prices on an annualized basis. One standard deviation of the price holds 68$ of all the potential price movement if we assume prices are dispersed in a gaussian distribution. That means that a price that goes against a trade by one standard deviation it will encompass 34% of the observations (the other 34% would go in the direction of your trade). The problem with using volatility is that a yearly measurement of the price variations does not help with sudden short-term volatility changes. That’s the reason for using ATR instead.

The concept of the threshold of Uncertainty

A trade is a bet on a market trend. We think a particular trend is in place. Ideally, the direction is a straight line between one initial level and a final level. If we think of the short-term price wiggles as random noise, we adapt our trade by placing our stops far enough away from the trend mean to include noise. The magnitude of the noise means we don’t want to exit at the minimum turn against the trade. The trader needs to devise a way to follow the trend while getting out when it ends. 

 The Kase Dev Stops

Using a fixed multiplier for the True Range is an initial approximation. In our article of true range, we used a fixed 2X multiplier to set our stop order away from the market noise. Kase’s Dev Stop uses what she calls the skew of the volatility, the measure at which a range can spike in the opposite direction as a multiplier of the range measure. That makes the Dev-stop an adaptative trailing stop. Dev Stops is a well-known indicator in TradingView. Also, it is available for downloading at the MQL5.com site for your Metatrader workstation. 

Chart 1 – Kase Dev-Stops in a GBPUSD 4H chart.

We can see in Chart 1 that four lines follow the price action. The first one is the mean line and the 1, 2, and 3 standard deviation (SD) lines of a two-bar reversal. As we can see, the 3rd standard deviation is seldom touched, being the 2-SD the conservative method, and the 1-SD the preferred aggressive method. In the case of using 1SD, it is advisable for a reentry plan, or create mental stops that would trigger if the close happens below the 1SD Dev-stop line.

As it should be the norm when learning a new method, it is strongly advisable to backtest it first to assess which SD line works better with your particular asset and objectives. Also, after backtesting your optimal solution, it is prudent to trade it using a demo account. There we could also assess the costs and benefits of the method by adding the brokerage costs.


Reference: Trading with the Odds, Cynthia A. Kase. 1996, The McGraw-Hill Companies Inc.

 

Categories
Forex Educational Library

Designing a Trading System (V) – Testing Exits and Stops

The importance of exits

It’s not possible to create a system based only on almost perfect entries and using random exits and stops. As we could observe in the entry testing example, the percent profitability of an entry signal is very close to 50%; a coin flip would reach that score. The real money is made directing our efforts into proper risk control, money management, and adequate exits.

Test methods for exits and stops

Testing exits independently are much more difficult than testing entries. Sometimes the entry and the exit is mingled together in a way that’s difficult to separate, for example, when trading support-resistance levels. If that’s the case, the best way is to test the entire system at once.

When it’s possible to evaluate exits by themselves Kevin J. Davey proposes two approaches:

  • Test with one or several similar entries
  • Random entry

The ideas by LeBeau and Lucas move near the same path: Their method of testing exits is to create a very generic entry signal to feed the exit method. If each exit method is tested using identical entries, it should be possible to make valid conclusions about their relative value. Not all exits work equally well with different entries, but if the entry is generic enough, we may get some feeling for the relative effectiveness of a set of exits.

Their method of testing exits is a general approach that encompasses both ways enumerated by Kevin J, Davey.  Nothing is more generic than a random entry, and a non-random entry is improved if we make it close to the type of entry we intended for our system.

Test with similar entries

The fundamental idea behind testing exits, is, of course, to see if it has an edge over a random exit or a benchmark exit. A reliable exit should make a wrong or random entry into a profitable system, and for sure, it should not make an entry system worse.

To create a generic entry signal similar to the one we have in mind for a new system, we need to classify that system. Usually, new systems fall into two categories: Trend following and return to the mean, or counter-trend.

For trend-following systems, Kevin uses an N-bar breakout entry, while for counter-trend systems he uses a relative strength index entry. An exit strategy that works well in similar entry types should work equally well with the intended entry.

Random Entry

The Idea of a random entry is to see if the exit shows an edge by itself. The way to do that is to use a random entry as the optimising parameter with more than 100 runs while keeping the exit fixed and observe what percent of the optimisations are profitable. A very successful exit might have a high percentage of successful series. That is, in my opinion, the best criteria to know if an idea for an exit is valid and has an edge.

Fig. 1 shows the EasyLanguage code for a random entry. This code is a modified version of the one that Bill Brower has explained in his book EasyLanguage Learning-by-Example Workbook. This piece of code can easily be transposed to MQL or another language.

  • Fakecount is used to iterate the optimiser to get several random entry results
  • Initbars is the minimum number of bars the system wait till a new entry signal can be triggered.
  • Randvar is the maximum of bars a random generator can deliver, and it’s added to initbars.
  • BuySell is used to test long and short positions separately 1 for longs -1 for shorts

Fig. 2 shows the 3D graph of a trail-stop exit. We observe that around 0.15%, there is the sweet spot in all random iterations (50 in this example).

In this case, at 0.15% trail stop, the number of profitable iterations were more than 30 out of 50, that is, 60% were positive.

Evaluation criteria

Besides profitability, it’s good to assess the quality of an exit signal based on Maximum Favourable Excursion (MFE) and Maximum Adverse Excursion (MAE) standards.

Those two concepts, developed by John Sweeney, define the maximum adverse excursion (MAE) that a sound signal reaches before it proceeds to run in our favour.

Fig. 3 Show a trading system without stops. We observe that there is a drawdown level beyond which there is almost no winner and mostly are losers. That level defines the MAE optimal stop.

The maximum favourable excursion is the profit level that maximises the result on average of a trading system before it starts to fade and lose profits. MFE is the complementary concept to MAE, but it is a bit harder to visualise.

In Fig. 4 we observe that for the trade in the circle the actual run-up was 0.54% while the real close was 0.3%, the difference is a substantive profit left on the table. The goal of the exit is, on average, to make that distance as short as possible. That means the trading points should be, on average, closer to the upper line, as Fig. 4 shows.

Those two concepts applied to exits mean that the exit must avoid levels beyond MAE, and it should not give back too many profits and get close to the maximum possible excursion.

Total testing

Once we have assessed the goodness of an entry system and have a collection of useful exits to compliment it, we need to test them together and see how entries and exits interact.

The main rule at this point is getting profitability in the majority of combinations of entry and exit signals. For example, if we have ten parameter values on entries and ten on the exits, we would like positive results on more than fifty. Also, I love to see smoothness on the 3D surface. Too many peaks and valleys are a sign of randomness, and it’s not good for the future behaviour of the system, as in Fig. 5

 

Then, we choose a point on the hill that’s surrounded by a convex and smooth surface with similar profitability. That way we are trying to prevent a change in the character of the market which would spoil the system too soon.

Fig. 6  and 7 shows the equity curve and drawdown of a mean-reverting system, and its summary report after having passed the different stages up to the final testing and selection.

With that final assessment, we have achieved the limited testing stage. Therefore, this strategy has passed the test and is a candidate to further forward analyses and optimisations.

 

 

Further readings from this series:

Forex Designing a Trading System (I) – Introduction to Systematic Trading

Designing a Trading System (II) – The Toolbox Part 1

Designing a Trading System (III) – The Toolbox Part 2

Designing a Trading System (IV) – Testing Entries


 

References:

Building Winning Algorithmic Trading Systems, Kevin J. Davey

Campaign Trading, John Sweeney

Computer Analysis of the Futures Markets, Charles LeBeau, George Lucas

Images were taken with permission from Multicharts 11, trading platform.

 ©Forex.Academy