| Library: | times |
| See also: | hurst lo kpss |
| Macro: | fracbrown | |
| Description: | the result*normal(2*p*nu+1) gives a fractional brownian motion with respect to alpha=2*H ( H = Hurst coefficent) |
| Usage: | (m2)=fracbrown(p,nu,alpha) | |
| Input: | ||
| p | scalar, temporal scale factor | |
| nu | scalar, the resulting matrix is a (2*p*nu+1) matrix | |
| alpha | scalar, coefficent of the frac. brownian motion | |
| Output: | ||
| m2 | (2*p*nu+1)x(2*p*nu+1) matrix | |
func("fracbrown.xpl") // load macro
func("hurst.xpl") // load macro
randomize(234)
p=1
nu = 50
alpha = 1.5
// simulate frac. BM
x=fracbrown(p,nu,alpha)*normal(2*p*nu+1)
dim(x) // 2*p*nu+1
h=hurst(x,12)
2*h.b[2] // estimated alpha
Contents of dim [1,] 101 Contents of _tmp [1,] 1.5237
| Library: | times |
| See also: | hurst lo kpss |