# Fractal Dimension

A Statistics concept (Complexity & memory) in the LuxAlgo Library, with 1 indicator implementation.

## What is Fractal Dimension?

Fractal dimension measures how rough a curve is, or equivalently how much space it fills. A straight line has dimension 1; a path so jagged it effectively fills the plane approaches 2. Applied to a price series over a lookback window, it scores choppiness: readings near 1 describe a smooth, directional path, readings around 1.5 resemble a random walk, and readings pushing toward 2 describe dense, congested oscillation. The idea traces to Benoit Mandelbrot, who argued that markets are better described by fractal geometry than by smooth Gaussian models, and for self-affine series it mirrors the [Hurst exponent](https://www.luxalgo.com/library/concept/hurst-exponent/): dimension equals two minus Hurst.

A chart can only estimate fractal dimension from finite data. Common estimators include box counting, Higuchi's and Katz's methods, and the range-based estimate John Ehlers used in [FRAMA](https://www.luxalgo.com/library/concept/frama/), which compares the length-normalized high-low ranges of the two halves of a window with that of the whole: when the halves sum to much more than the whole, the path is rough and the estimated dimension is high. Estimates are window-dependent and noisy, so they are best read as a relative regime gauge rather than a precise constant.

The estimators embody one shared idea, measuring the curve at two resolutions and comparing: a smooth path measures about the same length either way, while a rough one reveals ever more detail as the ruler shrinks. Box counting formalizes this by covering the curve with grids of shrinking cells; Higuchi's method reconstructs curve lengths across skip intervals and reads the dimension from their scaling, generally the most faithful of the cheap estimators; Katz's normalizes path length by its diameter; and Ehlers' two-half comparison strips the same logic to three range measurements, crude but fast enough to drive an adaptive filter every bar. On charts, windows of thirty to a hundred bars are typical, short enough to track regimes and long enough to estimate anything.

Applications split by what the number modulates. As a regime gauge it gates strategies, trend logic enabled while the dimension runs low, mean-reversion or stand-aside as it climbs; as an adaptivity input it retunes tools continuously, FRAMA mapping the estimate to a smoothing factor and dimension-weighted oscillators like the Library's chaos-weighted RSI scaling their sensitivity by roughness. The honest workflow treats absolute readings skeptically, calibrating zones per instrument, ranking the estimate against its own [percentile history](https://www.luxalgo.com/library/concept/percentile-rank/), and cross-checking against independent gauges, since different estimators legitimately disagree on the same window.

## How to identify fractal dimension readings

Estimate, calibrate, and read relative: the number only means something against its own history.

1. Choose the window and estimator: thirty to a hundred bars, with Ehlers' range method for speed or Higuchi's for fidelity.
2. Compute the estimate per bar, producing a series that oscillates roughly between 1 and 2.
3. Calibrate the zones on the instrument itself: where its trending stretches, random drifts and congestion episodes actually print.
4. Prefer relative reads: percentile position against the estimate's own history travels across instruments better than fixed thresholds.
5. Cross-check regime calls against independent gauges, path efficiency or entropy, and trust the call most where the independent measures agree.

## How traders use it

- As a regime filter: low readings flag persistent, trending stretches, while readings near or above the random-walk zone flag chop, where trend-following signals are more likely to whipsaw.
- As the adaptivity input inside moving averages: FRAMA-style filters map the dimension estimate to a smoothing factor, so the average speeds up when price trends cleanly and flattens out during congestion.
- As a cross-check alongside related gauges such as the [Kaufman efficiency ratio](https://www.luxalgo.com/library/concept/kaufman-efficiency-ratio/); agreement between independent roughness measures adds confidence to a trend-versus-range call.
- As an oscillator modulator: dimension-weighted designs scale an oscillator's sensitivity by measured roughness, damping signals in congestion and letting them breathe in clean trends.
- For exposure modulation: systematic overlays size positions down as measured roughness rises, treating the dimension as a proxy for how hostile current conditions are to directional holding.

## Fractal dimension vs related roughness measures

- **Hurst Exponent** (https://www.luxalgo.com/library/concept/hurst-exponent/): For self-affine series the two encode the same information, dimension equals two minus Hurst, but they are estimated by different algorithms on finite windows and routinely disagree in practice. Dimension frames the question as geometric roughness, Hurst as long-range persistence.
- **Kaufman Efficiency Ratio** (https://www.luxalgo.com/library/concept/kaufman-efficiency-ratio/): The efficiency ratio is the poor man's roughness gauge: net travel over total travel, one division, no scaling theory. It reacts faster and estimates more crudely than any dimension method. The two make natural cross-checks precisely because their machinery shares nothing.
- **Entropy Measures** (https://www.luxalgo.com/library/concept/entropy-measures/): Entropy quantifies disorder in the distribution of moves, information-theoretic rather than geometric: a series can be geometrically rough yet statistically predictable, and vice versa. Regime dashboards run both because they fail differently.

## FAQ

### What does a fractal dimension of 1.5 mean for a price series?

It is the value expected from a random walk: the graph of Brownian motion has fractal dimension 1.5. Readings near that level suggest no measurable persistence in either direction, so neither trend-following nor mean-reversion has a structural case from roughness alone. Estimates on real data are noisy, so treat 1.5 as a zone rather than a hard line.

### How is fractal dimension different from the Hurst exponent?

For self-affine series they encode the same information: dimension equals two minus the Hurst exponent, so a trending series reads low dimension and high Hurst together. The differences are framing (geometric roughness versus long-range persistence) and estimation: the two are computed by different algorithms on finite windows, so their readings can disagree in practice.

### Which estimator should be used on charts?

For driving adaptive tools bar by bar, Ehlers' two-half range method wins on cost: three range measurements and a logarithm, robust enough for its job. For regime research where fidelity matters, Higuchi's method is the usual recommendation among the affordable estimators. More important than the choice is consistency, since estimators are biased differently and switching between them mid-analysis manufactures regime changes that never happened.

### What window length should the estimate use?

Chart practice settles between thirty and a hundred bars. Below that, the estimate is mostly noise, since a dimension is a scaling property and needs scales to measure across; above it, the reading averages over regime changes and arrives too late to act on. The window should match the regime duration you care about, and the estimate dated to its window, a fact about the last N bars rather than the market's essence.

### Can fractal dimension time entries?

No, and it does not try: the number carries no direction, only texture. Its value is contextual, deciding which playbook applies, how sensitive tools should run, and how much exposure conditions deserve. Entries still come from structure, levels and signals; the dimension's contribution is preventing trend tools from being deployed into congestion practically certain to whipsaw them. Negative knowledge, reliably useful.

### Was Mandelbrot right about markets being fractal?

His core empirical claims have aged well: fat tails, volatility clumping, and roughness that looks similar across timescales are all now standard facts, and his critique of smooth Gaussian finance was vindicated. The stronger programme, multifractal models generating markets from cascade processes, remains research rather than settled tooling. For chart purposes the legacy is the lens: measuring roughness as a first-class property instead of treating it as noise around a trend.

## Implementations in the Library

- Chaos Weighted RSI (LuxAlgo): https://www.luxalgo.com/library/indicator/chaos-weighted-rsi/

## Related concepts

- Hurst Exponent: https://www.luxalgo.com/library/concept/hurst-exponent/
- Entropy Measures: https://www.luxalgo.com/library/concept/entropy-measures/
- Change-point Detection: https://www.luxalgo.com/library/concept/change-point-detection/
- Market Efficiency & Regime Persistence Measures: https://www.luxalgo.com/library/concept/market-efficiency-and-regime-persistence-measures/

---

Source: https://www.luxalgo.com/library/concept/fractal-dimension/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/