Samples the latent variables and the model independent parameters mu, phi, sigma, and rho. The observations need to be provided in different formats for efficiency. An approximate SV model is as the default posterior distribution for the latent vector; however, there is the option to correct for model misspecification through the expert settings. Depending on the prior specification, some of mu, phi, sigma, and rho might not be updated. Depending on the expert settings, the function might follow the ancillarity-sufficiency interweaving strategy (ASIS, Yu and Meng, 2011) for sampling mu, phi, sigma, and rho. Also controlled by the expert settings, Furthermore, the user can turn off the sampling of the parameters, the latents, or the mixture indicators in the expert settings.

update_general_sv(
  data,
  log_data2,
  sign_data,
  mu,
  phi,
  sigma,
  rho,
  h0,
  h,
  adaptation,
  prior_spec,
  expert
)

Arguments

data

the vector of de-meaned observations

log_data2

log(data^2), where data is the vector of de-meaned observations

sign_data

the sign of the data

mu

parameter mu. Level of the latent process h. Updated in place

phi

parameter phi, persistence of the latent process h. Updated in place

sigma

parameter sigma, volatility of the latent process h, also called volvol. Updated in place

rho

parameter rho. Accounts for asymmetry/the leverage effect. Updated in place

h0

parameter h0, the initial value of the latent process h. Updated in place

h

the vector of the latent process. Updated in place

adaptation

object implementing the adaptive Metropolis-Hastings scheme. Updated in place. See adaptation.hpp

prior_spec

prior specification object. See type_definitions.h

expert

expert settings for this function. See type_definitions.h

See also

Other stochvol_cpp: update_fast_sv(), update_regressors(), update_t_error()