[DollarLink Logo]

DollarLink News -- December 31, 1996

Copyright © 1997. All rights reserved.

----------------------------------

Enhancements Added

Correlation Analysis

It is often quite useful to be able to correlate two different markets. For example, a technical analyst may want to know the correlation between stocks A and B. If the correlation, say, is very strong and stock A just had a significant gain, the analyst may then want to buy stock B because it is likely that B will also go up.

Another application might be to find the correlation between two different commodities.

Yet another application might be to correlate a market index (such as the $SPX) with a particular stock. Thus if a stock shows to have a, say, 85% correlation to the $SPX, one could then have a good feel as to the future behavior of that stock based on a knowledge of the $SPX.

An economist, Harry Markowitz, has developed a whole investment discipline called Modern Portfolio Theory where the knowledge of the correlation between different stocks is used very effectively. The idea there is to create a portfolio of several relatively strong stocks that are weakly correlated. If some stocks go down, then the other stocks will not because they have shown to have independent behavior in the past. Thus, by properly selecting, it is possible to reduce the risk for the total portfolio. Markowitz was awarded the Nobel prize in economics for his work in this area.

To compute the correlation between two different stocks we use the tools from regression analysis. We plot the price data of stock A on one axis versus the price data of stock B on the other axis. We then perform a regression analysis on the chart, i.e., draw a straight line between the points on the chart such that the difference between the line and all the points on the chart is minimal.

The slope of that line -- called correlation coefficient or R -- determines how well (or poorly) the two stocks are correlated. If the correlation coefficient is 1.0 then the stocks are perfectly correlated. For example, if you plot a stock versus itself, then its R = 1.0 and it is said to be perfectly correlated with itself. If the stocks have an R = -1.0 then the stocks are perfectly uncorrelated, i.e., they behave opposite from each other.

Correlations are somewhere between those two extremes of +1.0 and -1.0, but for trading instruments such as stocks or commodities anything over 0.0, say, 0.3 or 0.4 is considered to be a pretty strong correlation.

One interesting way to use correlation analysis is to determine if a stock has persistency of trend . As noted above, if you plot a stock's price data on both the horizontal and vertical axes, you will get an R = 1.0. However, if you plot on one of the axes the data shifted by one element in the series , you can then compute what is then called an autocorrelation coefficient for the stock.

In other words, you are plotting

             Yi      versus   Yi-1 
                             

where i is the i-th element of the price history set and i-1 is the previous element of the price history set.

This autocorrelation coefficient indicates the degree of trendiness in the price data for that stock. The greater the coefficient, the more persistency of trend is exhibited by the historical price data, and therefore, the trend should be more reliable in the future.

For example, if you take daily $SPX prices for the past 7 years and plot them against themselves but with the data delayed one day on one of the axes, you will then come up with the autocorrelation coefficient of about 0.1, which indicates a mild persistency of an upward trend.

How to Use in DollarLink?

We have implemented this correlation analysis into DollarLink in a simple-to-use way. Suppose you want to know the correlation between a stock that's plotted in window 1 and a stock in some other window.

All you have to do is make window 1 the active window and press 6. DollarLink will ask you which window you want to compare window 1. Enter the number of any other window and DollarLink will instantly compute and display the correlation coefficient R. If you enter 1 as the window to compare, DollarLink will then compute the autocorrelation coefficient.

Usually correlation analysis is done for data that uses the same time frame, i.e., daily versus daily, or tick-by-tick versus tick-by-tick. In our implementation, however, you can mix apples and oranges and compute, for example, the correlation coefficient of $SPX between its 15-minute bar chart data and its 5-minute bar chart data. Or, say, the correlation of 5-minute S&P futures data and 30-minute bond futures data. It's up to you. Of course, the interpretation of the resulting correlation coefficient is also up to you.

As in all statistical analysis, the more data you have in your charts data the more valid the results.

Best wishes for great trading in 1997!

----------------------------------

Go to top | Go To STS page | About Timing Laboratory | Go To DollarWin page