# Fractals

Martin Stisen got in touch after reading about the Mean Reversion + Momentum Strategy last week with an idea.

Using the Hurst exponent to predict future returns.

Quirky ideas are exciting.

The Hurst exponent was originally found by observing how the Nile River waxed and waned over the years and now for base money making purposes we will apply it to bearish and bullish sentiments in the stock market.

The code for the Lazy Backtest IDE is here. I followed the Wikipedia nomenclature in order to make it easier to follow.

The strategy works thus.

Every day it estimates the Hurst exponent (H) - 'fitted' not calculated.

A H above 0.5 means positive autocorrelation is present and vice versa.

The next day's weighting in the S&P 500 is as follows:

`((H(100 days) - 0.5) / 0.5) * ABS(prev day's return) / prev day's return`

Simple right?

The resulting Sharpe over 65 years is 1.1.

The Max Wait is 34 years. A tad large.

There are a couple of very interesting things to take note of.

When 'estimating' H, the estimates come with an R2 of 98%++, there's definitely something to this.

The correlation between Hurst and the Mean Reversion + Momentum strategy is 0.4.

Quite low considering they have the same goal! Maybe there's scope to combine them.

Nice skew.

Hurst opens up a whole new type of statistics, one connected with fractal geometry. Until I saw high R2s I had no intuition whether this was baloney or not.

Even my whole intuition of the Hurst exponent is really just an analogy to classical statistics.

Obviously that's misguided, but what do you do when you step into a new area for the first time - you hold onto what you know best.

[Changed `Autocorrelation`

to code which maps H o something which I called 'autocorrelation', thanks to Ilya for raising this]