# Correlation Indicator

## Definition

The correlation indicator calculates how frequent the price of two markets moves in the same direction or in an opposite direction during a specified input length, number of bars. These values are plotted as values with a range of -1 to 1. In the end, the correlation indicator, just as its name says, measures the correlation of prices between two markets; better said, their tendency to move in the same direction. A positive correlation value indicates that the two markets tend to move in the same direction. A negative correlation value indicates a strong tendency for the two markets to move in opposite directions. A correlation value of near zero indicates there is very little correlation between the two markets.

## Formula

The formula to calculate the r=correlation coefficient is:

Given a set of observations (x1, y1), (x2,y2),…(xn,yn),

In the formula x would be market 1 and y market 2. s(x) is standard deviation of x and s(y)
is standard deviation of y.

## Use

This indicator is used to find if there is any correlation between two markets and if there is, how the information of a certain market and its fluctuations can help one take better decisions regarding the other market. A positive correlation means that the two markets tend to move in the same direction, and a negative correlation means a tendency to move in opposite directions. The closest the values are to the poles means the stronger the correlation is. If the values are close to zero, this indicates that there is not a lot of correlation.

## Possible Application

This indicator can help one base its system on information not only relying in the market that is being traded, but also on a market which one finds to have a strong correlation. For instance, if one finds that the market of interest has a strong correlation to a market which has a lot of information, one can also use the information of that other market as part of its system. For example, if one finds a stock that is strongly negatively correlated with the Dow
Jones Industrial Average, one would assume that most of the time when the Dow goes down, the stock price will go up, so one could base a portion of its strategy with the fluctuations of the Dow.

Figure 10 shows and example of correlation between Bank of America, BAC, and Dow Jones Industrial Average, DJIA: Here it can be seen how there is a positive correlation and a strong positive correlation a lot of times between the movement of the price of the Bank of America Stocks and the Dow Jones Industrial Average.