Library: | times |
See also: | fracbrown lo kpss |
Quantlet: | hurst | |
Description: | estimates the Hurst coefficent of a process using the R/S statistics |
Hall, P., Härdle, W., Kleinow, T., Schmidt, P. (1999). Semiparametric bootstrap approach to hypothesis tests and confidence intervals for the Hurst coefficent
Usage: | (ra,b,q)=hurst(x,k) | |
Input: | ||
x | n x 1 vector, observations of the process | |
k | scalar, maximal number of intervals for the R/S statistic | |
Output: | ||
ra | (k-2) x 3 matrix, ra[,1] = (1, ... ,1)', ra[,2] = log(n/3, n/4, ... ,n/k)', ra[,3] = log(RS) | |
b | 2 x 1 vector, b[1] = intercept of the R/S-line, b[2] = slope of R/S line, b solves the regression problem ra[,3] = b[1] + b[2]*ra[,2] | |
q | scalar, residual varince of the regression problem |
randomize(23) func("hurst") // load macro x=cumsum(normal(500)) // simualte a brown. Motion (H = 0.5) h=hurst(x,50) h.b[2] // estimated H
Contents of _tmp [1,] 0.54921
Library: | times |
See also: | fracbrown lo kpss |