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:

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)


[Package stochvolTMB version 0.2.0 Index]