Fractal Dimension

Top  Previous  Next

Category: Advanced Indicator Set 1

 

Input parameters

Name

Setting

Default

Input

Input Time Series

Close

Period

Integer >= 50

100  (recommended <= 500)

Detrend flag

Integer 0 or 1

1

 

Calculations

The Fractal Dimension indicator calculations are too complex to be presented here. For those interested and mathematically inclines, they can be found in books by Edgar Peters [1,2].

In very general terms, inside each moving window, a “phase space” of time series is constructed as {Input[0], Input[1], Input[2], …}, i.e., first dimension is the time series itself, second is its one-bar lag, third is two-bar lag, and so on. When plotted in its phase space, the time series forms a unique portrait called a “phase portrait”. The fractal dimension of this “phase portrait implies the minimum number of independent variables required to describe the “phase portrait”.

If Detrend flag=0, the Fractal Dimension indicator is computed on the input time series itself without any preprocessing. If Detrend flag=1 (default value), the input time series is first preprocessed with the function Input[0] = Ln(Input[0] / Input[1]). Here Ln is natural logarithm function, Input[0] is current bar, and Input[1] is previous bar. Detrend flag=1 cannot be applied to time series with zeroes and negative ratios of current/previous bars.

If Fractal Dimension indicator was not calculated for a window (output is blank on the chart), this means that there are too few points for calculations. If you receive too many blank outputs it is highly recommended that you increase the parameter Period.

TIME REQUIRED FOR CALCULATION OF THIS INDICATOR INCREASES SHARPLY WITH PERIOD, THEREFORE PERIODS IN EXCESS OF 500 BARS ARE NOT RECOMMENDED.

 

Discussion

The Fractal Dimension indicator is a measure of the complexity of the phase portrait of the time series. The complexity number it generates is an indicator of how many independent variables are necessary to simulate the time series, although it is not known what these variables are. To find the number of independent variables required, take the fractal dimension and round up to the next integer.

As stated in [1], monthly equity indices of S&P500, MSCI Germany, MSCI U.K., and MSCI Japan have fractal dimensions in the range from 2.33 and 3.05. The interpretation of these numbers is that we need three to four variables  to model the dynamics of these indices (however we dont know what those variables are).

On the other hand, daily stock closing prices are well below that and display a range of 1.5-1.8 when computed with a 500 bar moving window. A US Dollar Index has a range of 1.8-1.92. Again, the higher the value of Fractal Dimension indicator, the more complex the underlying model is and the more dynamic variables are required to simulate it. Therefore, according to the chaos theory, we should be able to simulate those markets with just two dynamic variables (again, we dont know what those variables are).

 

References

1. Peters, Edgar E., “Chaos and Order in the Capital Markets”, Second Edition, John Wiley & Sons, 1996.

2. Peters, Edgar E., “Fractal Market Analysis”, John Wiley & Sons, 1994.