Technical analysis Chart analysis

Studying the "Head-and-Shoulders" Pattern

Елена Берсенева 22 December 2021 791 4 Studying the «Head-and-Shoulders» Pattern

The Head and Shoulders pattern has been known for a long time. John J. Murphy was the first who gave a detailed description of the pattern and visualized it in the book titled "Technical Analysis of Futures Markets: Theory and Practice".


The Head and Shoulders pattern implies a transition from an uptrend to a downtrend. There is also an Inverted Head and Shoulders pattern that appears in a downtrend and signifies a potential reversal point to an uptrend.


The pattern is quite common, but, in fact, rarely seen on charts in its original form.

Hypothesis
To conclusion

The Head and Shoulders signals a reversal of the current trend.

To conclusion

In the book titled "Technical Analysis.The Complete guide", Jack Schwager characterized the pattern in the following way:


The Head and Shoulders is one of the most popular chart patterns. This formation represents a configuration of three peaks, and the middle one is above the preceding and the next. Similarly, the Inverted Head and Shoulders is a configuration of three trenches, and the middle is lower than the neighboring ones."


The Head and Shoulders pattern appears under specific conditions.


The pattern is visible if it occurs at the peak of an uptrend. It represents three consecutive peaks, the middle one is higher than the other two, and the bases of the peaks are on the same line called the support line. This line is commonly known as the neckline (Fig.1).

Studying the «Head-and-Shoulders» Pattern - Photo 1

The Inverted Head and Shoulders pattern is the mirror image of Head and Shoulders. Hence, it is typically seen in downtrends. The rest of the figure is analogous to the original pattern (Fig. 2).

Studying the «Head-and-Shoulders» Pattern - Photo 2

In our study, we use the ZIgZag indicator to find peaks and bottoms on the charts when forming these patterns.


ZigZag is a trend indicator. It displays lines on the chart connecting local minima and maxima that outline the trend direction. The indicator contains three parameters. They indicate the Zigzag’s direction and its minima and maxima. Changes of parameters determine the degree of the indicator’s sensitivity to the price movements. If we increase the values to calculate, the number of local minima and maxima decreases. Therefore, in theory the fewer lines are displayed on the chart, the fewer patterns are formed, but the larger they are in size (the price movements also get aggregated).


The ZigZag indicator is a basic tool in this case, as the final formation of the last (floating) indicator line is not required tofind entry points to the market.


In our study, we take ZigZag with parameters set to 5.3.3 to shape small patterns and 12.5.3 to shape larger patterns. The second group is default parameters set in the ZigZag indicator.


We test trading signals generated by the Head and Shoulders pattern and its mirrored pattern on a large volume of historic data of financial instrument and on two timeframes.


Now, let's discuss the conditions for opening and closing a trading position.


Opening a position:

After the signal is formed, a position is opened at the opening of a new candlestick:

  • The Head and Shoulders pattern is a sell signal;
  • The Inverted Head and Shoulders pattern is a buy signal.


Closing a position:

In all conditions, the position lifetime is set to 5 or 10 (in candlesticks).

Data used

Next, we determine the set of financial instruments and their timeframes which we test the trading signal on. This sample will be given by:

  • 23 currency pairs (Forex);
  • 6 commodity futures (Commodities);
  • 2 stock indices (Indices);
  • 30 shares included in Dow30 (Stocks).


Timeframes used:

H1 (1 hour) – 5 - year history,

D1 (Daily) – 10 - year history.


The sample consists of 2,124,495 values.

Having defined all the conditions and set the necessary parameters, let's go down to testing!



Analysis of the results


Firstly, we estimate the results by the sample size.



ZigZag with 5.3.3 parameters (small patterns):


For the 1-hour timeframe (H1):


Type of financial instruments
Number of candlesticks
Number of events
Forex
994755
4719
Commodities
191850
710
Indices
87600
292
Stocks
628011
3282



For a daily timeframe (D1):


Type of financial instruments
Number of candlesticks
Number of events
Forex
83950
494
Commodities
21900
123
Indices
7300
44
Stocks
109129
543


