[Paper Review] Dealing with Stochastic Volatility in Time Series Using the R Package stochvol
This paper introduces the R package stochvol, a fully Bayesian implementation for stochastic volatility (SV) modeling in time series using Markov chain Monte Carlo (MCMC) methods. It enables inference on latent volatility states and model parameters, offering efficient MCMC sampling, posterior prediction, and integration with other MCMC frameworks, with demonstrated application to exchange rate data.
The R package stochvol provides a fully Bayesian implementation of heteroskedasticity modeling within the framework of stochastic volatility. It utilizes Markov chain Monte Carlo (MCMC) samplers to conduct inference by obtaining draws from the posterior distribution of parameters and latent variables which can then be used for predicting future volatilities. The package can straightforwardly be employed as a stand-alone tool; moreover, it allows for easy incorporation into other MCMC samplers. The main focus of this paper is to show the functionality of stochvol. In addition, it provides a brief mathematical description of the model, an overview of the sampling schemes used, and several illustrative examples using exchange rate data.
Motivation & Objective
- To address the lack of accessible, ready-to-use software for estimating stochastic volatility (SV) models in applied econometrics and finance.
- To provide a fully Bayesian framework for SV modeling that supports posterior inference on latent volatility states and model parameters.
- To offer a computationally efficient MCMC sampler for SV models with support for both centered and non-centered parameterizations.
- To enable seamless integration of stochvol into broader MCMC workflows and facilitate forecasting and model comparison.
- To demonstrate the package’s functionality through real-world applications on exchange rate return data.
Proposed method
- Utilizes a hierarchical Bayesian SV model where returns follow a normal distribution with time-varying variance, and the log-volatility follows a first-order autoregressive process.
- Employs a centered parameterization for the latent volatility process, with priors on parameters μ (level), φ (persistence), and ση (volatility of volatility).
- Implements an efficient MCMC sampling scheme based on Gibbs sampling and Metropolis-Hastings updates, with options for interweaving and block updates.
- Supports both centered and non-centered parameterizations via the 'expert' argument, improving MCMC mixing and convergence.
- Uses the C-compiled core sampler in R for computational efficiency, with output converted to coda-compatible objects for diagnostics and summary statistics.
- Provides high-level functions like svsample for MCMC sampling, volplot for visualizing posterior volatility quantiles, and summary/print methods for posterior inference.

Experimental results
Research questions
- RQ1How can stochastic volatility models be efficiently estimated in a fully Bayesian framework using MCMC?
- RQ2What are the key computational and statistical advantages of using the stochvol package over existing GARCH-based or non-Bayesian SV estimation methods?
- RQ3How does the choice between centered and non-centered parameterization affect MCMC convergence and mixing in SV models?
- RQ4Can the stochvol package reliably estimate and forecast latent volatility in real financial time series, such as exchange rate returns?
- RQ5How well does the package support integration into larger MCMC pipelines and model comparison techniques like predictive Bayes factors?
Key findings
- The stochvol package successfully implements a fully Bayesian MCMC framework for stochastic volatility modeling with high computational efficiency, achieving approximately 851 iterations per second on a 3,139-observation exchange rate dataset.
- Posterior estimates for the persistence parameter φ were centered around 0.9935 with a standard deviation of 0.00282, indicating strong mean reversion in log-volatility.
- The estimated volatility of volatility ση was 0.0656 (s.d. 0.0100), suggesting moderate time variation in the volatility process.
- The level parameter μ had a posterior mean of -10.1366 (s.d. 0.2271), with a 95% credible interval ranging from -10.4749 to -9.7933.
- The package enables accurate n-step-ahead volatility forecasting, as demonstrated by the volplot function with a 100-step forecast horizon.
- The package supports robust convergence diagnostics and summary statistics via coda-compatible output, facilitating model evaluation and reporting.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.