abouttheclub
aboutarm2
ARM2 R3
ARM2 R4
ARM3 R1
Research
whyjoin
testimonials
howtojoin
whatsnew
mission
arm2
Downloads
Research
Community
Community
Community
Resources
masthead
navbar_left
OmniTrader VisualTrader SignalWatch Education Nirvana Club Store
navbar_right
lsidebar_top
menu
lsidebar_navbkgd
content_topleft
Research

Candle Pattern Predictor System

Intro:  Trading Candlestick Patterns

Candlestick patterns convey important information regarding market trend change and psychology in a quick and easy manner. Many books have been written on the subject, including several volumes by noted author Steve Nison.

However, most traders do not trade using candle patterns because they are not predictive enough. The prevailing belief (among traders) is that it is not possible to create a profitable system from candle patterns alone. We now have proof that it is possible to create winning candle pattern systems through the application of Artificial Intelligence methods - an exciting development in our Nirvana Club Research.

For this project, we applied Neural Networks to create a mechanically profitable system from candle patterns. To illustrate the theory and practice, we will first review the Engulfing Line test case, and then apply the theory to a collection of 15 important patterns.

The Engulfing Line Pattern


According to Steve Nison, author of Japanese Candlestick Charting Techniques and widely acknowledged to be the Western expert in the field of candlestick chart analysis, "the engulfing pattern is a major reversal signal". From this assessment, we conclude that this is a good pattern to use for a test case.


The Bullish and Bearish Engulfing Patterns

We wrote an Excel spreadsheet to test the validity of this theory. The Engulfing Line pattern was defined to evaluate the profitability of this pattern using a 2% trailing stop. Here the performance results obtained from generating long and short signals at every bullish and bearish engulfing pattern encountered during the past year for the stocks in the S&P 500 list:

Number of trades

3,628

Profitable trades

1,296

Avg. hit rate (%)

35.74

Average net profit (%)

-2.12

Avg profit/Trade (%)

-0.23


Performance Report for the Engulfing Pattern System with the Neural Network disabled.
(Note: These results were obtained using a 2 % Trailing Profit Stop).

It is clear that candle patterns should not be used indiscriminately to generate automatic signals. Nison himself stresses the importance of combining the use of candlestick pattern recognition with traditional Western trading techniques. However, we felt that it should be possible to trade candle patterns, provided we only trade the "most powerful" cases. Such cases would be determined from the structure of the patterns and where they occur, quantified through the application of a Neural Network.

The Neural Network Approach


In order to automatically choose the engulfing patterns that are most likely to identify an actual trend change, we used a Neural Network. Every time an engulfing pattern is encountered, 19 different measurements (including classic indicators such as moving averages, volatility, etc.) are made on the stock price history. Next, a neural network is run with the 19 measurements as inputs in order to obtain an educated prediction of the stock price movement for the bar following the pattern. The neural network was previously trained with measurements and target outputs collected over several years of data, prior to the past year (i.e., the "training period" did not overlap with the testing period).

The following performance results were obtained by automatically trading the engulfing patterns in the stocks in the S&P 500 over the past year. This time we avoided firing a signal if the neural network predicts a price movement in the desired direction that is smaller than the threshold parameter. For example, after a bullish engulfing pattern and with a threshold of 1%, a signal will be generated only if the neural network predicts an increase in stock price of 1% or higher.

Threshold

1%

2%

2.5%

Number of trades

182

11

4

Profitable trades

68

5

3

Avg. hit rate (%))

37.34

45.36

75.00

Average net profit (%)

0.53

4.11

10.50

Avg profit/Trade (%)

0.36

4.48

10.50


Performance Report for the Neural Network Predictor System run on the Engulfing Patterns only.
(Note: The data in the backtest period was not used to train the network).

The results show that the neural network can successfully identify the strongest engulfing patterns: the higher the threshold, the higher the profit performance.

Implementation

We note that high thresholds result in excellent results - but very few signals are generated. In order to increase the number of signals, we trained separate networks for 15 of the most successful candlestick patterns. The Candle Pattern Predictor system will automatically identify all instances of these 15 patterns and run the respective networks to return an educated guess for the next bar's price movement.

Because different patterns showed to be characterized by different threshold values, the threshold range for each pattern was normalized to fit values between 0 and 100. This normalization procedure was done through observation of results collected individually on each pattern and allows us to define one global parameter that is meaningful while trading all 15 patterns.

Normalized Threshold

0

25

50

75

100

Number of trades

1,930

715

292

120

54

Profitable trades

717

289

125

46

30

Avg. hit rate (%))

37.17

40.43

42.82

38.33

55.56

Average net profit (%)

-0.08

1.29

2.94

4.40

9.83

Avg profit/Trade (%)

0.06

1.38

2.55

4.13

9.47


Performance Report for the Neural Network Predictor System run on the 15 most successful candlestick patterns.
(Note: The data in the backtest period was not used to train the network).

While the hit rates are not as high as our Engulfing Line test case, we are clearly seeing mechanical profitability for all normalized thresholds above 25.

Download Now Available
for Members

Members can download the Candle Pattern Predictor System to experiment with.


All contents © 1999-2005 Nirvana Systems, Inc. unless otherwise noted.
OmniTrader, VisualTrader, ARM2, and SignalWatch are trademarks of:

Nirvana Systems, Inc.
7000 N. Mopac, Suite 425
Austin, Texas 78731 USA
Phone: 512-345-2545 Fax: 512-345-4225
Disclaimer and Privacy Policy