Photo
Interesting events for all existing cryptocurrency pairs
0 notes
Text
Guide indicators in cryptocurrency trading or the Truman effect in action. Weak correlations are in the arsenal of a trader.
Author: Evgenii Bodiagin
From author: Cooperation proposal for the supply of data
How to use weak correlations in cryptocurrency trading? What is the Truman Effect? Guide indicators for cryptocurrencies - is it possible?
Content:
Introduction
Mining data on cryptocurrencies.
Principles of searching for guides for cryptocurrencies.
Guidelines for cryptocurrencies? ... Are there any? ...
The Truman effect in action.
Conclusion
Introduction
On stock exchanges, traders often use the technique of trading using guide indicators. The principle is extremely simple. If the movement of the stock you are trading with a delay follows the movement of some index, this index is a predictor (oracle) for this stock.
Obviously, the success of this technique is based on the stability of the response movements of the instrument you are trading in response to the movements of the guide indicator. If repetition occurs only occasionally, you need to look for a "predictor" who will be more successful.
But ... is it possible to use guide indicators in cryptocurrency trading? On stock exchanges, composite and derivative indices from stocks, shares of competing companies, etc. are often used as guide indicators.
Let's first ask ourselves a question: what are expectations in the stock market? This is primarily faith. Often, stock prices are not clearly linked to the size and type of assets. As an example: to what extent do we believe that hydrocarbon technologies have outlived their usefulness? If the belief in wind turbines is inexhaustible, it is obvious that the shares of the companies concerned will skyrocket. There is no magic in this.
In the crypto world, faith takes on an even more weighty character. It is faith that is the basis of cryptocurrency rates. Have you seen faith in its concentrated form? Take a look at the charts of the crypto pairs. That's her.
It is natural for a person to put everything “on the shelves”, to analyze everything around. This invisible roulette-scale: "better or worse" - it is with us everywhere. This is how cryptocurrency priorities are born. They are built from faith and a natural desire to order the world around us. One cryptocurrency is becoming "more important" in people's minds than another.
But what if ... one cryptocurrency pair helps predict the behavior of another? In other words, are there links: a led cryptocurrency pair and a leading cryptocurrency pair (guide indicator). By observing the behavior of the leading cryptocurrency pair, we will be able to predict the movement of the leading cryptocurrency pair. How many such bundles are there? This is what will be discussed.
Mining data on cryptocurrencies
By tradition, we consider the Binance crypto exchange as a source of data on cryptocurrency pairs. We will use Python 3.7.7 as processing tools. We use libraries such as: scipy,numpy,pandas, plotly. At the time of this writing, we have historical data on 1 160 cryptocurrency pairs. We will consider hourly data. Data mining is done using the Binance API. Sample size - 90 periods. We consider all cryptocurrency pairs available at the time of this writing.
The subject of consideration will be the following indicator:
Growth_rate_Close = Close temp hour / Close last hour
Those. if, for example, this ratio is 1.015, the closing price has increased by 1.5%. If the value, for example, is 0.98, then the price has dropped by 2%. Thus, we analyze not the absolute values of the closing prices of cryptocurrency pairs, but their gains.
Principles of searching for guides for cryptocurrencies.
The technique of finding a guide is extremely simple. We make an assumption that some pair, for example, it will be pair_aavebusd_1h, is a good guide indicator for the pair_aavebtc_1h crypto pair.

We need to check the statement: if pair_aavebusd_1h grew an hour ago, now, at this hour, pair_aavebtc_1h should also grow. If such a connection exists and has a good level of significance, we can say that a guide indicator has been found for the pair_aavebtc_1h crypto pair - this is pair_aavebusd_1h. In other words, when analyzing the relationship, we take the data on the guide indicator from the previous period.
We are not talking about regression analysis here. We only need to determine the closeness and direction of the relationship. We are not talking about how much the leading cryptocurrency pair will grow, depending on the value of the guide indicator (the leading cryptocurrency pair). We are not trying to derive the functional dependence of such a relationship here. We only need to answer the question - will it grow after the guide and how stable such a connection is.
Looking ahead, we note that the existence of anti-guides is also possible - when there is a connection but ... with a minus sign (ie, an increase in the leading cryptocurrency is accompanied by a decrease in the led cryptocurrency).
So, we have at our disposal data on more than 1160 cryptocurrency pairs. It is necessary to calculate how each cryptocurrency pair can predict the rest of more than 1159. Python to the rescue!
Earlier in the article "How and how to analyze the connections of cryptocurrency pairs?" it was noted that the Spearman (not Pearson) correlation coefficient can be used to analyze the relationships between cryptocurrency pairs, due to the fact that the movements of cryptocurrency pairs do not follow a normal distribution. He will be taken by us as a basis.
Guidelines for cryptocurrencies? ... Are there any?...
There are a lot of pairwise combinations from more than 1160 crypto-pairs. Finding the exact amount is, in principle, possible using the following formula.

