gammaKernelBSSFit {BSS} | R Documentation |
Fitting gamma kernel Brownian semistationary processes
Description
gammaKernelBSSFit
uses a method of moments to fit the parameters of a gamma 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 gamma kernel autocorrelation function 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
gammaKernelBSSFit(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 lambda
, 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 <- 0.125
kappa <- 3
alpha <- -0.2
lambda <- 1.0
vol <- exponentiatedOrnsteinUhlenbeck(N, n, T, theta, beta)
bss_simulation <- gammaKernelBSS(N, n, T, kappa, alpha, lambda, sigma = vol)
y <- bss_simulation$bss
gammaKernelBSSFit(y, n, num_lags = 10)