Can A Price Pattern Beat an Indicator?

I've seen people use simple price action patterns in place of inicators. For example,  Larry Connors and Cesar Alvarez really popularized the 2-period RSI. It works really well when createing mean-reversion strategies on the stock index markets. However, can you find a simple price pattern that will work just as well?

Here is an idea, losing streaks, as an indicaor. For example, a two-day losing streak indicator simply buys the market after two consecutive losing days. Lets put it to the test. I’m going to focus on a longer term study of this indicator within the future’s market (ES). Free EasyLanguage code will be provided at the conclusion of this article.

Mean Reversion

As a reminder, the traditional two-period RSI indicator (RSI(2)) is an indicator we have used many times on this website. So I will not spend much time talking about it within this article. Overall, it’s primarily used on the stock index markets such as the S&P, as a method to determine an entry point for a mean reverting trading models. You can read more about the RSI(2) indicator and the trading models built from it by reviewing these articles:

Two-Day Losing Streak Indicator

I’m going to use EasyLanguage in order to build a strategy to test the effectiveness of this indicator. Again, the indicator simply highlights when the market has two consecutive losing days. To build this simple indicator I’m going to assume that a losing day is defined when the market closes below its open. We sell our position when we have just the opposite condition, a two-day winning streak.

The trading rules provided in the original article are:

  • Buy at the open of next day if 2-Day Losing Streak
  • Sell at the open of next day if 2-Day Winning Streak

The EasyLanguage code for the basic strategy will look something like this:

Variables:
BuySignal(false),
SellSignal(false);
BuySignal = ( Close < Open ) And ( Close[1] < Open[1] );
SellSignal = ( Close > Open ) And ( Close[1] > Open[1] );
If ( BuySignal ) then Buy("LE") next bar at market;
If ( SellSignal ) then Sell("LX") next bar at market;

Testing Environment

Because you, the reader might want to build a trading model based upon this indicator, I’m going to break the historical data into two portions. An in-sample portion and out-of-sample portion. I will perform my testing for this article on the in-sample portion only. Thus, when I’m finished with my testing we’ll still have a good amount of data which can be used for out-of-sample testing.

Before getting into the details of the results, let me say this: All the tests within this article are going to use the following assumptions:

  • Starting account size of $25,000
  • In-sample dates are from 1998 through December 31, 2012
  • One contract was traded per signal
  • $30 was deducted per round-trip for slippage and commissions

Baseline Results

Below is the baseline results over our in-sample historical segment. The maximum drawdown is a percentage of our starting equity, which is $25,000. Keep in mind that this study has no stops, thus some positions will hold through some very deep pullbacks before exiting. Again, we are testing the performance of an indicator at this point – not a trading model.

Losing Streak

Baseline

Net Profit

$25,800

Profit Factor

1.17

Total Trades

300

%Winners

63%

Avg.Trade Net Profit

$86.00

Annual Rate of Return

4.89%

Max Drawdown(Intraday)

79%

Longer Losing Streak

The first thing that I noticed in a two-day losing streak may not be deep enough. Two-day pullbacks are somewhat common. As pointed out in the original article, over the past few years a two-day pullback has been a great pattern. Market pullbacks have been shallow and these shallow pullbacks have been great entry points. But what about helping to ensure this indicator will work under different conditions?  Testing three or four days consecutive losing days may generate more profitable and/or tradable results.

For past experience I know, in general, deeper pullbacks may provide a better profit vs risk. That is, the generated signals will be fewer in number but will also provide better rewards. So I modified the code and generated the following results based upon the number of days required in the losing streak before opening a new position. During this testing I did not modify the exit rules. They remained the same with two consecutive winning days acting as the exit trigger.

Losing Streak

Baseline

3 Days

4 Days

Net Profit

$25,800

$32,290

$31,925

Profit Factor

1.17

1.37

1.83

Total Trades

300

177

85

% Winners

63%

64%

71%

Avg.Trade Net Profit

$86.00

$182.43

$375.59

Annual Rate of Return

4.89%

5.72%

5.67%

Max Drawdown (Intraday)

79%

66%

64%

