[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

My interpretation of Polynomial



PureBytes Links

Trading Reference Links

I took Clyde's EL code for the Nth degree polynomial (as revised 11/6)
and created the following indicator.  I would like to get the lists'
thoughts on this approach.

My indicator does something a bit different from the PolyFit_Proj 
indicator that Clyde sent out with his original message.  In Clyde's
version, when NPointPd is set to 0, the indicator is plotting
the best fit for a Nth order polynomial for each day's current
price - basicly a smoothed indicator of price

But, when the input NPointPd is set to a value greater than 0 -
let's say 3 in this example - then for every bar on the chart, the
3 period projection of the polynomial will be plotted.  Say you
were using daily bars - then, for last Monday, November 1st,
the indicator would be plotting its projection for Thursday
the 4th, since it is giving a 3 day projection.

My take on this is that today, I don't need a forecast of last
Thursday's price.  However, I might be interested in a forecast
of price three days into the future.  So, the attached indicator
will plot the polynomial with NPointPd set to 0 for all the bars
in the past, including the current bar.  But, since I am using
TS4.0 and can't plot out into the future, the indicator will plot 
the historic values NPointPd bars back.  Again, assuming
that NPointPd is set to 3, and that we are running daily bars,
the polynomial fit for Friday's close would get plotted on 
Tuesday's date.  


Forecast data for the next NPointPd bars will get put in the
remaining bars.  Sticking to the example above, a one day
forecast from Friday's data will go into the Wednesday 
position.  A two day forecast from Friday's data goes on
the Thursday bar, and a three day forecast on Friday's bar.
The forecast data is plot2, and can be formatted a different
color than the non-forecast plot1.

For what it's worth, I put the indicator in subgraph #2, so
as not to confuse it with the price series in subgraph #1,
since it is displaced NPointPd bars.  Note also that the
attached indicator is named PolyFit_Proj_Alt, so it will
not overwrite the original version.  The updated version of
the function is in the attached ela file and will overwrite 
yours if you check "Overwrite? YES".

Now, can the polynomial really forecast data?  I would submit
that all we are really doing here is drawing a continuation of
the trend that is in place for the last few bars of the data series.
If price is climbing, the polynomial will project a continuation
of the climb.  But, if Alan Greenspan is going to nuke the market
tomorrow, the polynomial isn't going to predict the resulting mahem. 
Still, it is an interesting way to plot a non-linear trend line.

Jay Mackro



Attachment Converted: "c:\eudora\attach\Polyalt.ela"