Polarized Fractal Efficiency

The Polarized Fractal Efficiency (PFE) measures the same efficiency with the geometry of the path. Hans Hannula drew the price as a line in which each period is one step in time and the price change the step in height, and compared the straight-line distance from the first to the last price of the window with the length of that line. Unlike the Efficiency Ratio it carries the sign of the move, so it shows the direction of an efficient move as well as its efficiency.

The formula for the Polarized Fractal Efficiency starts from the straight-line distance between the closing price now and n periods earlier, n steps apart in time:

\[\text{Distance} = \sqrt{(\text{Close} - \text{Close}_{t-n})^{2} + n^{2}}\]

The path is the length of the line through the closing prices over the same n periods, each step one period in time:

\[\text{Path} = \text{Sum}\left(\sqrt{(\text{Close} - \text{Close}_{t-1})^{2} + 1}, n\right)\]

The PFE is that distance as a share of the path, signed by the direction of the move and smoothed with an exponential moving average over the last m periods:

\[\text{PFE} = \text{EMA}\left(\frac{\operatorname{sign}\left(\text{Close} - \text{Close}_{t-n}\right) \cdot \text{Distance}}{\text{Path}}, m\right)\]

The Polarized Fractal Efficiency runs from -1, a straight fall, to 1, a straight rise; values near zero mark a market that zigzags without direction. Since time and price steps share one unit, its level depends on the price level of the asset, so it is compared over time for the same asset rather than between assets.

Also known as: PFE.

In the Finance Toolkit this is get_efficiency_ratio with method="polarized_fractal", the same function as Efficiency Ratio (ER).

Example · AAPL, MSFT · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_efficiency_ratio:

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["AAPL", "MSFT"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.technicals.get_efficiency_ratio(method="polarized_fractal")

Which returns:

References

  • Paper Hannula, H. (1994). “Polarized Fractal Efficiency.” Technical Analysis of Stocks & Commodities, 12(1), 38-41.
Share