It is referred to as the number of combinations from n to k (k in this case is equal to two). This is a truly gigantic amount given the amount of data available. But ... we don't need all the combinations. Of interest are only those relationships of pairs that are of practical interest. In this regard, we will select only those links that have a correlation coefficient value higher than 0.4. As a result, we have a sample of the strongest relationships between crypto pairs. It has the following characteristics:
Count 300 mean 0.097337 std 0.419350 min -0.528515 25% -0.410778 50% 0.406569 75% 0.426944 max 0.532138
The number of potential guide indicators is 300 positions (you can find out about the composition of guide indicators at the current time at www.cryptosensors.info). In principle, for trading on a crypto exchange, it is not so little. But ... the maximum value of Spearman's coefficient is only 0.532138. It would seem ... what is the point in guides who are most suitable for what - to predict the movement by only about 50% ... We might as well flip a coin! By the way - the lowest feedback has a value of -0.528515. You can observe the following histogram for the available sample:
Due to the fact that we cut off the middle part of the sample, left and right "pillars" arose. So… is there any reason to be sad?….
Let's be patient and consider several correlation fields. An example would be the following pairs: pair_adabnb_1h and pair_adatusd_1h; pair_adabusd_1h and pair_dotbkrw_1h; pair_algotusd_1h and pair_avabtc_1h; pair_audbusd_1h and pair_hbarbusd_1h.

In this correlation field, the pair_adabnb_1h pair acts as a guide (the increases in its closing prices are located on the horizontal axis), and the pair_adatusd_1h pair is the led one. The cloud of values is elliptical. The color of the dots is the "novelty" of the data.



Do not forget that we are dealing with time series. The earliest data are blue; as they approach the latest, they turn yellow. All four plots show that the colors are quite well mixed (do not form color clusters). This indicates the stability of the form of bonds within the correlation field. The last two charts show a negative relationship between cryptocurrency pairs. In principle, this could be the end of our research, but ... there is one most curious moment. Let's digress from formulas and graphs and recall one wonderful film.
The Truman effect in action
This is the film "The Truman Show" directed by Peter Weir. The motion picture was released in 1998. Jim Carrey brilliantly played the main role and was awarded the Golden Globe. You can read the full description of the film script on Wiki. We will only recall some of the plot details. They will be very useful to us in order to understand: how guide indicators can work in cryptocurrency trading.
So, the main character of the film (Truman) lives in an illusory world. This world was created in order to observe Truman himself, who, without knowing it, is the main character of the reality show. His life from birth under the supervision of hidden video cameras. The city in which he lives is actually a shooting range. Gradually, Truman begins to understand that what is happening around is a fake; he manages to escape into the real world, he becomes free.
If you look at the film from the point of view of numerical analysis, you can come to the idea: the illusory world that was around Truman and would remain real for him if he did not leave the city (Sihaven). How can you get out of the city? It is necessary to stand in its center and ... move in one direction. Those. with an increase in this value - the distance of movement in one direction - Truman's habitual worldview can change completely. The old system of world perception is destroyed, a new one is created. This is a very, very important point.
The very existence of the old worldview is a set of factors with certain characteristics. Changing one of the characteristics «breaks the dome of the system», it is no longer there.
Let's take the following example. The standard temperature in the office while the author is writing these lines is +20 degrees Celsius. What happens if you lower it to -60? Most likely for the author it will be fatal. Any system is a set of factors describing it with ranges of values admissible for it (the system). The formation of forecasts within the system (with standard values of factors for it) is a very unreliable thing from the point of view of the effectiveness of such forecasts. And vice versa. The behavior of the system becomes more and more predictable as soon as one of the factors forming it reaches the extreme (minimum or maximum) values. What does this have to do with guide indicators?

