estimate_parameters {stochvolTMB} | R Documentation |
Estimate parameters for the stochastic volatility model
Description
Estimate parameters of a stochastic volatility model with a latent log-volatility following an autoregressive process of order one with normally distributed noise. The following distributions are implemented for the observed process:
Gaussian distribution
t-distribution
Leverage: Gaussian distribution with leverage where the noise of the latent process is correlated with the observational distribution
Skew gaussian distribution
The parameters is estimated by minimizing the negative log-likelihood (nll) and the latent log-volatility is integrated out by applying the Laplace approximation.
Usage
estimate_parameters(data, model = "gaussian", opt.control = NULL, ...)
Arguments
data |
A vector of observations. |
model |
A character specifying the model. Must be one of the following: "gaussian", "t", "leverage", "skew_gaussian". |
opt.control |
An optional list of parameters for nlminb. |
... |
additional arguments passed to MakeADFun. |
Value
Object of class stochvolTMB
Examples
# load data
data("spy")
# estimate parameters
opt <- estimate_parameters(spy$log_return, model = "gaussian")
# get parameter estimates with standard error
estimates <- summary(opt)
# plot estimated volatility with 95 % confidence interval
plot(opt, include_ci = TRUE)