| Library: | times |
| See also: | hurst lo kpss |
| Quantlet: | fracbrown | |
| Description: | calculates the singular value decomposition of the covariance matrix of a fractional Brownian motion. |
| Usage: | sv=fracbrown(p,nu,alpha) | |
| Input: | ||
| p | scalar, temporal scale factor | |
| nu | scalar, the resulting matrix is a (2*p*nu+1) matrix | |
| alpha | scalar, coefficient of the fractional Brownian motion | |
| Output: | ||
| sv | (2*p*nu+1)x(2*p*nu+1) matrix, singular value decomposition of the covariance matrix of a fractional Brownian motion with coefficient alpha | |
v = sv*sv' ;
v[i,j] = (1/2)*(| s[i] |^alpha + | s[j] |^alpha - | s[i]-s[j] |^alpha), s=(-p*nu, ..., p*nu)
library("times")
func("fracbrown.xpl") // load quantlet
func("hurst.xpl") // load quantlet
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] // estimate alpha
Contents of dim [1,] 101 Contents of _tmp [1,] 1.5237