powerKernelBSSFit {BSS} | R Documentation |
Fitting power law kernel Brownian semistationary processes
Description
powerKernelBSSFit
uses a method of moments to fit the parameters of a power law kernel Brownian semistationary process
to a vector of observations. A least squares estimate of the parameters is obtained
by minimising the mean square error between the true power law kernel autocorrelation function (found by numerical intergration)
and the empirical ACF of the data, using lags 0,...,H. The number of lags num_lags
used can be adjusted.
The volatility process does not need to be specified.
Usage
powerKernelBSSFit(Y, n, num_lags = 10)
Arguments
Y |
a vector of observations of a BSS process at frequency |
n |
positive integer indicating the number of observations per unit of time. |
num_lags |
the number of lags to be used in the regression. The default is to use the first 10 lags. |
Value
The function returns a list containing the parameters alpha
and beta
, and also the mean square
error mse
of the least squares fit. This can be used to compare model fit when trying different kernels.
Examples
N <- 10000
n <- 100
T <- 1.0
theta <- 0.5
beta_vol <- 0.125
kappa <- 3
alpha <- -0.2
beta_pwr <- -1.0
vol <- exponentiatedOrnsteinUhlenbeck(N, n, T, theta, beta_vol)
bss_simulation <- gammaKernelBSS(N, n, T, kappa, alpha, beta_pwr, sigma = vol)
y <- bss_simulation$bss
powerKernelBSSFit(y, n, num_lags = 10)