Total: 2,124,495 candlesticks and 10,207 events (the Head and Shoulders patterns and its mirrors).



ZigZag with 12.5.3 parameters (larger patterns):


For the 1-hour timeframe (H1):


Type of financial instruments
Number of candlesticks
Number of events
Forex
994755
2446
Commodities
191850
420
Indices
87600
195
Stocks
628011
1396



For a daily timeframe (D1):


Type of financial instruments
Number of candlesticks
Number of events
Forex
83950
205
Commodities
21900
55
Indices
7300
9
Stocks
109129
203


Total: 2,124,495 candlesticks and 4,929 events (the Head and Shoulders patterns and its mirrors).


As expected, the number of events gets smaller when the patterns get aggregated.


Next what we analyze is the share of events in the total number of initial candlesticks by aggregating data from two timeframes:



ZigZag with 5.3.3 parameters (small patterns):


Type of financial instruments
The share of events, %
Forex
0.48
Commodities
0.39
Indices
0.35
Stocks
0.52
Average
0.44



ZigZag with 12.5.3 parameters (larger patterns):


Type of financial instruments
The share of events, %
Forex
0.25
Commodities
0.22
Indices
0.21
Stocks
0.22
Average
0.22



The results on grouping have shown that the distribution of events is roughly the same, i. e. the first case - from 0.35 to 0.52% and the second one - from 0.21 to 0.25%, regardless of the types of financial instruments. To be clearer, the Head and Shoulders pattern and its inverted version are rarely seen on charts in their original form. And larger patterns are even less common.


Next, we consider the results of handled trading signals received from Head and Shoulders patterns and its mirrors.


We evaluate the results according to two criteria:


  • Momentum (m) – reflects the average increment rate of financial quotes when fixing positions, in %. The positive momentum value indicates the profitability of handled signal, a negative one indicates the loss.
  • SPP – the share of profitable positions, %.



ZigZag with 5.3.3 parameters (small patterns):


Momentum in % and the share of profitable positions in % in terms of holding positions, timeframes and types of financial instruments:


Indicator
5th candlestick
10th candlestick
H1
D1
Forex
Commodities
Indices
Stocks
m
0.084
0.068
0.043
0.109
0.104
0.107
-0.118
0.061
SPP
52.5
52.2
51.4
53.4
53.0
52.0
52.9
51.9


For 7 out of 8 parameters, the average momentum values are positive.



ZigZag with 12.5.3 parameters (larger patterns):


Momentum in % and the share of profitable positions in %, in terms of holding positions, timeframes and types of financial instruments:


Indicator
5th candlestick
10th candlestick
H1
D1
Forex
Commodities
Indices
Stocks
m
0.214
0.287
0.151
0.351
0.014
0.496
0.077
0.395
SPP
53.9
52.7
53.0
53.7
52.2
56.4
50.7
53.7


For all the parameters, the average momentum values are positive.



Note that when the Head and Shoulders and the Inverted Head and Shoulders patterns get aggregated, the momentum and the share of profitable positions increase as well.


Thus, we outline some features.


To do this, we can visualize the results in the form of momentum distribution (i) over each parameter (position closing candlestick, timeframe, type of financial instruments):

Studying the «Head-and-Shoulders» Pattern - Photo 3Studying the «Head-and-Shoulders» Pattern - Photo 4

The charts above illustrate the distribution of momentum depending on the parameters. The chart consists of two parts: a "box" and "tails" (or "whiskers"). 50% of the observed values are placed within the box, the remaining 50 are represented with tails. The end of the lower tail shows the smallest of the observed values, the end of the upper tail is the largest one. The cross shows the average value.


The analysis of the results allows us to make the following preliminary conclusions:


  • for small patterns, the average momentum value when fixing the positions on the 5th candlestick is higher than the mean fixation on the 10th candlestick. This indicates more profit-making closing positions on the 5th candlestick; for larger patterns, the profitability is higher on the 10th candlestick;
  • in both cases, the average momentum value on the daily timeframe is higher than on the hourly one, which indicates that the signal operation is more profitable on the daily charts;
  • in both cases, the best momentum (comparing to others) is fixed on the Commodity financial instrument.