Look carefully at the position of the points when the guide indicator (Growth_rate_Close from pair_adabnb_1h) is higher than 1.005. The lion's share of the points are above the horizontal line corresponding to the value 1. Here the guide indicator is practically not mistaken in its predictions.
In other words, if the leading cryptocurrency pair (guide indicator) exceeds the value of 1.005, in most cases we will have an increase in the dependent cryptocurrency pair. Let's call this the Truman effect. Areas in which the data have a corresponding feature are Truman zones.
For extremely positive Growth_rate_Close values from pair_adabnb_1h, in most cases, positive Growth_rate_Close values from pair_adatusd_1h will be observed. This is when the guide indicator will work pretty well.
If the value of Growth_rate_Close from pair_adabnb_1h is less than 0.995, then a «mirror» situation arises: the guide indicator foreshadows a fall in price and its predictions are also successful. The number of points that lie above the horizontal line corresponding to the value 1 is minimal. We also note the second Truman zone on the chart:

Notice how the guide indicator behaves within the range 0.995-1.005. How effective is it? He doesn't work here. From the word at all. This is nothing more than a prototype of the «Sihaven City»:

You can look at the correlation fields for the other three links. The situation is very similar. The only difference is in the boundaries of the guide indicators for the Truman zones.
For pair_adabnb_1h and pair_adatusd_1h - more than 1.005 and less than 0.995
For pair_adabusd_1h and pair_dotbkrw_1h - more than 1.005 and less than 0.995
For pair_algotusd_1h and pair_avabtc_1h - more than 1.01 and less than 0.99
For pair_audbusd_1h and pair_hbarbusd_1h - more than 1.002 and less than 0.998



