IDEAS home Printed from https://ideas.repec.org/p/arx/papers/1906.12134.html
   My bibliography  Save this paper

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

Author

Listed:
  • Gregor Kastner

Abstract

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.

Suggested Citation

  • Gregor Kastner, 2019. "Dealing with Stochastic Volatility in Time Series Using the R Package stochvol," Papers 1906.12134, arXiv.org.
  • Handle: RePEc:arx:papers:1906.12134
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/1906.12134
    File Function: Latest version
    Download Restriction: no
    ---><---

    Other versions of this item:

    References listed on IDEAS

    as
    1. Kastner, Gregor & Frühwirth-Schnatter, Sylvia, 2014. "Ancillarity-sufficiency interweaving strategy (ASIS) for boosting MCMC estimation of stochastic volatility models," Computational Statistics & Data Analysis, Elsevier, vol. 76(C), pages 408-423.
    2. Sangjoon Kim & Neil Shephard & Siddhartha Chib, 1998. "Stochastic Volatility: Likelihood Inference and Comparison with ARCH Models," The Review of Economic Studies, Review of Economic Studies Ltd, vol. 65(3), pages 361-393.
    3. McCausland, William J. & Miller, Shirley & Pelletier, Denis, 2011. "Simulation smoothing for state-space models: A computational efficiency analysis," Computational Statistics & Data Analysis, Elsevier, vol. 55(1), pages 199-212, January.
    4. Geweke, John & Amisano, Gianni, 2010. "Comparing and evaluating Bayesian predictive distributions of asset returns," International Journal of Forecasting, Elsevier, vol. 26(2), pages 216-230, April.
    5. Frühwirth-Schnatter, Sylvia & Wagner, Helga, 2010. "Stochastic model specification search for Gaussian and partial non-Gaussian state space models," Journal of Econometrics, Elsevier, vol. 154(1), pages 85-100, January.
    6. Jacquier, Eric & Polson, Nicholas G. & Rossi, P.E.Peter E., 2004. "Bayesian analysis of stochastic volatility models with fat-tails and correlated errors," Journal of Econometrics, Elsevier, vol. 122(1), pages 185-212, September.
    7. Omori, Yasuhiro & Chib, Siddhartha & Shephard, Neil & Nakajima, Jouchi, 2007. "Stochastic volatility with leverage: Fast and efficient likelihood inference," Journal of Econometrics, Elsevier, vol. 140(2), pages 425-449, October.
    8. Engle, Robert F, 1982. "Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation," Econometrica, Econometric Society, vol. 50(4), pages 987-1007, July.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Darjus Hosszejni & Gregor Kastner, 2019. "Modeling Univariate and Multivariate Stochastic Volatility in R with stochvol and factorstochvol," Papers 1906.12123, arXiv.org, revised Feb 2021.
    2. Cross, Jamie L. & Hou, Chenghan & Trinh, Kelly, 2021. "Returns, volatility and the cryptocurrency bubble of 2017–18," Economic Modelling, Elsevier, vol. 104(C).
    3. Liu, Wei-han, 2016. "A re-examination of maturity effect of energy futures price from the perspective of stochastic volatility," Energy Economics, Elsevier, vol. 56(C), pages 351-362.
    4. Deschamps, Philippe J., 2011. "Bayesian estimation of an extended local scale stochastic volatility model," Journal of Econometrics, Elsevier, vol. 162(2), pages 369-382, June.
    5. Kastner, Gregor & Frühwirth-Schnatter, Sylvia, 2014. "Ancillarity-sufficiency interweaving strategy (ASIS) for boosting MCMC estimation of stochastic volatility models," Computational Statistics & Data Analysis, Elsevier, vol. 76(C), pages 408-423.
    6. Gregor Kastner & Sylvia Fruhwirth-Schnatter & Hedibert Freitas Lopes, 2016. "Efficient Bayesian Inference for Multivariate Factor Stochastic Volatility Models," Papers 1602.08154, arXiv.org, revised Jul 2017.
    7. Jensen, Mark J. & Maheu, John M., 2010. "Bayesian semiparametric stochastic volatility modeling," Journal of Econometrics, Elsevier, vol. 157(2), pages 306-316, August.
    8. Andrea Carriero & Francesco Corsello & Massimiliano Marcellino, 2022. "The global component of inflation volatility," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 37(4), pages 700-721, June.
    9. Jensen, Mark J. & Maheu, John M., 2014. "Estimating a semiparametric asymmetric stochastic volatility model with a Dirichlet process mixture," Journal of Econometrics, Elsevier, vol. 178(P3), pages 523-538.
    10. Panagiotidis, Theodore & Papapanagiotou, Georgios & Stengos, Thanasis, 2024. "A Bayesian approach for the determinants of bitcoin returns," International Review of Financial Analysis, Elsevier, vol. 91(C).
    11. António A. F. Santos, 2015. "On the Forecasting of Financial Volatility Using Ultra-High Frequency Data," GEMF Working Papers 2015-17, GEMF, Faculty of Economics, University of Coimbra.
    12. Chan, Joshua C.C., 2013. "Moving average stochastic volatility models with application to inflation forecast," Journal of Econometrics, Elsevier, vol. 176(2), pages 162-172.
    13. Manabu Asai & Michael McAleer & Jun Yu, 2006. "Multivariate Stochastic Volatility," Microeconomics Working Papers 22058, East Asian Bureau of Economic Research.
    14. Deschamps, Philippe J., 2011. "Bayesian estimation of an extended local scale stochastic volatility model," Journal of Econometrics, Elsevier, vol. 162(2), pages 369-382, June.
    15. Nalan Baştürk & Cem Çakmakli & S. Pinar Ceyhan & Herman K. Van Dijk, 2014. "Posterior‐Predictive Evidence On Us Inflation Using Extended New Keynesian Phillips Curve Models With Non‐Filtered Data," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 29(7), pages 1164-1182, November.
    16. Anthony N. Rezitis & Gregor Kastner, 2021. "On the joint volatility dynamics in international dairy commodity markets," Australian Journal of Agricultural and Resource Economics, Australian Agricultural and Resource Economics Society, vol. 65(3), pages 704-728, July.
    17. Florian Huber & Michael Pfarrhofer & Philipp Piribauer, 2020. "A multi‐country dynamic factor model with stochastic volatility for euro area business cycle analysis," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 39(6), pages 911-926, September.
    18. Christian Hotz‐Behofsits & Florian Huber & Thomas Otto Zörner, 2018. "Predicting crypto‐currencies using sparse non‐Gaussian state space models," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 37(6), pages 627-640, September.
    19. Lengua Lafosse, Patricia & Rodríguez, Gabriel, 2018. "An empirical application of a stochastic volatility model with GH skew Student's t-distribution to the volatility of Latin-American stock returns," The Quarterly Review of Economics and Finance, Elsevier, vol. 69(C), pages 155-173.
    20. Ankargren Sebastian & Unosson Måns & Yang Yukai, 2020. "A Flexible Mixed-Frequency Vector Autoregression with a Steady-State Prior," Journal of Time Series Econometrics, De Gruyter, vol. 12(2), pages 1-41, July.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:1906.12134. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.