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

[amibroker] Re: Polynomial fit



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <wd78@xxxx> wrote:
> Stephane:
> 
> I am not referring to a smoothing function (e.g., Gaussian) but
rather
> fitting data(x, y) to a polynomial equation of degree k. 
Essentially what
> the POLYNOMIAL function in Excel does.  In that case, Excel uses a
least
> squares fit of the data to a polynomial of degree k.
> Bill
> 
> ----- Original Message ----- 
> From: "Stephane Carrasset" <nenapacwanfr@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, September 23, 2003 11:45 AM
> Subject: [amibroker] Re: Polynomial fit
> 
> 
> Hi bill,
> 
> do you refer to :"
> The Gaussian average are computed according to Ehlers ( Easy
Language
> Code)
> One Pole: f = fÑg + (1-fÑ)f[1]
> Two Poles: f = fÑ2g + 2(1-fÑ)f[1] - (1-fÑ)2f[2]
> Three Poles: f = fÑ3g + 3(1-fÑ)f[1] - 3(1-fÑ)2f[2] +
(1-fÑ)3f[3]
> Four Poles: f = fÑ4g + 4(1-fÑ)f[1] - 6(1-fÑ)2f[2] +
4(1-fÑ)3f[3] - (1-
> fÑ)4f[4]
> 
> or anything else?
> 
> Stephane
> 
> > Is anyone aware of code for producing a polynomial fit of price
> data, moving
> > average, etc. written in a translatable language (e.g.,
Metastock)?
> >
> > Thanks.
> >
> > Bill
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

Aequalsz has a linear and quadratic least squares fit in MetaStock
which was implemented via the MS Developer's Kit in a C++ dll.

The linear ls is similar to what you see here and in MS, but the
quadratic ls contains quite a few more terms, so it's useful to cast
the problem in terms of matrix algebra.  You would then need access
to matrix routines like a solver, triple matrix products, etc.  

Using the quadratic ls routine - so far at least - has not convinced
me that it yields a particularly good representation of a stock price
to forecast future prices.  And a higher degree polynominal would seem
even more "iffy" to me.

a


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Remanufactured Ink Cartridges & Refill Kits at MyInks.com for: HP $8-20. Epson $3-9, Canon $5-15, Lexmark $4-17. Free s/h over $50 (US & Canada).
http://www.c1tracking.com/l.asp?cid=6351
http://us.click.yahoo.com/0zJuRD/6CvGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/