Conclusion
In the process of searching for guide indicators, the interconnection of cryptocurrency pairs is important. In each case, you need to find two such cryptocurrency pairs, where one is the leading, the second is the follower. By the way, relationship and correlation are not the same thing. Correlation speaks, first of all, of a linear relationship. Why are we using correlation? The point is this. Identifying guide indicators and assessing their quality are computationally intensive. We have a huge number of combinations of crypto pairs that need to be analyzed. Correlation, even if it is weak, is an effective way to catch the partial interconnectedness of cryptocurrency pairs. Why consider weak correlation values? Suppose, on the whole, there is no obvious linear connection over the entire correlation field. But ... it is quite possible that you can find something interesting in some parts of the correlation field! In the Truman zones, the guide indicator works quite well. Determination of such areas is not particularly difficult - it is enough to compare the growth rates of the leading and trailing crypto pairs on the chart.
So, the use of guide indicators is possible in the cryptocurrency market. Some cryptocurrency pairs can act as guide indicators for other cryptocurrency pairs. It should be understood that the market changes almost every week. New interesting relationships may emerge; new pairs appear.
But ... why one cryptocurrency can follow another, what are the fundamental reasons? ... In our opinion, the leading cryptocurrency becomes when belief in it becomes more significant in relation to the leading cryptocurrency. But ... how long is it? How constant is people's faith? In the same character?
We think the answer is obvious. Watch the market. Use monitoring data. Belief in symbols (in the broadest sense of the term) exists and is inert. Cryptocurrency trading is based on the constancy and inertia of belief in symbols. Using the Truman zones, you can understand when the system of interconnection of two crypto pairs becomes practically predictable. Obviously, Truman zones with pronounced borders will not be present for all cryptocurrency pairs. Data can be cluttered with outliers. Analyze, explore the graphs of the correlation fields. Perhaps it is you, dear reader, who will be the first to detect Truman zones on a certain schedule.
From author: Cooperation proposal for the supply of data
You may be interested in research / data:
Research: How and with what to analyze the connections of cryptocurrency pairs?
Research: Cryptocurrency quotes. Collection and processing. What should a trader know about?
Research: Candlestick analysis efficiency statistics for cryptocurrency trading. Patterns: bullish hammer, bearish hammer.
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.
Send your questions and suggestions to [email protected]. We are open for cooperation!
#trading#cryptocurrencies#crypto market#guide indicators#truman effect#Truman zones#weak correlations#forecasting
0 notes
Text
Cryptocurrency quotes. Collection and processing. What should a trader know about?
Author: Evgenii Bodiagin
From author: Cooperation proposal for the supply of data
Cryptocurrency quotes data. What nuances need to be considered when collecting information from crypto exchanges? Comparison of quotes - solutions.
Content:
Introduction.
About collecting data from cryptocurrency exchanges.
The task of comparing two or more cryptocurrency quotes ... What's the catch?
A variant of solving the problem of missing data for the task of comparing two or more cryptocurrency quotes.
Conclusion.
Introduction
How does trading on a crypto exchange begin? What is primary for a trader? Collection of information. Information is necessary for analysis, assessment of the market situation. Whether we are in longs, shorts or out of the market. Data is the nutrient that drives decisions. That is why the data that is taken into account must be treated with due respect. Whether a trading strategy is being formed ... whether the current market position is being assessed - you need to remember this. It is about the collection methods, the quality of the data of the quotes of cryptocurrency pairs that will be discussed in this guide.
About collecting data from cryptocurrency exchanges
In most cases, crypto exchanges provide data in two ways: API and WebSocket. They can be illustrated as follows. Imagine you have two buddies. The first is laconic, but every phrase is worth its weight in gold. As they say, he does not throw words to the wind. You dial his phone number, get a chunk of information, and hang up. The second friend is a chatterbox. You need to hang on the telephone line for hours so that in his verbal uh…. flow to catch something valuable.
These are two fundamentally different types of communication. The first type is API, the second is WebSocket. Usually, you make a call through the API (accessing the crypto exchange server). The frequency of requests is usually no more than a few times per second. Information in the API comes on request from you (your bot, program). When working via WebSocket, a connection is established between the port of your computer and the port of the cryptoexchange. It's like picking up the telephone.
Which method is preferable? It depends on your trading style. If you are doing scalping without WebSocket, you cannot do it.
In general, information about quotes is an important component in a trader's trading strategy. Moreover, its collection is associated with the solution of a number of problems. Here are some guidelines if you intend to create your own cryptocurrency quotes data store:
Decide on the choice of server. How powerful should the hardware be?
Decide on the choice of database. At the moment, there are many options, it is necessary to dive into the nuances of the functioning of these systems. Will it be MySQL, PostgreSQL, ClickHouse?
Place collectors of information on reliable servers (reliability should be understood not only as a technical component).
Consider the risk of blockages and accesses. Not all jurisdictions have a positive attitude towards cryptocurrencies.
Observe the virtual server that you intend to make the data warehouse. How often is technical work carried out on it? How critical is downtime to you?
Choose the location of virtual servers, if possible, in the region where your data source is located.
Work with protecting your data from hackers. It is important.
Clone data servers. Backups will keep you safe in a critical situation.
Calculate what are the monthly infrastructure maintenance costs?
It is very likely that in the first months of data collection you will be busy catching bugs. Be careful with the data you receive.
Think about scaling storage later.
The task of comparing two or more cryptocurrency quotes ... What's the catch?
A very common task for a trader (analyst) is the task of comparing two or more cryptocurrency quotes. It arises when using correlation analysis (we research the relationship of cryptocurrencies), cluster analysis (we research the behavior of groups of cryptocurrencies), regression analysis (we research the functional dependence of some cryptocurrencies on others) and in many other approaches. Thus, the solution to the comparison problem can be the basis for the formation of systemic trading in the cryptocurrency market. At the same time, it is not so important who will execute this decision - a trading robot or a person.
This task is complicated by one problematic moment. Let's consider it with an example. Let's say there are two cryptocurrencies: Cryptocurrency A and Cryptocurrency B. For example, we are considering 30 periods for each of the cryptocurrencies. Ideally, there is a complete set of 30 periods for both Cryptocurrency A and Cryptocurrency B:

When we talk about periods, most often we consider either the Close prices or the Close growth rates. What is the absolute value of Close? ... It is nothing more than a marker (something like a camera flash) - the value that was fixed at a certain point in time.
But... in practice, everything is not so perfect! Often, some data is simply missing. The reasons for this may be "carriage" and "small cart". From unstable data transfer from the crypto exchange to the lack of trading at certain times (due to lack of liquidity). Let periods 7, 14, 22, 23 do not contain Close data for Cryptocurrency B. Let's designate them in red. Then we have the following data representation:

If we completely exclude the missing periods, we get the following data composition:

It would seem that the situation is not so deplorable, out of 30 periods we have data on 26. But…. imagine if you need to compare not two currencies, but five ... ten ... twenty. Each of the compared currencies has its own gaps in the data:

As a result of this approach, as the number of cryptocurrencies grows, the sample becomes smaller and smaller:

