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

Hannula's PFE (was "choosing markets to trade")



PureBytes Links

Trading Reference Links

Regarding the PFE.ELA file.  It's more than coding that's at issue here.  As presented in TASC, Jan 94, PFE is a trend efficiency ratio based on the presumption that an perfect trend would be the straight line hypotenuse of a right triangle, whose axes are net bar count and net price change.  The PFE would compare the real length of the jagged hypotenuse to the ideal length using the ratio  PFE = ideal_length / real_length.

So much for theory.  It's flawed.  Simply put, Hans was attempting to combine apples and oranges, producing a function that is not scale invariant.  The apples and oranges are the two axes themselves: net bar count and net price change, which he combines through mere addition. Yes, the curve goes up and down, but if you convert price in the time series, say from dollars to francs, the function produces different values.  In comparison, RSI is invariant to price scale, as is the Kaufman efficiency ratio.  

A few months after Hannula published his article in TASC, a critique article was published by a different author pointing out the incorrectness of it all.  No fix was provided due to the intractable nature of the theory.  There's no way you can add apples and oranges.  

There's a completely different approach that is mathematically sound.  Assume that if the market was a random walk, how would its net change in price vary as a function of the number of bars?  The answer is net_price = C x delta_time ^ 0.5, where C is a scaling constant.  If the market was perfectly trending, the formula would be net_price = C x delta_time ^ 1.0, and if the price simply alternated up and down in equal amounts, with a net result of going nowhere, net_price = C x delta_time ^ 0.0.   

So we end up with a table that relates the exponent to trend quality.

trend quality          exponent
------------------------------------------
going nowhere           0.0
random walk             0.5
perfect trend             1.0

Hans gave in figure 1 of his article a description of the fractal dimension index.  You can get the fractal dimension of a time series using..

         Frac_Dim = 2 - exponent.  

The fractal dimension function in ELA format is posted at http://www.jurikres.com/freebies/mainfree.htm.  The download file includes documentation.  Help yourself.

If you can't get to the web site, it's likely due to browser overload.  Try again later.

- Mark Jurik