Package: stochvol 3.2.5

Darjus Hosszejni

stochvol: Efficient Bayesian Inference for Stochastic Volatility (SV) Models

Efficient algorithms for fully Bayesian estimation of stochastic volatility (SV) models with and without asymmetry (leverage) via Markov chain Monte Carlo (MCMC) methods. Methodological details are given in Kastner and Frühwirth-Schnatter (2014) <doi:10.1016/j.csda.2013.01.002> and Hosszejni and Kastner (2019) <doi:10.1007/978-3-030-30611-3_8>; the most common use cases are described in Hosszejni and Kastner (2021) <doi:10.18637/jss.v100.i12> and Kastner (2016) <doi:10.18637/jss.v069.i05> and the package examples.

Authors:Darjus Hosszejni [aut, cre], Gregor Kastner [aut]

stochvol_3.2.5.tar.gz
stochvol_3.2.5.tar.gz(r-4.5-noble)stochvol_3.2.5.tar.gz(r-4.4-noble)
stochvol_3.2.5.tgz(r-4.4-emscripten)stochvol_3.2.5.tgz(r-4.3-emscripten)
stochvol.pdf |stochvol.html
stochvol/json (API)
NEWS

# Install 'stochvol' in R:
install.packages('stochvol', repos = 'https://cloud.r-project.org')

Bug tracker:https://github.com/gregorkastner/stochvol/issues0 issues

Pkgdown site:https://gregorkastner.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:r-stochvol-3.2.5(2025-03-25)

openblascpp

4.17 score 2 stars 8 packages 1.5k downloads 48 exports 4 dependencies

Last updated 5 months agofrom:a1b22dc123. Checks:3 OK. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKMar 28 2025
R-4.5-linux-x86_64OKMar 28 2025
R-4.4-linux-x86_64OKMar 28 2025

Exports:default_fast_svget_default_fast_svget_default_general_svlatentlatent0logretparaparadensplotparatraceplotpredlatentpredvolapredypriorsruntimesampled_parametersspecify_priorssv_betasv_constantsv_exponentialsv_gammasv_infinitysv_inverse_gammasv_multinormalsv_normalsvbetasvlmsvlsamplesvlsample_rollsvsamplesvsample_fast_cppsvsample_general_cppsvsample_rollsvsample2svsimsvtausvtlsamplesvtlsample_rollsvtsamplesvtsample_rollthinningupdate_fast_svupdate_general_svupdate_regressorsupdate_t_errorupdatesummaryvalidate_and_process_expertvolavolplot

Dependencies:codalatticeRcppRcppArmadillo

Dealing with Stochastic Volatility in Time Series Using the R Package stochvol

Rendered fromarticle.Rnwusingknitr::knitron Mar 28 2025.

Last update: 2021-05-20
Started: 2013-10-22

Modeling Univariate and Multivariate Stochastic Volatility in R with stochvol and factorstochvol

Rendered fromarticle2.Rnwusingknitr::knitron Mar 28 2025.

Last update: 2021-11-26
Started: 2020-11-03

Citation

To cite stochvol in publications use:

Hosszejni D, Kastner G (2021). “Modeling Univariate and Multivariate Stochastic Volatility in R with stochvol and factorstochvol.” Journal of Statistical Software, 100(12), 1–34. doi:10.18637/jss.v100.i12.

The original version of stochvol is documented here:

Kastner G (2016). “Dealing with Stochastic Volatility in Time Series Using the R Package stochvol.” Journal of Statistical Software, 69(5), 1–30. doi:10.18637/jss.v069.i05.

To refer to the sampling methodology used by the sampler without asymmetry (leverage) please cite:

Kastner G, Frühwirth-Schnatter S (2014). “Ancillarity-Sufficiency Interweaving Strategy (ASIS) for Boosting MCMC Estimation of Stochastic Volatility Models.” Computational Statistics & Data Analysis, 76, 408–423. doi:10.1016/j.csda.2013.01.002.

To refer to the sampling methodology used by the sampler that allows for asymmetry (leverage) please cite:

Hosszejni D, Kastner G (2019). “Approaches Toward the Bayesian Estimation of the Stochastic Volatility Model with Leverage.” In Argiento R, Durante D, Wade S (eds.), Bayesian Statistics and New Generations. BAYSM 2018, volume 296 series Springer Proceedings in Mathematics \& Statistics, 75–83. doi:10.1007/978-3-030-30611-3_8.

