| estimate_parameters | R Documentation | 
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.
estimate_parameters(data, model = "gaussian", opt.control = NULL, ...)
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.  | 
Object of class stochvolTMB
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.