| The Correlation Coefficient is a very
versatile pattern matching technical indicator. By definition,
the correlation coefficient is a statistic that is used to measure
goodness-to-fit. We will be using it to compare actual price
data against either specific chart patterns, or other price
data. The correlation coefficient ranges in value between 1
and -1. A value of 1 represents a perfect correlation, while a
value of -1 represents an inverted correlation. A value of
zero represents no correlation at all. The correlation
coefficient is a normalized indicator, meaning the actual values of
the price or pattern data are not important, only the shapes of the
patterns and charts.
Investor/RT's implementation of the correlation coefficient can
be used in a couple of ways. First, you may choose to use a
specific pattern of data, represented by any user-specified number
of prices. For instance, you may choose to create a head and
shoulders pattern using 20 consecutive prices. You may then
add the correlation coefficient to your chart using this pattern,
and the data points on the correlation line will represent how
closely the previous 20 bars back from that point correlated with
your specified pattern. You may also choose to scale your
pattern up or down. This will be discussed further below.
Alternatively, you may choose to simply compare two instruments
to see how closely those two instruments correlate to one
another. Again, you would specify a period of bars for which
to compute the correlation. The resulting correlation
coefficient on your chart would then represent how closely the two
instruments correlated over time.
Now let's move from the "What" to the "How".
We'll start with correlating the data of two instruments.
Let's say, for instance, you wanted to see how closely several
Nasdaq stocks correlated to the Nasdaq Index itself. First,
you would open a traditional daily chart on one of the symbols you
are interested in. Now, click the "Add Technical
Indicator" button in the charting toolbar, and then choose
"Correlation Coefficient" as the indicator. In the
list on the left, we are going to want to choose the ticker for the
Nasdaq Index ($COMPX in my case). For price, we'll choose
"Close" and for period, we'll choose "10".
These are both up to you, but this way, we will be correlating the
last 10 closing prices for the two instruments. We want to
uncheck the checkbox "Use Ticker as Pattern". This
should disable the "Pattern Specs" preferences, as these
are irrelevant in our case. Now, choose a line color, style,
and thickness using the color control, and click
"OK". Your resulting line now shows you, for each
day, how closely the two instruments correlated based on the prior
10 days. Again, 1 means perfect correlation while zero means
no correlation. The correlation coefficient would work equally
well, with periodicities such as 1-minute, 3-minute, weekly,
etc. Just keep in mind that you need data on both instruments
in order for this indicator to function. You may now simply
switch the instrument in the chart to another Nasdaq stock to
quickly see how well others correlated with the Nasdaq Index.
Now let's discuss correlating the price data with a specific
pattern. In it's current implementation, here is how you
specify what pattern to use. The pattern will use the daily
closing prices of a user-specified instrument. The specific
daily bars to use are specified with the "Start Date" and
"Period" fields in the preferences. The daily bars
will be drawn from the instrument chosen in the list on the
left. The pattern will begin at the "Start Date" and
will go forward from there number of periods specified. You
may either choose to a pattern you see for a ticker already in your
system, or you may choose to create your won user-defined ticker
symbol and import your own pattern data. Let's say you have
create a ticker symbol called "HDNSLD" (for head and
shoulders) and have imported 20 daily bars beginning 01/16/01.
The closing prices of these daily bars represent the prices of your
pattern. In the indicator preferences, you would then choose
HDNSLD from the list of instruments on the left, choose
"01/16/01" as the Start Date, and choose "20" as
the period. You also must check the "Use Ticker as
Pattern" checkbox. For now, just choose a Scaling Factor
of 1. Click "OK". You resulting line
represents how closely your pattern was correlated in the actual
price data based on the previous 20 bars from each data point.
The Scaling Factor is provided in order to stretch or compact
your pattern. For instance, if you wanted to stretch your head
and shoulder pattern out over twice as many bars (40), you would
specify 2 as your Scaling Factor. Similarly, if you would like
to compact your pattern to only span 1/3 as many bars, you would
specify 1/3 in the scaling factor. The scaling factor and
starting dates are only relevant when you are using a ticker as a
pattern, not when you are correlating two instruments completely.
|