|
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 = "" + 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 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
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
Chart.png
Description: Binary data
