Library: | finance |
See also: | archest annarchtest bigarch jump lochomest volatility |
Quantlet: | lochomtest | |
Description: | computes the most recent interval of homogeneity of the volatilities of financial time series data and the local mean relative to this interval. |
Usage: | {xest, hom} = lochomtest(powtr, lambda, mu, m0) | |
Input: | ||
powtr | T x 1 vector, powtr = abs(S)^(0.5) where S is a time series of financial returns | |
lambda | scalar, a smoothing parameter; 0.5 <= lambda <= 4 | |
mu | scalar, a smoothing parameter, 0.5 <= mu <= 4 | |
m0 | scalar, the grid step; m0 >= 5 | |
Output: | ||
xest | T x 1 vector, the estimated volatility | |
hom | T x 1 vector, the estimated interval lengths of homogeneity at each grid point |
library("finance") x = read("dmus58") z = x[2:rows(x)] - x[1:rows(x)-1] powtr = sqrt(abs(z)) lambda = 2 mu = 3 m0 = 18 {xest, hom} = lochomtest(powtr, lambda, mu, m0) xest hom
Contents of xest [1,] 0.00055794 Contents of hom [1,] 523