in reply to Re: Polynomial Trendline / Extrapolation
in thread Polynomial Trendline / Extrapolation

Hi, Can you suggest some better fuctions for polynomial trendline and extrapolation of a stock price data ? Regards, CH
  • Comment on Re^2: Polynomial Trendline / Extrapolation

Replies are listed 'Best First'.
Re^3: Polynomial Trendline / Extrapolation
by Anonymous Monk on Jun 17, 2011 at 19:47 UTC
    Here's a discovery i made about polynomial extrapolation (it probably can be derived from Newton's series but i haven't done it nor have i seen it done).

    First, some preliminaries: 3 points can be fit by a unique quadratic polynomial, i.e., parabola. 4 points can be fit by a unique cubic polynomial. n points can be fit by a unique (n+1)th degree polynomial.

    Suppose we have the 3 points x(0)==1, x(1)==4, x(2)==9. These are obviously fit by the quadratic y(x)=x**2. Now the question is: how do you extrapolate x(3)?

    Answer: Form the binomial expansion of (a-b)**3=0 and note the coefficients: Notice that I expand a CUBIC. For a cubic I would expand (a-b)**4, etc

    a**3-3(a**2)b+3ab**2-b**3=0

    The coefficients are 1, -3, +3, -1

    The discovery I made is that these terms correspond in order to the coefficients of x(3), x(2), x(1), and x(0).
    We are trying to determine x(3).

    We then have: x(3) = 3x(2) -3x(1) +x(0), or: x(3) = 3(9)-3(4)+1 = 16

    This method extrapolates the next term of any polynomial where the x intervals are the same size.
      correction to the above:

      The discovery I made is that these terms correspond in order to the MULTIPLIERS needed for x(3), x(2), x(1), and x(0).
      We are trying to determine x(3).