Exploring the Market with Hurst

[This article was first published on Timely Portfolio, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Randomly trudging through PerformanceAnalytics source code, I was intrigued by the Hurst Index calculation, which I discovered is more commonly called Hurst Exponent.  After quickly satisfying myself that I could actually do the rolling Hurst calculation in R, I wanted to see how this small discovery might be applied to market research and trading systems.  I found a couple of interesting articles through a Google Scholar search, and away I went.

The first interesting paper Bo Qian and Khaled Rasheed “HURST EXPONENT AND FINANCIAL MARKET PREDICTABILITY demonstrated something I have noticed but not proven over the last 10 years of system building.  Based on the chart below, the Hurst exponent for 1950-1980 seems very different than 1980 (especially 1990)-2004.  This would fit my unscientific observation that momentum/trend-following strategies worked best 1950-1980 (Hurst > 0.55) and mean reversion performed best for 1980-2004 (Hurst < 0.5).

From TimelyPortfolio

I had some trouble replicating and extending the Hurst exponent calculation from the paper to the entire set 1896-2011.  The Hurst exponent should oscillate mainly between 0.4 and 0.6 with an average 0.54 on a random unstructured series based on the paper’s simulations and my understanding.  As seen below my results are dramatically different and clearly wrong with a Hurst exponent oscillating between 0.35 and 0.5.  If I change the calculation period and apply a rolling average, I get more reasonable but still incorrect results.  This happens whether I apply to daily, weekly, or monthly returns.  It seems that the calculation fails at periods > 12 months.

From TimelyPortfolio
From TimelyPortfolio

What I found is that the Hurst exponent calculation is an estimation and could vary widely based on the technique.  The calculation in PerformanceAnalytics is clearly not the same as that presented in the paper.  I evidently fell into the same Hurst trap that has confronted many market students and described at this site http://www.bearcave.com/misl/misl_tech/wavelets/hurst/index.html found by a Google search:

“Sadly things frequently are not as simple as they seem. Looking back, there are a number of things that I did not understand:

  1. The Hurst exponent is not so much calculated as estimated. A variety of techniques exist for doing this and the accuracy of the estimation can be a complicated issue.

  2. Testing software to estimate the Hurst exponent can be difficult. The best way to test algorithms to estimate the Hurst exponent is to use a data set that has a known Hurst exponent value. Such a data set is frequently referred to as fractional brownian motion (or fractal gaussian noise). As I learned, generating fractional brownian motion data sets is a complex issue. At least as complex as estimating the Hurst exponent.

  3. The evidence that financial time series are examples of long memory processes is mixed. When the hurst exponent is estimated, does the result reflect a long memory process or a short memory process, like autocorrelation? Since autocorrelation is related to the Hurst exponent (see Equation 3, below), is this really an issue or not?

I found that I was not alone in thinking that the Hurst exponent might provide interesting results when applied to financial data. The intuitively fractal nature of financial data (for example, the 5-day return time series in Figure 5) has lead a number of people to apply the mathematics of fractals and chaos analyzing these time series.”

The beautiful thing about R though is the high likelihood of another package that will calculate Hurst.  I chose FGN in search of a better result.  The results makes more sense but still does not match the observations in the paper.  However the stronger momentum 1950-1980 and stronger mean reversion 1980-2010 still appear.  This might help explain http://www.automated-trading-system.com/turtles-just-lucky/.

From TimelyPortfolio

I am sure that many brilliant mathematicians have applied the Hurst exponent profitably, but as of now, too much vagueness and uncertainty exist for me to bet my or my client’s money on it.  However, as always, I thought I would try to build a system with the Hurst exponent.  In the paper, the authors imply that for best results focus on times with a high Hurst exponent.


From TimelyPortfolio
From TimelyPortfolio
From TimelyPortfolio

R code (click to download):

require(quantmod)require(PerformanceAnalytics)   #get DJIA since 1896 from St. Louis Fed FredgetSymbols("DJIA",src="FRED")   #do monthly to shorten the lengthy calculation#on my old computerDJIA 

To leave a comment for the author, please follow the link and comment on their blog: Timely Portfolio.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)