Let’s review the results in terms of holding positions, timeframes and types of financial instruments.


Take the notation keys:

«H1 / 5» – fixing the position on the 5th candlestick when working on the 1- hour timeframe;

«H1 / 10» – fixing a position on the 10th candlestick when working on the 1-hour timeframe;

«D1 / 5» – fixing a position on the 5th candlestick when working on the daily timeframe;

«D1 / 10» – fixing a position on the 10th candlestick when working on the dailytimeframe,

SPP – the share of profitable positions, %.



ZigZag with 5.3.3 parameters (small patterns):


Н1/5
Indicator
Forex
Commodities
Indices
Stocks
All
Number of signals
4719
710
292
3282
9003
Momentum
0.014
0.182
0.044
0.058
0.075
SPP
51.0
53.2
54.2
51.4
51.5
Н1/10
Indicator
Forex
Commodities
Indices
Stocks
All
Number of signals
4719
710
292
3281
9002
Momentum
0.016
0.070
-0.001
0.039
0.031
SPP
51.1
52.3
50.7
51.2
51.2
D1/5
Indicator
Forex
Commmodities
Indices
Stocks
All
Number of signals
494
123
44
543
1204
Momentum
0.158
0.370
-0.294
0.056
0.073
SPP
53.8
52.9
45.3
54.0
53.5
D1/10
Indicator
Forex
Commodities
Indices
Stocks
All
Number of signals
493
123
44
543
1203
Momentum
0.227
-0.194
-0.221
0.090
-0.024
SPP
56.2
49.5
61.2
51.2
53.2



ZigZag with 12.5.3 parameters (larger patterns):


Н1/5
Indicator
Forex
Commodities
Indices
Stocks
All
Number of signals
2446
420
195
1396
4457
Momentum
0.026
0.132
0.009
0.257
0.106
SPP
53.5
54.4
52.1
53.9
53.7
Н1/10
Indicator
Forex
Commodities
Indices
Stocks
All
Number of signals
2446
420
195
1396
4457
Momentum
0.034
0.427
0.006
0.196
0.166
SPP
53.5
55.1
50.9
50.8
52.3
D1/5
Indicator
Forex
Commodities
Indices
Stocks
All
Number of signals
205
55
9
203
472
Momentum
0.008
0.393
0.095
0.476
0.243
SPP
52.5
55.3
46.4
55.7
54.1
D1/10
Indicator
Forex
Commodities
Indices
Stocks
All
Number of signals
205
54
9
203
471
Momentum
-0.012
1.033
0.197
0.650
0.467
SPP
49.4
60.9
53.6
54.6
53.2



Summing up the results using the charts:


ZigZag with 5.3.3 parameters (small patterns):

Studying the «Head-and-Shoulders» Pattern - Photo 5Studying the «Head-and-Shoulders» Pattern - Photo 6

ZigZag with 12.5.3 parameters (larger patterns):

Studying the «Head-and-Shoulders» Pattern - Photo 7Studying the «Head-and-Shoulders» Pattern - Photo 8

The results:

  • The signals received from small patternsshow the best momentum of 0.075% on the 1- hour timeframe when fixing a position on the 5th candlestick.
  • The signals received from larger patternsyield the largest momentum of 0.467% on the daily timeframe when fixing a position on the 10th candlestick.


Conclusion

Overall, the signal of the Head and Shoulders pattern typically takes some profit when forming large patterns (ZigZag with 12.5.3 parameters) on the daily timeframe.


Thus, the positive impact of the Head and Shoulders pattern has been confirmed.

Detailed results are given in the appendix:

XLSX (0.51 MB)Application to the article 'The study of the figure Head and shoulders' eng.xlsx

Comments

4

Write the comment

Commenting rules
Only authorized users can leave comments. Sign in, please.
Only users with verified email can leave comments. To verify your email, click on the link in the message that has been sent to your email address . Send an email for activation again.