estimate_parameters: Estimate parameters for the stochastic volatility model

Description Usage Arguments Value Examples

View source: R/optSV.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

stochvolTMB documentation built on Aug. 13, 2021, 5:07 p.m.