Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A Estimation of Hurst Exponent Using Rescaled Range

  1. May 4, 2017 #1

    Tom Mattson

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Hey folks, long time no see! :woot:

    I am trying to estimate the Hurst Exponent for financial data using the R/σ (Rescaled Range) method. I have no authoritative source for this method. All I have are web pages (and we know how accurate those are). Specifically, I've been using the following pages.


    I know that the Hurst Exponent must be between 0 and 1, and I keep getting results that are a little bigger than 1. I have tried to follow the above articles to the letter, and I am at my wit's end trying to find a mistake. I have attached an Excel spreadsheet with my calculations for 64 data points, if you're inclined to look at them.

    The page called Data just has the raw data. No need to look at that.

    The page called Wikipedia has the following calculation method.
    * Divide the 64 points into 8 groups of 8 sets of closing prices C.
    * Compute the mean m of each group of 8 closing prices (Column E).
    * Compute a mean-adjusted time series (Y = C - m) for each group of 8 closing prices. (Column F).
    * Compute the cumulative variate time series Z for each group of 8 mean-adjusted prices (Column G).
    * Compute the range R of each group of 8 cumulative variates (Column H).
    * Compute the standard deviation σ of each group of closing prices(Column I).
    * Compute the rescaled range R/σ of each group (Column J).
    * Compute the average of the rescaled ranges E[R/σ] of all groups of size 8 (Cell AH3).
    * Repeat all of the above steps for groups of size N = 16, 32, and 64.
    * Compute the slope of the regression line for log(N) vs log(E[R/σ]) (Columns AI-AJ).

    The result of the last step is supposed to be the estimate of the Hurst Exponent, which I would expect to come out to be about 0.5, give or take. Instead it came out to 1.03.

    In the page called FinancialWisdom, I used the method from the last link. That page recommended breaking the data up into subsets with incrementally increasing lengths, so I used N = 8, 16, 24, 32, 40, 48, 56, and 64. Again, no joy.

    If anyone can either tell me what I'm doing wrong, or point me to a reference that clearly explains how to do this, I'd be most grateful. Thanks!

    Attached Files:

  2. jcsd
  3. May 4, 2017 #2


    User Avatar
    Education Advisor

    10 years ago I came across a similar issue. The problem with Hurst exponent are two fold:
    1. Your problem with obtaining H > 1 actually isn't uncommon and doesn't mean you did something wrong. It could be that your fBm process is unstable or the algorithm is not ideal for your series.
    2. There's literally hundreds of algorithms for these and in my experience none are very consistent with each other. 10 years ago, I found a bit of code in c++ that seemed to work consistently well for my data but I don't have it anymore. One idea may be that you use the R package called "QuantMod" or "PerformanceAnalytics" and read the code for their implication and see if you can translate that into excel. *I can't remember if quantmod or performancenalytics both have hurst but i'm pretty sure one does
  4. May 4, 2017 #3

    Tom Mattson

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Thanks your your reply! I'm actually doing this for work. After finding an algorithm that works, my next move is to get it into C++, and then into the proprietary language (which is C++ based) of the platform that I'm trying to develop. I'll install quantmod and see if R gives results similar to those in my Excel spreadsheet.
  5. May 5, 2017 #4

    Tom Mattson

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    FYI, I checked my calculations against those of the R package "pracma" for the same data that is in the spreadsheet. The function "hurstexp()" in that package returns 5 different estimates of the Hurst Exponent. They differ significantly from each other, and two of them are greater than 1. I haven't looked at the source code yet, but the estimate "Corrected R over S Hurst exponent" came back as 1.09. This is not too far from my value of 1.03, which was also done with an R/S analysis. Because of this, I've made an executive decision to not worry about this any longer. :cool:
  6. Jan 12, 2018 #5
    @Tom Mattson

    Just in case you want to reconsider, or for anybody else stumbling upon this thread. The element missing here is stationarity. Your data series may not be stationary. Without that random walks typically generate a H of 1. Also the method used to achieve stationarity may affect the value of H. However the swing persistent to non-persistent should always be on 0.5 and you may have to tweak the system to that.
  7. Jan 12, 2018 #6


    User Avatar

    There is an old function on the Bloomberg terminal named KAOS, but I guess they are somewhat passe - remember seeing them in some academic finance papers in the early 2000s but not since then and Bloomberg has not updated the function it to the new interface. H for the S&P 500 for 2017 was 0.66. On a monthly basis over the past 10 years it averaged 0.52 and ranged between 1 (in March 2010, not sure why) and around 0.25. If you like I can run it if your data series is in Bloomberg
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted