File Exchange

image thumbnail

Weighted generalized Hurst exponent

version 1.1 (2.37 KB) by

Computes the generalized Hurst exponent with exponential weights

1 Download

Updated

View License

This code calculates the weighted generalized Hurst exponent H(q) from
the scaling of the renormalized q-moments of the distribution

<|x(t+r)-x(t)|^q>_w/<x(t)^q>_w ~ r^[qH(q)]


Here <f>_w are weighted averages of f(t) over 0<= t < T
with weights
w(t) = w0 exp(-(T-t)/delta)
and
w0 = (1-exp(-1/delta))/(1-exp(-T/delta))

H = genhurstw(S)
S is 1xT data series (T>50 recommended)
calculates unweighted H(q=1)

H = genhurstw(S,q)
calculates unweighted H(q) specifying the exponent q
which can be a vector (default value q=1)

H = genhurstw(S,q,delta)
calculates weighted H(q) specifying the characteristic time delta

H = genhurstw(S,q,delta,maxT)
calculates weighted H(q) specifying the characteristic time delta
and the size of the scaling window maxT

[H,sH]=genhurstw(S,...)
estimates the standard deviation sH(q)

examples:
generalized Hurst exponent for a random gaussian process
H=genhurstw(cumsum(randn(10000,1)))
or
H=genhurstw(cumsum(randn(10000,1)),[1,2]) to calculate H(1) and H(2)
or
H=genhurstw(cumsum(randn(10000,1)),[1,2],100) to calculate weighted
H(1) and H(2) with chractreistic time delta = 100

for the generalized Hurst exponent method please refer to:
T. Di Matteo et al. Physica A 324 (2003) 183-188
T. Di Matteo et al. Journal of Banking & Finance 29 (2005) 827-851
T. Di Matteo Quantitative Finance, 7 (2007) 21-36
for the weighted Hurst exponent method please refer to:
R. Morales et al. Physica A, 391 (2012) 3180-3189.

Comments and Ratings (0)

Updates

1.1

minor changes

MATLAB Release
MATLAB 7.13 (R2011b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video