The Pros and Cons of Countries Adopting National Cryptocurrencies

Is crypto the new version of the dollar bill? With the increase in cryptocurrency’s popularity, several countries are adopting crypto as their national currency. Crypto serves as a profitable…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Kendall Correlation Coefficient as a Markup to Highlight the Changes of Regimes in Markets

SUPERALGOS DATA MINING

Enter enter or not enter the trade? That is the question!

From a statistical point of view, a correlation is a relationship of any kind between random variables. Correlation coefficients help to identify if two variables are tied by some sort of relationship and in most of the cases inform on the degree of linearity between two variables. One of the most used correlation coefficient is the Pearson’s correlation coefficient which measures the degree of linearity between two datasets.

Lesser known correlations are Rank Correlations. Instead of measuring the mathematical relation between variables, a rank correlation measures the degree of similarity between two rankings, indicating if variables vary accordingly, described by the value of the rank correlation coefficient.

We propose to apply the Kendall correlation method to a set exponential moving average of the BTC/USDT pair in order to find if we can anticipate or point where the market is more likely to present a significant momentum that will drive the price in one direction or another.

The Kendal rank coefficient measures the ordinal association between a set of two measured quantities, giving then the similarity of orderings of the data ranked by each of the variables.

Considering a set of joint random variables, X and Y, where xi and yi are unique values, the Kendall correlation coefficient is described by:

Which can be written as:

With nc and nd respectively the number of concordant and discordant pairs, and n the number of pairs.

Intuitively, if the set consists only in concordant pairs, the coefficient will then be equal to 1, meaning the agreement between the rankings is perfect, the variables within varying accordingly. On the contrary, if the set consists only in discordant pairs, the coefficient will be equal to -1, the disagreement between the rankings is perfect and variables vary in an opposite way. In the case the rankings are independent, the coefficient will be equal to 0, with an equal number of concordant and discordant pairs.

If the dataset is a time series, t will continuously vary between -1 and +1 depending on the agreement/disagreement of the rankings.

Let us consider a company conducting a study to find the best level of sugar in a cake in order to increase the sales. A representative panel has been asked to attribute a grade to different cake containing different proportion of sugar:

For a better convenience, results are presented in a table with sugar level ascending sorted, as a matter of fact, doing so we only have to use the grades column since the contribution of the sign function for the left column leads to unity.

Considering each member of the grade column we evaluate its contribution to the coefficient with the following rules:

The resulting Kendall coefficient is -0.11, indicating a slightly discordant correlation between the rankings and the grade tends to decrease with the increasing level of sugar.

Kendall correlation coefficient gives an understanding on how two variables evolve and indicate whether the variables vary accordingly or not.

Changes in market regimes are generally observed when a strong momentum appears. Crossings of moving averages are commonly used to identify the turning points but come with a lag as the moving average movement is necessary late compared to the price action. Using a rank correlation between the two moving average may then give an advantage as the resulting correlation coefficient will show when the crossing will take place since it will reflect if the moving averages are getting closer or farther.

Procedure for Kendall correlation coefficient calculation between two Exponential Moving Averages

EMA functions are well known and we will not discuss here on the way to calculate them. For this demonstration we will use EMA on 5 and 21 periods and the correlation coefficient will be calculated over a window of 10 periods.

The following procedure is used to calculate the correlation coefficient:

Calculate tau as the sum of all the members of R divided by the number of possible pairs of the variables set (n * (n — 1)/2) = 45 with n = 10

BTC/USDT 01-hs candles with Kendall coefficient between EMA5 and EMA21

The BTC/USDT chart with Kendall correlation coefficient rendering between EMA5 and EMA10 shows an oscillating behaviour around the zero line. We observe the indicator crossing occasionally bellow the zero line where the price dynamic seems to be changing. On the three negative peaks we see each time the price changes either from ranging to trending upward, from trending upward to trending downward and finally from mildly trending downward / ranging to trending upward.

Using Kendall correlation coefficient between 2 exponential moving averages at slow and fast timing, we have shown we can obtain an oscillator with negative peaks showing changes in trend regimes. If the oscillator shows clear signs for price regimes, it does not informed on the direction of the trend.

Kendall correlation coefficient could be use as a confirmation indicator to evaluate the strength of the actual momentum or a filter where the coefficient situated above zero would mean an established regime in a direction or another, and eventually a ranging market.

The Kendall correlation indicator can be found at Polus data mine in Superalgos.

All the material presented here can be reused and integrated freely on the condition linking to this article and the Superalgos website.

Disclaimer: The content of this article is for educational purpose only and does not constitute financial advice. Trading is not suitable for everybody; seek professional advice. Use this article at your own risk.

Add a comment

Related posts:

What Is Synchronicity and How to Recognize Your Symptoms in Your Life

The term concurrency was chosen by the psychotherapist Jung to describe the simultaneous occurrence of events (or coincidences) that have no seemingly clear cause, but are deeply significant. Some…

The Greatest Medicine.

Without enough water in your body system, you can feel sick; or feel bad and you may even have bad dreams at night because you can’t sleep well. Most illnesses or health failures are caused by the…

NBA Boss criticizes many star losses during the season

NBA-Boss Adam Silver has criticized the many failures of basketball stars during the season in the North American Profiliga. It was a trend that absolute top professionals “not fully” participate in…