How effective is candlestick analysis in cryptocurrency trading? … Application methodology, statistics, data.
- Mining data on cryptocurrencies.
- Candlestick analysis patterns: bullish hammer and bearish hammer.
- Characteristics of subgroups of patterns.
- The effectiveness of the bullish hammer pattern.
- The effectiveness of the bearish hammer pattern.
Candlestick analysis is one of the standard approaches in trading. With its help, the current situation is assessed, a decision is made to buy or sell cryptocurrencies. He, as a method, migrated from trading on commodity exchanges and stock exchanges to crypto trading. Candlestick analysis is based on standard patterns that are “sign”. These patterns are usually associated with a change, the beginning of trends. There are many materials, articles, books devoted to candlestick analysis. But … the market is volatile. And … it is interesting to determine how effective candlestick analysis patterns are? How many are formed and do they meet expectations? Candlestick analysis contains a significant number of patterns in its arsenal. In this part we will look at:
Bullish hammer, bearish hammer.
Mining data on cryptocurrencies
At the time of this writing, we have historical data on more than 1,000 cryptocurrency pairs. It is difficult to carry out the task without the use of software processing.
We will use Python 3.7.7 as processing tools. We use libraries such as: scipy, numpy, pandas, plotly. Data mining is done using the Binance API. Sample size – 90 periods. We will use daily data. Note, as practice shows, the data obtained through the API can sometimes differ insignificantly from the data on the graphs. But … if you send trade orders via the API, this fact is not essential.
Candlestick Analysis Patterns: Bullish Hammer and Bearish Hammer
Before moving on to the effectiveness of the pattern, let’s first give a precise definition of it. Any candlestick is formed at the following indicators: Open, High, Low, Close. Sometimes, in addition to the pattern, trading volumes are considered. It is considered that if a pattern is characterized by a high Volume, it has a high predictive power. The bullish hammer looks like this:
This pattern is associated primarily with the change of the bearish trend to the bullish one. Let’s give it a more accurate description. A bull hammer is one candlestick that:
- is at the bottom of the downtrend;
- has a long bottom wick; the bottom wick should be at least twice the body of the candle itself.
- the existence of an upper wick is allowed; but it should be no more than the body of the candle itself
If the bullish hammer meets our expectations, then an upward trend occurs. This means that the candle following a bullish hammer has a closing price higher than its opening price. If the pattern works, the trader can capitalize on the next advance. Let’s designate the candlestick following the pattern as position number 0. This is a predicted candlestick. Let’s number the candles starting with the predicted one. Obviously, as a result, two situations can arise: when the bullish hammer works (left) and when the bullish hammer does not work (right):
If you look closely at the definition of a hammer, the only vague term is trend. We will also give him the necessary characteristics. By trend we mean at least two candles in front of the pattern itself. These candles have the following features:
- the opening price of candle 2 is less than the opening price of candle 3;
- the closing price of candle 2 is less than the opening price of candle 3;
- the closing price of candle 2 is less than the closing price of candle 3;
- we will not impose strict restrictions on the wicks of candles 2 and 3.
The same relationship between candlesticks 2 and the bullish hammer itself (except for the fifth point).
There are bullish and bearish hammers. In a bullish, the opening price is higher than the closing price. In bearish, the opposite is true. The purpose of using both bullish and bearish hammers is to successfully forecast growth. We will consider the forecast efficiency using the pattern only for one period ahead. Let us now describe everything in the form of expressions:
Forecast target of the candlestick pattern- >
(Close_0 – Open_0) > 0
For the bull’s hammer:
(Open_1 – Low_1) / (Close_1 – Open_1) >= 2
(High_1 – Close_1) <= (Close_1 – Open_1)
For the bear’s hammer:
(Close_1 – Low_1) / (Open_1 – Close_1) >= 2
(High_1 – Open_1) <= (Open_1 – Close_1)
The previous trend is described as:
Open_2 < Open_3
Close_2 < Close_3
Candles 2 and 3 should not be hammers:
(Close_2 – Low_2) / (Open_2 – Close_2) < 2
(Close_3 – Low_3) / (Open_3 – Close_3) < 2
Open_1 < Open_2
Open_1 < Close_3
Close_0 != Open_0
Close_1 != Open_1
Close_2 != Open_2
Characteristics of subgroups of patterns
Our software processing determines, taking into account the above parameters, the places in the time series where the considered patterns (bullish hammer and bearish hammer) occur, as well as how well these patterns predicted the candle of position 0.
Each of the patterns, both bullish and bearish, can be, in turn, divided into two groups. There is a bullish hammer with a good forecast and a bad one; there is also a bearish hammer with good and bad forecast results. Thus, we have four data samples. Each of the samples is characterized by the number of rows, trade volumes, and the number of transactions. We have data that characterize both the pattern itself and the candles that precede it.
Let’s first consider such a characteristic as the number of copies for each of the four groups.
Сount in descriptive statistics:
Yes, it is shocking, but…. it looks like both bull hammer and bear hammer work as uptrend anti-predictors! For example, the number of good results for bull hammers is only 55 versus 129 bad predictions. In other words, it should be said that after the bullish and bearish hammers in the trend continuation should be expected. Let’s calculate the percentage of such cases. Total number of hammers:
451 = 129 + 55 + 183 +84
Number of successful predictions with hammers (bullish and bearish):
30.82% = ((55 + 84) /451) x 100
Number of unsuccessful hammer predictions (bullish and bearish):
69.18% = 100 – 30.82
So, if we consider a sample for the hammer pattern (as of mid-November 2020), in almost 70% of cases this pattern will signal a continuation of the bearish trend, but not a reversal (as evidenced by its classical interpretation)!
But … maybe in the samples under consideration there are certain subgroups of patterns that are characterized by a high value of Volume or Number of trades, and … are these subgroups that have good predictive properties? It is often said that if candlestick analysis does not work … then you need to look at the candlestick volumes. To what extent does this correspond to the truth? … Well … let’s consider the associated indicators to the candles. We obtained the following data on the mean values for each of the four samples:
Mean in descriptive statistics:
bad_bull_hammer_Volume_1: 22 461 563.49698632
bad_bull_hammer_Volume_2: 24 826 065.93553841
bad_bull_hammer_Volume_3: 17 434 582.21100360
bad_bull_hammer_Number_of_trades_1: 3 596.86046512
bad_bull_hammer_Number_of_trades_2: 4 379.82945736
bad_bull_hammer_Number_of_trades_3: 4 298.12403101
good_bull_hammer_Volume_1: 26 002 654.95037273
good_bull_hammer_Volume_2: 28 774 375.77019454
good_bull_hammer_Volume_3: 31 397 300.67297274
good_bull_hammer_Number_of_trades_1: 1 569.94545455
good_bull_hammer_Number_of_trades_2: 1 502.03636364
good_bull_hammer_Number_of_trades_3: 1 685.69090909
bad_bear_hammer_Volume_1: 17 187 040.19074889
bad_bear_hammer_Volume_2: 14 904 596.33520650
bad_bear_hammer_Volume_3: 11 489 947.73774273
bad_bear_hammer_Number_of_trades_1: 4 447.78688525
bad_bear_hammer_Number_of_trades_2: 3 838.09289617
bad_bear_hammer_Number_of_trades_3: 3 897.27868852
good_bear_hammer_Volume_1: 6 105 996.44068204
good_bear_hammer_Volume_2: 9 007 419.26174494
good_bear_hammer_Volume_3: 13 482 892.66293403
good_bear_hammer_Number_of_trades_1: 2 433.42857143
good_bear_hammer_Number_of_trades_2: 2 689.15476190
good_bear_hammer_Number_of_trades_3: 2 289.58333333
The data of medians for all parameters are also interesting:
Median (50% quantile) in descriptive statistics:
bad_bull_hammer_Volume_1: 194 372.21000000
bad_bull_hammer_Volume_2: 217 453.70000000
bad_bull_hammer_Volume_3: 242 236.96000000
good_bull_hammer_Volume_1: 350 356.32000000
good_bull_hammer_Volume_2: 216 795.90000000
good_bull_hammer_Volume_3: 234 701.00000000
bad_bear_hammer_Volume_1: 425 860.43000000
bad_bear_hammer_Volume_2: 415 960.00000000
bad_bear_hammer_Volume_3: 262 964.98000000
bad_bear_hammer_Number_of_trades_1: 1 210.00000000
good_bear_hammer_Volume_1: 137 924.40000000
good_bear_hammer_Volume_2: 96 082.99000000
good_bear_hammer_Volume_3: 85 217.27500000
The effectiveness of the bull hammer pattern
The situation is more than interesting. It can be seen on histograms. Some of the predictions are not successful, some are successful. What are the values of the Volume indicator for those cases when the predictions using the pattern were not successful? This is evidenced by the following Volume histogram for unsuccessful predictions:
And here is what the histogram for Volume looks like for successful predictions:
What does this mean? IIndeed, during the period under review, large Volume values accompany correct bullish hammer predictions. In other words, if we observe a bullish hammer and Volume> 1.0 (scale 1e9), we can predict with a very high degree of probability that the price will rise in the candlestick following the pattern. Yes, the pattern works within the period under review, but with certain reservations. It is important to understand: in order to use this trading technique, constant monitoring of the current market is required. We emphasize that we are analyzing more than 1000 cryptocurrency pairs and consider the performance of the pattern as such. Obviously, for certain groups of cryptocurrencies, the statistics of the pattern applicability (bullish hammer) may differ; the Volume level may also change over time.
The cryptocurrency market is volatile, but … our monitoring software processing works with it. You can find out how applicable this pattern is at the current time (we are not talking about the time of writing these lines; but about the time when you read these lines) at www.cryptosensors.info
A good prediction quality by the pattern is accompanied by a high level of the Volume factor. This confirms the concept of the Truman effect. You can familiarize yourself with the concept of the Truman effect in the research “Guide Indicators in Cryptocurrency Trading or the Truman Effect in Action. Weak correlations are in the arsenal of a trader.” at www.cryptosensors.info.
Let’s turn to the indicator of the number of trades (Number_of_trades). In the same way, we will divide all cases into two groups: successful and unsuccessful from the point of view of forecasting.
One notable difference can be observed on the histograms. Unsuccessful cases are characterized by the fact that the values of the number of deals are “smeared” across the entire horizontal line. Successful cases are more crowded on the left.
This fact provides an additional characteristic for trading with the bullish hammer. So the bull hammer is working. But…. There are nuances that you should pay attention to.
Effectiveness of the bearish hammer pattern
The bear hammer illustrates human perception in a rather entertaining way. Both bullish and bearish have a similar picture. It would seem that the only difference between them is the color. A person is usually inclined to operate with templates. It’s easier. This is understandable: digging into details is energy-intensive and does not guarantee interesting calculations. But … let’s be patient and take a close look at the bear hammer!
The charts clearly show that trading volumes can in no way help us use the bearish hammer. Anti-forecasts come true more than 2 times more often than forecasts (183/84)!
Sad?…. Not much! This means that it is possible to use this pattern as an indicator of the continuation of the bearish trend! What additional information can be extracted from the Number of trades indicator?
The situation is similar to the one we saw above for the bullish hammer. The value of the number of deals has a wider range for unsuccessful pattern predictions. Conversely, successful forecasts are characterized by a narrower range.
Is it possible to use candlestick analysis when trading cryptocurrency pairs? Of course, but … with certain reservationsand subject to the values of certain criteria. Before using candlestick patterns, you need data for monitoring the current situation on the crypto market. The market is volatile.
Both patterns, bearish hammer and bullish hammer in the classical interpretation, indicate a trend change. We saw that these are patterns that are completely different in their application. A bullish hammer with high volumes and small numbers of trades most likely indicates a reversal of the bearish trend. The bearish hammer actually indicates the continuation of the bearish trend.
What patterns are producing consistent results at the moment? Are they oracles … or anti-oracles? … The point is that pattern predictions are not limited to the effect of a 50/50 coin toss. After all, if the “anti-cancer” has a ratio of incorrect 70% and correct 30% … you can do the opposite!
You can find out how applicable the patterns described here are for the current time (we are not talking about the time of writing these lines; but about the time when you read these lines) at www.cryptosensors.info
You may be interested in research / data:
- Research: Guide Indicators in Cryptocurrency Trading or the Truman Effect in Action. Weak correlations are in the arsenal of a trader.
- Research: Quotes of cryptocurrency pairs. Collection and processing. What should a trader know about?
- Research: How and with what to analyze the connections of cryptocurrency pairs?
- Data: Cryptopairs quotes in xlsx format.
- Data: Comparable data for ten well-known cryptopairs.
- Data: Exchange candlestick analysis. Evaluating the use and effectiveness of patterns. Patterns: Bull hammer Bear hammer.
- Data: Search data for Truman zones ALMOST ALL (guide indicators for cryptocurrency pairs).
- Data: Cryptopairs-relationships.