Corresponding BibTeX entries:

  @Article{,
    title = {Modeling Univariate and Multivariate Stochastic Volatility
      in {R} with {stochvol} and {factorstochvol}},
    author = {Darjus Hosszejni and Gregor Kastner},
    journal = {Journal of Statistical Software},
    year = {2021},
    volume = {100},
    number = {12},
    pages = {1--34},
    doi = {10.18637/jss.v100.i12},
  }
  @Article{,
    title = {Dealing with Stochastic Volatility in Time Series Using
      the {R} Package {stochvol}},
    author = {Gregor Kastner},
    journal = {Journal of Statistical Software},
    year = {2016},
    volume = {69},
    number = {5},
    pages = {1--30},
    doi = {10.18637/jss.v069.i05},
  }
  @Article{,
    title = {Ancillarity-Sufficiency Interweaving Strategy ({ASIS}) for
      Boosting {MCMC} Estimation of Stochastic Volatility Models},
    author = {Gregor Kastner and Sylvia Fr\"{u}hwirth-Schnatter},
    journal = {Computational Statistics \& Data Analysis},
    year = {2014},
    volume = {76},
    pages = {408--423},
    doi = {10.1016/j.csda.2013.01.002},
  }
  @InProceedings{,
    title = {Approaches Toward the Bayesian Estimation of the
      Stochastic Volatility Model with Leverage},
    author = {Darjus Hosszejni and Gregor Kastner},
    booktitle = {Bayesian Statistics and New Generations. BAYSM 2018},
    year = {2019},
    series = {Springer Proceedings in Mathematics \& Statistics},
    volume = {296},
    pages = {75--83},
    editor = {Raffaele Argiento and Daniele Durante and Sara Wade},
    doi = {10.1007/978-3-030-30611-3_8},
    publisher = {Springer},
    address = {Cham},
  }

Readme and manuals

Help Manual

Help pageTopics
Efficient Bayesian Inference for Stochastic Volatility (SV) Modelsstochvol-package stochvol
Euro exchange rate dataexrates
Common Extractors for 'svdraws' and 'svpredict' Objectsextractors latent latent0 observations para predlatent predvola predy priors runtime sampled_parameters svbeta svtau thinning vola
Default Values for the Expert Settingsdefault_fast_sv get_default_fast_sv get_default_general_sv
Computes the Log Returns of a Time Serieslogret logret.default
Probability Density Function Plot for the Parameter Posteriorsparadensplot
Trace Plot of MCMC Draws from the Parameter Posteriorsparatraceplot
Trace Plot of MCMC Draws from the Parameter Posteriorsparatraceplot.svdraws
Graphical Summary of the Posterior Distributionplot.svdraws
Graphical Summary of the Posterior Predictive Distributionplot.svpredict
Prediction of Future Returns and Log-Volatilitiespredict.svdraws
Specify Prior Distributions for SV Modelsspecify_priors
Prior Distributions in 'stochvol'sv_beta sv_constant sv_exponential sv_gamma sv_infinity sv_inverse_gamma sv_multinormal sv_normal
Markov Chain Monte Carlo (MCMC) Sampling for the Stochastic Volatility (SV) Modelsvlm
Markov Chain Monte Carlo (MCMC) Sampling for the Stochastic Volatility (SV) Modelsvlsample svsample svsample2 svtlsample svtsample
Bindings to 'C++' Functions in 'stochvol'svsample_fast_cpp svsample_general_cpp
Rolling Estimation of Stochastic Volatility Modelssvlsample_roll svsample_roll svtlsample_roll svtsample_roll
Simulating a Stochastic Volatility Processsvsim
Single MCMC Update Using Fast SVupdate_fast_sv
Single MCMC Update Using General SVupdate_general_sv
Single MCMC update of Bayesian linear regressionupdate_regressors
Single MCMC update to Student's t-distributionupdate_t_error
Updating the Summary of MCMC Drawsupdatesummary
Validate and Process Argument 'expert'validate_and_process_expert
Plotting Quantiles of the Latent Volatilitiesvolplot