As expected we see the number of trades decreases and the average profit per trade increases as we increase the number of losing days. Deeper pullbacks happen less often, but have larger payouts. The four-day losing streak has only 85 trades so I’m going to use the three-day losing streak during the remainder of my testing. This is a good compromise as a three-day pullback does appear to eliminate many shallow and unproductive pullbacks. Below is the equity graph for the three-day losing streak.

Bull/Bear Regime Filter

The next characteristic to explore is the difference between a bull and bear market. I’ll divide the market into two regimes based upon a 200-day simple moving average. The market will be “bullish” when price is trading above the 200-day SMA. The market will be “bearish” when price is below this moving average. Below is the results of the indicator in each of these regimes.

Losing Streak Regime Streak

Bull Only

Bear Only

Net Profit

$14,542

$29,530

Profit Factor

1.39

1.57

Total Trades

94

94

% Winners

69%

62%

Avg.Trade Net Profit

$154.71

$314.15

Annual Rate of Return

3.16%

5.38%

Max Drawdown (Intraday)

54%

73%

Surprisingly, at least to me, we see better performance with the bear market. Overall, both the bull and bear regimes are profitable. The bear regime does suffer from larger drawdowns but it also has the biggest rewards. Notice that both regimes also have the same number of trades. I checked this a couple of times and it does appear to be correct. Given this result, I will not include a regime filter as we test our final modification I wish to test.

5-Day SMA Exit

The 5-Day SMA Exit closes a position once price closes above a 5-day simple moving average. This exit is often used with the RSI(2) system and it’s worth testing here as well. Below are the results of this test vs our baseline. As a reminder, the Baseline column represents the 3-day losing streak with a 2-day exit.

Losing Streak Exit Test

Baseline

SMA Exit

Net Profit

$32,290

$43,475

Profit Factor

1.37

1.68

Total Trades

177

205

% Winners

64%

67%

Avg.Trade Net Profit

$182.43

$212.07

Annual Rate of Return

5.72%

6.95%

Max Drawdown (Intraday)

66%

30%

The power of a good exit! By changing the exit to our 5-day simple moving average we have significantly improved the performance. All metrics have improved. Notice the significant reduction in drawdown. This is huge.

So how does this hold up against the 2-period RSI indicator? Let’s see…

RSI(2) vs Losing Streak

Below is the results of using a two-period RSI with a threshold of 10 vs our 3-day losing streak. Both methods exit when price crosses the 5-day SMA.

Losing Streak vs RSI(2)

Baseline

RSI(2)

Net Profit

$43,475

$45,960

Profit Factor

1.68

1.68

Total Trades

205

183

% Winners

67%

68%

Avg.Trade Net Profit

$212.07

$251.15

Annual Rate of Return

6.95%

7.19%

Max Drawdown (Intraday)

30%

68%

So which one is better? They are very similar in most of the metrics. The maximum drawdown is a lot higher with the RSI(2) system. Again, neither of these tests utilize a stop.

Overall, these are very interesting results. It looks like a simple price pattern could be used as an effective replacement for a short-term indicator. I encourage you to perform your own testing to see if this simple price pattern indicator could be used in your own trading. Maybe you can test what happens if you combine the price pattern with the RSI.  Below you will find the EasyLanguage code for code used in this study.

About the Author Jeff Swanson

Jeff is the founder of EasyLanguage Mastery - a website and mission to empowering the EasyLanguage trader with the proper knowledge and tools to become a profitable trader. Join our EasyLanguage FaceBook group to interact with other EasyLanguage traders! Click the FaceBook icon to join.

follow me on:
  • allanster says:

    Great content. Regarding the final comparison, normally the RSI(2) system would be using the Bull/Bear Regime Filter. It’s metrics would most likely have been higher had one been used for that test.

    I ran a quick comparison on Bitcoin’s Liquid Index with the Bull/Bear Regime Filter in place and with only longs the RSI(2) performance was well over 2X that of Losing Streak.

    However, using both longs and shorts (using 3 up bars) the Losing Streak did indeed slightly outperform the RSI(2) system.

    Keep up the great work!

  • >