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

[amibroker] Re: Hurst Channels



PureBytes Links

Trading Reference Links

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!



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006