Answers to most of your questions are probably better found on the web ...
I purposely rescale the time ( X ) access around 0 to force the odd powers of X to equal 0 ( NOT NULL ) and to lessen the liklihood of overflows occuring in calculations. As to why to use Sums of x^n and yx^n ... These are the "normal" equations that result from the original form of the equation we are attempting to solve the unknowns for using a Least Squares Fit. As to the use of Gaussian Elimination in a Least Squares Fit ... It is imho the simplest methodology to perform a LSF of a higher order polynomial. This AFL was ONE way to produce Hurst "LIKE" channels ... there would of course be a variety of other methods some of which might indeed be better. --- In [email protected], "tomy_frenchy" <[EMAIL PROTECTED]> wrote: > > Hello Fred, > > I am actually trying to better anderstand how work your polyfit > version, maybe to try to make other sort of fitting (exponential > fitting, inverse fonction fitting...). > > For the Gaussian elimination in VBScript, it is to solve the linear > equations via matrix resolution with gauss pivot. > But I don't anderstand the parameters you send in the gaussian > elimination fonction. > > It seems you scale the time axis with a ramp from -1 to 1. After tou > make ^2,^3,etc, of this scale axis. > My first question : why take the sum of the x^n (i.e LastValue(Cum > (.)) ) ? Some sum are null because of the symetry of the ramp [- 1;1]. > > And for the price (Y) data, you multiply them by the ramp [-1;1] and > make them power of this ramp. Why ? And same thing, why make a > LastValue(Cum(.))? > > For now, it seems you fit the polynom by anchor it to his most > recent and older value on the range. The value in the middle are > less weighted. And you fit him by using average value of price (so > the cum funtion). But maybe i am totaly wrong. > Do you try with the least square method or maximum correlation to > fit the polynome ? It is too much computer time consuming ? > > Hope you will light my head who is burning for now héhé : ) > Thanks, > Mich. > > > > --- In [email protected], Fred Tonetti <ftonetti@> wrote: > > > > Andy, > > > > > > > > Can you describe in English what your AFL does ? ... > > > > > > > > I've been playing with a Trig Fit a la Claud Cleeton the steps for > which I > > would describe as follows ... > > > > > > > > 1. Optional - Normalize the input i.e. Data = log10((H + L) / 2) > > > > 2. Calc an arbitrary length ( Parameterized but 11 at the moment ) > centered > > moving average ( CMA ) of the data > > > > 3. Calc a 1st order least squares fit ( LSF ) of the CMA over the > period > > desired ( from / to range marker ) > > > > 4. Subtract the LSF points from the data points resulting in > detrended data. > > > > 5. Take an n-bar sampling of the detrended data. This array > with "holes" or > > "gaps" in it needs either to be compressed or have the "gaps" > filled ... I > > elected ( for the moment ) to calc a cubic spline to fill the gaps > ( > > interpolation ) ... > > > > 6. Calc a LSF of the detrended data resulting in the coeffs for > the Trig > > equation Y = A Cos wX + B * Sin wX > > > > 7. Calc the correlation of the resulting sin wave to the original > detrended > > data. > > > > > > > > Repeat steps 5 & 6 varying n from 1 to ? looking for n where the > correlation > > is the highest. This should yield the equation or data points > that most > > closely correlate to the detrended data. > > > > > > > > 8. Subtract the points in the sin wave from the detrended data > resulting in > > a modified detrended data. > > > > > > > > Repeat steps 5 - 8 looking for the next most significant cycle. > This can be > > done repeatedly until overall correlation stops getting better and > usually > > results in 2 - 6 cycles ... > > > > > > > > See attached . > > > > > > > > The white line in the upper graph is detrended price . > > > > The alternating green / red line is the trig fit, in sample up to > the > > vertical line and out of sample projection afterwards . > > > > The lines in the bottom section are the individual cycles found in > the data. > > > > > > > > Sometimes the projections are almost clairvoyant . run time > however is > > anything but quick . > > > > > > > > > > > > > > > > > > > > > > > > > > _____ > > > > I am using the free version of SPAMfighter for private users. > > It has removed 8649 spam emails to date. > > Paying users do not have this message in their emails. > > Try SPAMfighter <http://www.spamfighter.com/go.asp?t=249> for > free now! > > > Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
