• : Prashant Shah

Data Testing

Now that we have a clear definition of all reversal patterns that can occur in the Three-Line break chart, let us check the percentage of their occurrences.

Below is a pie chart that shows the percentage of occurrence of Bullish reversal patterns.


19

Below is a pie chart that shows percentage of occurrence of Bearish reversal patterns.

20

It shows that Trend reversal pattern occurs the most. Occurrence of Expanding pattern is relatively less. Around 70% of occurrences are of trend reversal pattern. That means, most of the time reversal occurs after previous three lines are of same colour. It would be interesting to see how these patterns performed.

Considering above setups as entry point it is required to define exit points. Let us test it considering change of line as exit pattern, the basic method that we mentioned while discussing each pattern.

Below is a backtested data that shows how these patterns performed when exit is upon bearish change of line.

4

Based on this information, one can plan trading specific patterns on a group of stocks. Specific patterns with less or moderate occurrence ratio can be traded on a large set of groups.

Below is the data for bearish patterns when method of exit is bullish change of line.

5

Bifurcation seems to be helpful here. Expectancy improved especially for patterns other than trend reversal. Does that mean bearish patterns need aggressive exit? We will explore this point.

Let us change the method of exit to swing breakout instead of change of line.

Below is data of bullish patterns with exit method as swing low breakout.

6


The expectancy and average return for Bullish shakeout patterns improved significantly.

The expectancy, risk-reward ratio and average return increased significantly but success ratio is compromised. Remember, money is made by risk-reward ratio not by success ratio.

Below is a table for bearish patterns with exit method as swing high breakout.

7

The exit based on bullish swing breakout does not prove rewarding for bearish patterns.


We have discussed two exit patterns: Change of line and swing breakout patterns. Change of line is too aggressive, it can make us exit early and turn out to be a shake-out pattern. Two lines against the trend can turn out to be a rounding bottom or top pattern. Exiting on three lines against the trend will take care of these issues. Meaning, three bearish lines in a row after a bullish trade or three consecutive bullish lines after a bearish trade is a point to exit. This is considered because Shakeout & Rounding patterns require up to two lines against the trend so their occurrence will be taken care of by considering this rule as an exit setup. 

Below is a table that shows data of all patterns we have discussed above if exit is made when three consecutive lines occur against the trade or swing breakout whichever occurs first.

8

9

It seems that increasing the timeframe improves the results for the long only approach in the bull run. The exit pattern should not be aggressive so that trends can be ridden. There is a possibility to design trade strategies on higher timeframes such as weekly and monthly.

Below is a back-tested data of trading based on change of line patterns on weekly and monthly time frame.

Weekly Monthly BT

In above table, closing price of last day of week for Weekly timeframe and last day of month for Monthly timeframe is considered for back-testing because pattern gets locked on that day. It makes the numbers more practical.

Notes from testing

Detailed Back-testing and analysing the system using different statistical ratio is a different subject. There is a possibility of in-sample and out-of-sample testing, drawdown ratio etc. I am focussing on the performance of patterns which depends on the method of exit that we use. 

While I have used the Data testing method as well to analyse the patterns. But let me explain my take on the method of back-testing. Market may not necessarily function this way. What occurred in the past can be different from what is in store in future. Phases can change drastically.  The testing essentially gives us a general idea about the past performance. Markets are dynamic and every time there could be some other element that can ruin well-tested setups. Back testing is a tool to develop our market understanding, analysing the past occurrences and can improve our understanding of setups and market behaviour.


I am aware that when I am testing the data on stock prices of the last 15 years in India, I am bullish biased. Because most of the market trends have been bullish during these years. The results might be different if I do it in Japanese market for the same period. Indian markets have not seen a long-term phase of congestion or bear market. I wish it doesn’t happen, but history says these phases are inevitable in the history of any country or market. We might witness some phases we never saw in the past, there are always unknown-unknowns.

So, we need to be aware that the nature of setup changes. Data testing gives us flexible ideas and knowledge of what has worked in the past. It can help us in designing trading systems and to be aware about past performance. Some other methods of filtering stocks such as Breadth and Relative strength analysis might improve the results. 

Let us try to learn from the Data that we studied using Line-break patterns.


It seems that the exact opposite of long setup does not work for short trades. Probably because the inherent nature of the market is bullish, and downside is limited but up-side is infinite.

Bullish setups that did not work in the bullish phase are less reliable. The bearish setups that did not give awfully bad performance in the bullish phase might do better in the bearish phase.

Above testing helps us to know that bearish patterns need different treatment. For bullish patterns, entry and exit based on swing breakouts are effective. Bifurcation of reversal patterns can help in filtering the stocks based on the pattern type. For example, a setup such as a combination of shakeout and expanding pattern can be designed.

For bearish patterns, exactly the opposite did not work. Aggressive exit setups such as change of line were better. For bullish trades, higher the time frame better it is and aggressive exits are not useful. It seems opposite for the bearish trades. How about going to the lower timeframe for testing bearish setups or changing the reversal lines, and exploring some other ways of exiting the trade such as booking profits upon achievement of projected levels. We will explore these ideas in the coming chapters.

Thoughts

There is a method of reversal in other noiseless charts such as Point & Figure (Column-reversal), Renko (Brick-reversal) or Kagi (Turnaround amount). We cannot bifurcate the reversal patterns in those charts, it is only possible in Line-break charts. This aspect of exploring unique properties of different charting methods is not yet explored.

All this bifurcation of patterns and many other things that I am going to share in this series is my work and only possible because Definedge made it possible. The bifurcation, programming and backtesting became possible because of tremendous efforts by the people in the company.

I have broadly categorized those structures. But it cannot just be limited to this. There can be many combinations and setups that can be designed by combining such lines. It can also be combined with various indicators and tools. I am going to explain such systems in later chapters, and I am sure it is going to be an interesting discussion.

What we have discussed so far is for your knowledge and understanding. It is not enough for trading. Length of line is an important aspect of Line-break charts which we are going to discuss in the next chapter.

Major issue with learning in the field of trading is that everything is associated with trading. Focus is not on concepts, but on trading. Such a short-term approach would not yield long-term success in any field, trading is not different.

Next chapter - Coming Soon!