How is Fractal Dimension Index Calculated?

Fractal Dimension Index calculation formula data requirements limitations.

Direct answer: what you calculate and how

Fractal Dimension Index (often shortened to an “FDI” style indicator) is calculated by estimating the fractal dimension of a sequence (commonly a price or return time series). The estimation produces a number that reflects how “rough” or “self-similar across scales” the data appears, based on how counts or variability change as you examine smaller and larger scales.

There is no single universal formula for every product or charting package. In practice, the calculation follows one of a few common estimation families (for example, box-counting-style scaling or rescaled-range scaling). What is consistent across implementations is the need for (1) an input time series, (2) a window length or sample size, and (3) scaling choices that determine what “sizes” you compare.

Mechanism or definition: the moving parts

1) Choose the input time series

You start with a sequence ({x_t}). In trading-related contexts, (x_t) may be:

  • A raw price series (\text{price}_t)
  • A log-price series (\log(\text{price}_t))
  • Returns, such as (r_t = \log(\text{price}t/\text{price}{t-1}))

Different methods interpret “roughness” differently, so it matters which (x_t) you use. If your goal is to verify calculations, your first step is to confirm which transformation (price vs. returns vs. log-price) the definition assumes.

2) Decide on the estimation family

Two widely used ways to estimate fractal dimension from time-series data are:

A) Box-counting style (scaling of counts)

  • You overlay a grid of box sizes on a representation of the series.
  • For each box size (\varepsilon), you count how many boxes (N(\varepsilon)) are needed to cover the graph (or a related embedding).
  • You fit a relationship like (N(\varepsilon) \propto \varepsilon^{-D}), which implies (D) can be estimated from the slope of a log-log plot.

A typical estimation step looks like: [ \log N(\varepsilon) = a - D,\log \varepsilon ] Then (D) is obtained from the slope when you fit (\log N(\varepsilon)) versus (\log \varepsilon).

B) Rescaled-range style (scaling of variability across lags)

  • You compute a measure of variability over different lag sizes (\tau) (for example, ranges or aggregated fluctuations).
  • You examine how that variability scales with (\tau).
  • The fractal-dimension estimate is derived from an exponent obtained by fitting a power law.

A generic version is: [ \text{variability}(\tau) \propto \tau^{H} ] and then (D) is mapped from (H) using a relationship specific to the model assumptions. The mapping must be stated exactly to reproduce results.

3) Window length and scaling range (the parameters that change the number)

Most indicator implementations are computed on a rolling basis:

  • Window length (L): how many consecutive points are used at each time step.
  • Scaling range: which (\varepsilon) (box sizes) or (\tau) (lags) are considered.
  • Minimum number of scales: how many distinct sizes you include to fit a line on a log-log plot.

If you change (L) or the scaling range, the fitted slope/exponent can change. That is one reason you should not compare values across platforms unless you can confirm the same underlying method and settings.

4) Preprocessing and numerical details

Even when the same general method is chosen, results depend on implementation choices such as:

  • Whether you detrend or normalize the series.
  • How you handle missing values.
  • How you embed the series for box-counting (e.g., using the graph in the time-value plane).
  • The fitting method for slopes (ordinary least squares on log-log values, robust fitting, etc.).

These do not change the underlying concept, but they can shift the final estimate.

Evidence or example: an independently verifiable calculation template

Because there is no single universal “FDI formula” for all tools, the most reliable way to verify is to reproduce the math of the estimation family you intend to use.

Here is a self-contained template for a box-counting style approach (conceptual steps):

  1. Take a window of data ({x_1, x_2, \dots, x_L}).
  2. For several box sizes (\varepsilon_1, \varepsilon_2, \dots, \varepsilon_k), overlay boxes on the time-value graph representation (time on one axis, (x_t) on the other).
  3. Compute (N(\varepsilon_i)): the number of boxes needed to cover the graph within the window.
  4. Fit (\log N(\varepsilon_i)) against (\log (1/\varepsilon_i)) (equivalently against (\log \varepsilon_i) with a sign change).
  5. The slope of the fitted line gives an estimate of the fractal dimension (D), which is then what your “Fractal Dimension Index” value corresponds to.

For a rescaled-range style approach, the independent check is similar:

  1. Pick a set of lags (\tau) (for example, small to moderate values below the window length).
  2. Compute the chosen variability statistic at each (\tau).
  3. Fit a scaling law on log-log axes to estimate the exponent.
  4. Use the specified mapping from that exponent to (D).

Key assumption: the relationship you are fitting must be meaningful over the selected scaling range. If the fit is forced over scales where the data does not follow a power law, the slope can be unstable.

Limitations and risks: where calculations fail or mislead

1) Different definitions yield different results

Because implementations can use different fractal-dimension estimators and different parameter choices, two “FDI” numbers may not be directly comparable. Reproducibility depends on matching:

  • the input definition (price vs returns vs log-price)
  • the estimation family (box-counting vs rescaled-range)
  • window length and scaling range
  • the fitting method

2) Small samples and unstable scaling fits

Fractal-dimension estimation relies on observing scaling behavior across multiple sizes. If you:

  • use too short a window (L),
  • include too few (\varepsilon) or (\tau) values,
  • or select scaling ranges that do not show consistent scaling, then the fitted slope/exponent becomes noisy and can vary substantially with minor changes.

3) Non-stationarity and regime changes

Many time series change their statistical behavior over time. If the underlying process shifts (for example, volatility clustering or structural changes), then the scaling behavior within a fixed window may not represent the larger context. That affects the interpretability of the resulting dimension estimate.

4) Practical data issues

Common problems that distort estimation:

  • heavy measurement noise relative to the signal scale
  • outliers dominating the variability statistic
  • missing or irregularly spaced data
  • inconsistent preprocessing between runs

5) Interpreting the number

Even when the calculation is correct, the output is descriptive, not predictive. The same “roughness” measure can occur under different mechanisms.

Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.