Parabolas - Part II a continuation of Part I

We're trying to identify some parabola that follows past stock prices.
Hopefully we can extend such a parabola into the future and (if were lucky!) identify where the trend changes from going UP to going DOWN.
>Or DOWN to UP.
Yes. Remember what we did in Part I. We look at the stock prices starting at some date.
Then our parabola had an equation like:
[1]       p = A n2 + B n + C
where n is the number of days from the starting date
and p is the "parabolic" price at day n.

>Huh? The parabolic price?
Yes. The equation [1] gives the points on the parabola. The values of the three constants A, B and C are determined from the actual stock prices which we're calling p(1), p(2), etc.. Remember that picture from Part I  

Okay, we want to play with equation [1] like so:

  • We rewrite [1] so the parabolic point at day n is:     pn = A n2 + B n + C   ... so they're identified by the subscript "n"
  • Then the parabolic point at day (n+1) is:     pn+1 = A (n+1)2 + B (n+1) + C
  • We subtract the first equation from the second and we get:     pn+1 - pn = A + B + 2A n
  • We observe that the changes in the parabolic values (that's A + B + 2A n) change as the number of days (that's n) changes.
>That's important?
Well, it characterizes a parabolic curve.
For a parabola that opens UP, the changes increase with n.
For a parabola that opens DOWN, the changes decrease with n.

That means that we can generate a parabola by starting with some price, say p0,
then we keep adding something like a + nb ... which increases as the days go by.

>Huh?
We start with p0 then generate our parabola according to:
(1)   p1 = p0 + (a + b)
(2)   p2 = p1 + (a + 2b)
(3)   p3 = p2 + (a + 3b)
etc. etc.

>And that'll give a parabola?
Yes.


Let's look at the S&P500 starting in September, 2000 and calculate the "best" parabola based upon the prices over three years (Sep, 2000 to Oct, 2003). That's shown in red in Figure 1.
Now we use equations (1), (2), (3) etc. with a starting value p0 = 1458.

Then we'll add 0.193 - n(0.004) at day n giving a sequence of parabolic values like so:

day 1     p1 = 1458.00 + 0.193 - 0.004 = 1458.19
day 2     p2 = 1458.19 + 0.193 - 2(0.004) = 1458.37
day 3     p3 = 1458.37 + 0.193 - 3(0.004) = 1458.55
etc. etc.
Eventually this parabola will turn DOWN and near the end of our 3-year time period:

day 657     p657 = 746.72 + 0.193 - 657(0.004) = 744.36
day 658     p658 = 744.36 + 0.193 - 658(0.004) = 742.00

These parabolic values are shown in green.


Figure 1

>And you pulled that 0.193 - n(0.004) out of your hat, eh?
Actually, no. Remember when we said that the "Best" parabola satified:   pn+1 - pn = A + B + 2A n ?
Well, I first found the "Best" parabola and that gave me A and B and I just calculated A + B + 2A n   to get 0.193 - n(0.004).
In fact, that green parabola is just our best parabola shifted up (or down) so it coincides with the recent High (namely 1458.00)

>And is that SHIFT stuff in the spreadsheet?
It is now. There's a user-defined SHIFT like so:  

>So why do you call it a gSAR parabola?
SAR, that's Stop And Reversal and is related to Wilder's Parabolic SAR.
(Wilder suggests changing by 0.02 at each step. You can see such Parabolic SAR curves at Yahoo.
For our gSAR curves, we just shift that best parabola up or down.)

Even if our best parabola doesn't indicate a BUY or SELL signal (at a change in market trend), we could use that shifted parabola and, when it intersects the stock price curve (or some other convenient curve, like a Bollinger Band of a moving average) ... when it intersects we'd BUY or maybe SELL. An example is shown in Figure 1 which indicates a BUY some time in April, 2003.

Since our shifted parabola isn't exactly what Wilder had in mind, we'll call it gSAR.

>Don't tell me! Let me guess! That g stands for ...?
It might stand for grand or good or ...

>Yeah, sure.


P.S. The subsequent movement of the S&P500 looked like this

... and a few more recent pictures (as of October, 2004) ... and our two parabolas:

where we shifted gSAR so it passes thru' a recent high.

>So what about UP trends? What about shifting that gSAR thing to match a recent low. What about ... ?
Yes. Just download the spreadsheet and play with it!
(It's now over 500K due to my lousy inefficient programming)


There's no reason (from a mathematical point of view) why we couldn't try to fit a cubic to the prices:        pn = A n3 + B n2 + C n + D     or even a quartic or ...

>Why?
Well, a parabola can only go UP then DOWN, or DOWN then UP, but a cubic can go ...

>Cubics can go DOWN then UP then DOWN again, right?
Yes, like the magenta curve here
This chart shows our "best" parabola based upon the first 700 days (starting Jan/98).
It also shows that "best" parabola shifted down to go through a recent minimum.
    That's our gSAR.
Finally, it shows a "best" cubic ... shifted down to go through a recent minimum
    We call that g3SAR.

>And that last one goes DOWN then UP then DOWN and has a maximum in ... uh ...
In July, 2000.
>I assume there's a g4SAR and a g5SAR and ... ?
Yes, of course (is you do the work)

>And what did happen to GE stock after your g3thingy said it'd max out in July?

>And did you sell all your GE stock in July?
You don't think I actually use this stuff, do you?
>I assume that the spreadsheet now has the cubic stuff in it, right?
Wrong!
Well, since we're talking about a Game, why not?
However the spreadsheet if now much too long so to download a .ZIPd version: RIGHT-click here and Save Target.