The problem of holes in the data flow can significantly distort the subsequent analysis! Note that this problem is not new. It is inherent not only for quotations of financial assets. Experts from a wide variety of fields face similar challenges: ecologists, geologists, engineers. They have their own time series that are related to their subject area. Naturally, each subject area leaves its mark on the solution of the problem of patching information holes.
There are several classic approaches to help solve this problem. Some researchers patch holes with ordinary arithmetic means. For example, if you have data for period 6 and for period 8 ... Um ... why not take and calculate the average of them and write it down in period 7?
There is also a method for interpolating adjacent points. It works as follows: missing data is replaced with values that are formed by connecting a straight line before and after the pass. In other words, if on the value chart we draw a straight line between period 6 and period 8, we get the missing value of period 7.
Another method is the average value formed from the data of N neighboring points. This approach is similar to the arithmetic mean, but not only two adjacent points are taken into account.
There is a variant of using the median over N neighboring points. The median is preferred because it better describes the data if the distribution does not follow the normal distribution (you can read about the fact that the movement of cryptocurrency pairs does not obey the normal distribution in our research "How and how to analyze the connections of cryptocurrency pairs"? - look at www.cryptosensors.info).
Another approach: Missing data in the time series can also be filled with predicted linear regression values.
It would seem that there are not so few options for solving the problem of missing data. But ... what characterizes the cryptocurrency market? Volatility. Variability of indicators of variance of gains Close (goodbye linear regression ...), sharp outliers. The use of averages, interpolation by neighboring points, medians to fill in the gaps in data, as it were, smooths the existing time series of quotes. This is completely contrary to the nature, the nature of the movements of cryptocurrency pairs.
A solution to the problem of missing data for the problem of comparing two or more cryptocurrency quotes
But what should be done? We offer another way to solve the problem of missing data for the task of comparing two or more cryptocurrency quotes. It is quite laborious for a human ... but not for a robot.
Consider the above situation with five cryptocurrencies. But what ... if, in order to research the properties of the cryptocurrency Cryptocurrency A, it is not critical for us to use this particular set of cryptocurrencies (Cryptocurrency B, Cryptocurrency C, Cryptocurrency D, Cryptocurrency E)? If among thousands of crypto pairs we can find such crypto pairs that will have the same required list of time periods as the Cryptocurrency A crypto pair?
If we find such cryptocurrency pairs Cryptocurrency F, Cryptocurrency G, Cryptocurrency H, Cryptocurrency I, Cryptocurrency J, then the dataset will be complete:

