Stock Attractor ... related to Correlations
Motivated by comments by Ron McEwan
 Suppose we plot umpteen monthly returns for, say, XOM versus the monthly returns for the DOW. We'd get a scatter plot, something like this: You see that red line? That's the best straight line fit to the points: the regression line. The equation of that line (relating the XOM returns to the DOW returns) is shown in a box, namely: (XOM%) = alpha + (beta) (DOW%). For the example shown: alpha = 0.009   and   beta = 1.055. Further, the square of the correlation is shown, namely: Rsquared = 0.514. R2 is a number between 0 and 1. It gives an indication of how close the points are to the regression line. >Haven't we done this before? Patience. It would be nice to see the chronological order for the sequence of points. The order in which they occurred so that ... >Is that really useful? I mean, they're just a bunch of points. Patience.
 If we join the points, in the order in which they occurred, we'd get this: The green dot is the starting point. The red dot is the ending point. Do you see anything interesting? >No. When the point is too far from the line, the "usual" relationship between the returns is violated and ... >Violated? Well ... the point is far from that "best" line fit so, if you follow the curve you see that, usually, the next point is closer to the line ... or, at least, the sequence of return-pairs moves in the direction of the line. You can stare at the chart and see the sequence of points moving back and forth across that line and ... >Are you saying that the line attracts the points ... like a magnet? Sorta ... don't you think? >No.
 See the last point? Where do you think it'll go next? >I have no idea. It goes like so: >It heads back, toward the red line. I could have told you that! Of course you could. >Okay, when it's far from the line it moves toward it ... sorta. But how far is "far"? Hmmm ... good question. Suppose the returns were normally distributed. Then there's a 87% percent probability that a return will be within 1.5 standard deviations from the mean. >Mean? What mean? The mean of the collection of returns. Of course, we're talking the mean of all possible returns, but we'll just consider the mean of the returns represented by the scatter plot.
 Now each stock has its own mean, so we draw a rectangle centred on the point representing the two means. The width in the x-direction will be twice the standard deviation of the the x-stock and ... >And the height is the standard eviation of the y-stock, right? Twice the standard deviation. >And that gives ... what? The rectangle? It looks like this: See? Most of the returns lie within that rectangle. Those outside are too far removed and will tend to return to the rectangle so ... >Rectangle? Looks more like a square to me? I'll lend you my glasses ...
>So where's the spreadsheet?
Just click on the picture:

You do this:

• Type in 30 Yahoo stock symbols and click the download button. You get (about) five years (60 points) worth of monthly data.
• Near cells N2-O4 are a couple of sliders. Move them to choose two stocks.
• You get a scatter plot for (only) the last 15 months.
• You also get a rectangle, generated using Mean ± μ StandardDeviation
The Mean and StandardDeviation are calculated using all the downloaded data.
• You can vary μ using the slider at H1.
• The regression line is also calculated using all the downloaded data (not just the last 15 months).
• You stare intently at the chart and guess where the Next Point will be.
>Then you click the Next Point button, eh?
You got it!

>So where do I type in the stock symbols?
Forgot to mention the buttons that'll move the scatter plot out of the way.
Underneath the scatter plot you'll find a plot of the growth (or decay!) of the two selected stocks ... as we saw in that Correlations stuff.

>Why is this called "Stock Attractor"?
One-of-these-days I'll try to incorporate the attracting properties of the regression line and the confinement properties of the volatility box into a neat mathematical ...

>A mathematical snow job?
Well ... uh ... yes.

Here are some examples of the "next Point". Notice that, when the last point is outside the volatility box, it (usually) gets back in at the Next Point.

>Usually? Not always?
Didn't I say usually?

>I see a funny little square near the origin. What's that?
Uh ... I forgot to mention that. It's the point (x,y) where x = Mean of the x-stock   and   y = Mean of the y-stock.

Did I mention that there's a Best Match? button. It'll find the pair of stocks which has the largest value of gSC.

>Huh? gSC?
Have you forgotten already!? That's the Stock Comparison index, here.
It gives a correlation-type number which compares the returns of two stocks, ignoring the Mean (which the Pearson correlation incoporates).
The value of R2 is, however, the reg'lar, garden-variety value (for all the downloaded data).

>So which pair gives the best match?
This one, with a correlation (and a gSC) of about 0.76.

>Honeywell vs the DOW, eh?
Indeed ...

To play the Attractor Game, click HERE