WOLFRAM NOTEBOOK

Hurst Exponent of Stock Price

company
Apple
days
7
DateListPlot[Missing[NotAvailable],PlotLabelApple's stock prices,ImageSize{280,200}]
QuantilePlot[Drop[Missing[Last[NotAvailable]],7]-Take[Missing[Last[NotAvailable]],-6],PlotLabelquantile plot of 7 days' earning,ImageSize280]
Histogram[Drop[Missing[Last[NotAvailable]],7]-Take[Missing[Last[NotAvailable]],-6],PlotLabelhistogram of 7 days' earning,ImageSize280]
LinearModelFit[{},x,x][BestFit]
The Hurst exponent
H
is used as a measure of long-term memory of a time series[1]. If
H=0.5
, there is white noise (i.e. there is no memory for the time series or, more technically, the random walk). The larger the value of
H
, the more the time series has some type of memory.
This Demonstration uses a rescale range[2] to calculate the Hurst exponent of a stock price to show how
n1
days of earnings tend to have long-term memory. The larger the value of
n
, the higher the exponent tends to be.
The parameter
n
gathers
n
days' accumulated earnings in the stock market. If we use
P
i
to indicate the
th
i
day's stock value, then
n
days' accumulated earnings are
P
i+n-1
-
P
i
.
This Demonstration shows four graphs:
1. stock prices of the company​
​2. quantile plot of
n
days' accumulated earnings​
​3. histogram of
n
days' earnings​
​4. estimation of the Hurst exponent line
The coefficient of
x
in the last graph should be the Hurst exponent value.

Details

To calculate rescale range[2], calculate
n
days' market returns with values
V
1
,
V
2
,...,
V
n
. The HurstR function calculates the range of the values (max-min). HurstS gives the standard deviation of the values. HurstRS is the range divided by the standard deviation.
For the whole sequence
V
1
,
V
2
,...,
V
n
, we can calculate a HurstRS value of the whole range, and we do the same by splitting the sequence into two parts
V
1
,
V
2
,...,
V
n/2
and
V
n/2+1
,
V
n/2+2
,...,
V
n
to calculate the HurstRS of the two ranges and average them. Then we repeat iteratively for four parts, eight parts, etc. until the range is small enough.
When we get all the HurstRS values of different range scales, we can plot them on a log-log plot of the range sizes and their HurstRS values, then do a linear model fit to the data, so that the slope of the line is the estimated Hurst exponent of the data.

References

[1] Wikipedia. "Hurst Exponent." (Jan 6, 2016) en.wikipedia.org/wiki/Hurst_exponent.
[2] Wikipedia. "Rescaled Range." (Jan 6, 2016) en.wikipedia.org/wiki/Rescaled_range.

Permanent Citation

Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.