In other words, if there are a lot of crypto pairs, then we are faced with the task of finding the necessary data. We are looking for such crypto pairs that have the same timestamp composition as the target crypto pair (Cryptocurrency A).
Conclusion
How does it work in practice? At the time of this writing, we have historical data for more than 1000 crypto pairs. The most liquid part of them is no more than 6%. This part is of the greatest interest. Note: due to their liquidity, these pairs have practically no gaps in the data. Each of the cryptocurrency pairs, which is included in this 6%, alternately acts as Cryptocurrency A. we are looking for a complete list of comparable crypto pairsfor the current cryptocurrency pair that can give as much data as the Cryptocurrency A time series contains.
For example, let it be BTCUSDT. Consider the data for a certain period of time from the current moment. Which crypto pairs have the same amount of data? Lossless? We process the corresponding request. As a result (in the form of a file), we have a complete list of comparable crypto pairs (which can be analyzed together with BTCUSDT). A file with the relevant data is posted on www.cryptosensors.info.
Obviously, the list of comparable crypto pairscan change from time to time. If a crypto pair has holes in the data over the time period under consideration, it is dropped from the full list of comparable crypto pairs in relation to Cryptocurrency A (and vice versa, if everything is fine, it is included in the list).
Note also that each liquid crypto pair has its own complete list of comparable crypto pairs for the period under review.
From author: Cooperation proposal for the supply of data
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: How and with what to analyze the connections of cryptocurrency pairs?
Research: Candlestick analysis efficiency statistics for cryptocurrency trading. Patterns: bullish hammer, bearish hammer.
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.
Send your questions and suggestions to [email protected]. We are open for cooperation!
#cryptoexchanges#data collection#cryptocurrency#problem of missing data#gaps in data#holes in data#trading
0 notes
Text
Candlestick analysis efficiency statistics for cryptocurrency trading. Patterns: bullish hammer, bearish hammer.
Author: Evgenii Bodiagin
From author: Cooperation proposal for the supply of data
How effective is candlestick analysis in cryptocurrency trading?... Application methodology, statistics, data.
Content:
1. Introduction.
2. Mining data on cryptocurrencies.
3. Candlestick analysis patterns: bullish hammer and bearish hammer.
4. Characteristics of subgroups of patterns.
5. The effectiveness of the bullish hammer pattern.
6. The effectiveness of the bearish hammer pattern.
7. Conclusion.
Introduction
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:
1) is at the bottom of the downtrend;
2) has a long bottom wick; the bottom wick should be at least twice the body of the candle itself.
3) 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:
1) the opening price of candle 2 is less than the opening price of candle 3;
2) the closing price of candle 2 is less than the opening price of candle 3;
3) the closing price of candle 2 is less than the closing price of candle 3;
4) 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
Additionally:
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:
bad_bull_hammer_Volume_1: 129
good_bull_hammer_Volume_1: 55
bad_bear_hammer 183
good_bear_hammer_Volume_1: 84
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:
The data of medians for all parameters are also interesting:
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.
Conclusion
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
From author: Cooperation proposal for the supply of data
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: Cryptocurrency quotes. 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.
Send your questions and suggestions to [email protected]. We are open for cooperation!
#trading#candlestick analysis#cryptocurrencies#cryptocurrency market#crypt#candlestick pattern histogram#cryptoexchange#patterns
0 notes
Text
How and with what to analyze the connections of cryptocurrency pairs?
Author: Evgenii Bodiagin
From author: Cooperation proposal for the supply of data
How to analyze the relationship of cryptocurrencies? What are the laws governing the movement of cryptocurrencies? What are the features in the movements of the crypt?
Content:
Introduction.
Is everything all right with your distribution?….
Extraction of data on cryptocurrencies. Active cryptopairs.
How is the crypto market moving? ...
A nonparametric tool for analyzing relationships between pairs of cryptocurrencies.
Conclusion.
Introduction
Not so long ago, our world was replenished with another phenomenon: cryptocurrencies. At first, they were treated as a tool that only geeks are interested in. Today it is obvious that the "crypt" is becoming a backbone. Its mysteriousness, frightening volatility attracts more and more people: from speculators to lovers of conspiracy theory. There is a natural desire to understand the movement of the crypt. The urge to organize and "put everything on the shelves" forces you to turn to data processing tools. Very often these tools are used not quite, to put it mildly, correctly.
For example, in the flow of information about cryptocurrency markets, a lot of attention is paid to the research of cryptocurrency connections. Which cryptocurrencies rise / fall at the same time (have the same movement vector)? AND…. on the contrary - which have the opposite direction. The answers to these questions can enrich the investor in the truest sense of the word. This task is a classic task of correlation analysis. It would seem ... we take the quotes of cryptocurrencies ... a package of spreadsheets. "Go" and done. But ... I remember a phrase from an advertisement: "not all yoghurts are equally useful."
The subtleties, as they say, are in the details. The fact is that the methods for calculating correlations are different. Spreadsheets use Pearson's correlation, although it is referred to simply as "correlation." But there is one but. Pearson's correlation is only possible if the data we are trying to analyze is normally distributed.
Is everything all right with your distribution?….
Let's remember what the normal distribution is. First there will be boring formulas, then an entertaining example. So, a one-dimensional random variable that corresponds to a normal distribution has the following probability density function:
Behind the eyes, it is also called the Gaussian function;) It has only two parameters. First: µ is the mathematical expectation (mean), median and distribution mode. Second parameter: σ - standard deviation (σ2 - variance) of the distribution. The probability density function has the following graphical representation:
In order to describe the normal distribution without formulas, consider, for example, the height of the people around us. Think of your friends, acquaintances, work colleagues. Are there many giants among them? Are there many people of extremely small stature among them? The most common value is likely to be "average height".
The normal distribution has another remarkable property. We measure three standard deviations down from the average height. We measure three standard deviations up from the average height. 99.73% of your subjects will be within this range. In other words, the lion's share of the sample is within the "three sigma" range.
Imagine now that we are in the fabulous Middle Ages. In addition to people, other creatures live on earth: giants, gnomes. Dragons hover in the sky. Elves lurk in the woods. Let's form a sample of the growth of fantastic creatures. As you can see, the histogram has heavy tails.
Why? It's simple - a meeting with a gnome or a giant is not so rare. The distribution of the height of the inhabitants of the fairy forest differs significantly from the normal one.
It is especially worth noting that if a random variable is affected by many random variables that are practically independent of each other, the behavior of such a random variable is described by a normal distribution. The normal distribution is fairly well understood. A lot of data processing techniques are based on it. The Pearson correlation, which requires normality, is only one in a thousand instruments. And here a fundamental question arises. What is the distribution of price changes in cryptocurrencies?
Mining data about cryptocurrencies. Active crypto pairs.
We will consider the Binance crypto exchange as a source of data on cryptocurrency pairs. We will use Python 3.7.7 as processing tools. We use libraries such as: scipy, numpy, pandas, plotly.
At the time of this writing, we have historical data on 600 cryptocurrency pairs. We will consider daily data. Data mining is done using the Binance API. The sample size is 90 days. The subject of consideration will be the following indicator:
Growth_rate_Close = Close temp day / Close last day
Those. if, for example, this ratio is 1.015, the closing price has increased by 1.5%. If the value, for example, is 0.98, then the price has dropped by 2%. Thus, we analyze not the absolute values of the closing prices of cryptocurrency pairs, but their gains.
Note that not all crypto pairs are actively traded. Let's select the most liquid ones. There are two criteria for activity - the number of transactions or the volume of trade. Let's choose the number of deals. So, if you sort all cryptocurrency pairs by the number of transactions, and display it on the chart, you get the following.

Let's take the 35 most actively traded cryptocurrencies. They are shown in red on the graph. All data on cryptocurrency pairs are displayed in blue. The graph shows that the most active part of cryptocurrencies is only 6% of the entire list of cryptocurrencies.
0,05833 = 35 / 600
Yes, that's a fact. These are the realities of the crypto market.
How is the crypto market moving? ...
What does the histogram of price increases for these most active 35 positions look like? How is the crypto market moving? Something like this:
Testing for compliance with the normal distribution is performed both by visual compliance with the normal distribution graph and by calculating statistics. How close is this picture to a normal distribution? Visually? Doubtful ...
Additionally, we will conduct the Shapiro - Wilk test. This test is used to determine whether a sample fits a normal distribution. The following results were obtained:
Only 10 out of 35 crypto pairs have p, which turned out to be higher than the alpha level of Shapiro - Wilk. This means that, technically, we cannot reject the hypothesis that the samples are normally distributed. Here's what the histogram of the 10 mentioned crypto pairs looks like:
To what extent does their appearance correspond to the normal distribution? Despite the significance of the Shapiro-Wilk statistic, it is highly doubtful. Thickened tails are visible on both the right and left. Let's remember about gnomes and giants;)
Cryptocurrency pairs do not live according to the laws of normal distribution! This fact has an important consequence. It is necessary to use such analysis tools that would be free of distribution type. We are talking about nonparametric statistics. And ... researching relationships is also possible there!
A nonparametric tool for analyzing relationships between cryptocurrency pairs
The nonparametric analogue of the Pearson coefficient is the Spearman coefficient. In general, its calculation refers to the methods of rank correlation. But ... rank correlation is applicable to real variables as well. Calculating the Spearman coefficient between cryptocurrency pairs in each case, we get two values: the coefficient itself, as well as the value p, which allows us to assess the significance level of the Spearman coefficient itself.
At the time of the research, we identified only 35 pairs of instruments where there is an interesting and statistically significant relationship. Why is the term interestingused here? Not strong ... not weak? Because the value of the correlation is not the only parameter that indicates how interesting the relationship is in terms of making a profit. You can read 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, which will tell you about the nuances of researching relationships.
The cryptocurrency market is volatile, but ... our monitoring software processing works with it. You can find out what relationships exist between cryptocurrency pairs at this 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.
Conclusion
Cryptocurrency pairs do not behave according to the laws of normal distribution. When choosing a tool for analyzing cryptocurrency connections, you must use the right tool. Spearman's correlation coefficient can be used to analyze the crypto market, since it is a nonparametric criterion.
From author: Cooperation proposal for the supply of data
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: Cryptocurrency quotes. Collection and processing. What should a trader know about?
Research: Candlestick analysis efficiency statistics for cryptocurrency trading. Patterns: bullish hammer, bearish hammer.
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.
Send your questions and suggestions to [email protected]. We are open for cooperation!
#cryptocurreny trading#crypto market#how the crypto market moves#nonparametric analysis of cryptocurrencies#histogram#cryptocurrency distribution#cryptocurrency relationships#data processing
1 note
·
View note