Efficient Bayesian Inference for Stochastic Volatility (SV)
Efficient algorithms for fully Bayesian estimation of stochastic volatility (SV) models via Markov chain Monte Carlo (MCMC) methods.
Changes in Version 1.3.3:
- Registered native routines.
- Workaround for typo appearing in conversion of help files to LaTeX document.
Thanks to Evelyn Mitchell for pointing this out.
Changes in Version 1.3.2:
- Some more changes in the AWOL sampler because version 1.3.1 appeared to be
unstable under Solaris: Sampling of h (including h0) is now done AWOL.
- Turned progress indicator off again (not sure whether this causes issues
Changes in Version 1.3.1:
- Parameter starting values are now set to their respective prior means
(if not specified by the user).
- Sampling h[-0] is now done conditionally on h0. This change should not
make a difference for the standard use cases of stochvol but is necessary
to yield correct results for the new prior for h0 which was introduced in
- Turned on progress indicator also for Windows (need %% instead of \045
or % to escape a percent symbol in Rprintf).
Changes in Version 1.3.0:
- Implemented new prior for initial log-volatility h0. Can be used to
stabilize the level of the volatilities, especially when stochvol
is used within the context of a more general MCMC algorithm.
- Shortened the heavytails-vignette (a bit) to stay below the 5MB mark.
- Fixed error in help files of svsample and svsample2 concerning startpara.
Thanks to Dominic Cervicek for pointing this out.
Changes in Version 1.2.4:
- Fixed typo which appeared in pdf package documentation. Thanks to Stefan
Voigt for pointing this out.
Changes in Version 1.2.3:
- Updated CITATION to cater for newly published article in the Journal of
Statistical Software 69(5), 1-30, doi: 10.18637/jss.v069.i05.
- The function logret can now handle xts objects. Thanks to Niko Hauzenberger
for pointing this out.
Changes in Version 1.2.2:
- Fixed bug in initialization of svsample2 that was introduced in 1.2.1.
Thanks to John Kerpel for pointing this out.
Changes in Version 1.2.1:
- Added option 'keeptau' to the store the "variance inflation factors"
used for the sampler with conditional t innovations. Thanks to Sergey Egiev
for pointing out that this may be useful to at what point(s) in time the
normal disturbance had to be "upscaled" by a mixture factor and when the
series behaved "normally".
- Fixed residuals.svdraws to cater for a potential 'designmatrix'.
Changes in Version 1.2.0:
- Allows for incorporation of a simple mean (regression-type) model.
For details, please see ?svsample and ?arpredict. And, hopefully
soon, the corresponding vignette.
- Improved input-checking (somewhat).
- Argument 'thintime' in svsample may now also be 'firstlast',
meaning that latent volatility draws are only kept for the first
and the last point in time.
Changes in Version 1.1.4:
- Included non-base default packages that are imported in NAMESPACE
into DESCRIPTION. Thanks to Kurt Hornik for pointing this out.
Changes in Version 1.1.3:
- Fixed a typo in Makefile for building vignettes.
Changes in Version 1.1.2:
- Fixed missing imports from non-base default packages.
Changes in Version 1.1.1:
- Fixed "uninitialized variable" in function newtonRaphson
(progutils.cpp). Warning appeared when building for Windows.
- Minor changes in main vignette (article.Rnw) so that the included
plots have smaller file size and the package does not exceed the 5MB
limit (was the case on r-patched-solaris-sparc).
Changes in Version 1.1.0:
- Introduced sampling and simulating conditional t-innvoations.
(Hopefully) all affected functions
and the corresponding help files have been adapted.
See package vignette "heavytails" for details.
Still a "beta-feature", please use with care.
Bug reports and/or comments are warmly welcome!
- The plot functions now take an optional svsim object.
- predict.svdraws is now in R/utilities_svdraws.R (was in R/plotting.R)
Changes in Version 1.0.2:
- Fixed some more typos.
- Plotting functions are now in R/plotting.R
Changes in Version 1.0.1:
- Updated keywords in vignette.
- Changed VignetteKeyword entries to adhere to CRAN style guide.
Changes in Version 1.0.0:
- First stable release.
- Minor stylistic changes in package vignette.
- Updated CITATION file.
- Version numbering changed from X.Y-Z to X.Y.Z.
Changes in Version 0.9-2:
- Fixed some typographical errors in help files. Thanks to Angela Bitto
for pointing these out.
Changes in Version 0.9-1:
- Fixed typographical errors in vignette.
- Added additional results in Table 1 of vignette.
- Minor changes in DESCRIPTION to adhere to CRAN style guide.
Changes in Version 0.9-0:
- Requires now Rcpp >= 0.11.0 and consequently R >= 3.0.0.
- Replaced RNGScope in sampler.cpp by "manual" GetRNGstate() and
PutRNGstate() statements because the former is not safe if return
variables are declared afterwards, cf.
and follow-ups for further information.
- Minimal overhead sampling function .svsample was renamed to
svsample2. The former name will be faded out; please use svsample2
from now on.
- Substantial rewrite of vignette, especially Section 5; includes now
a comparison of SV and GARCH.
- Updates and corrections in .Rd files.
- Added some info when package is attached.
- Sample size is now denoted as "n" instead of "T", in order to avoid
confusion with "TRUE" and/or the transpose symbol.
Changes in Version 0.8-4:
- Fixed a bug introduced in version 0.8-2, where I forgot to let
.svsample know about the changes in update(...). Thanks to Keiran
Thompson for pointing this out.
- Updated CITATION file.
Changes in Version 0.8-3:
- Minor changes in vignette.
Changes in Version 0.8-2
- update(...) now takes an additional boolean argument preventing
an update of mu (but instead hold mu = 0 fixed). This feature is
needed e.g. for factor stochastic volatility models.
- C++ function "update" rewritten to use ordinary pointers instead of
Rcpp objects. This became necessary because Rcpp objects cannot be
constructed re-using memory due to the SEXPREC structure. See
and follow-ups for a more detailed explanation.
Changes in Version 0.8-1
- Added a -I directive for compiler in Makevars.win so that winbuilder
finds headers in inst/include/.
- Re-ran all code used in vignette.
Changes in Version 0.8-0
- Re-structured main sampler code in sampler.cpp: new function "update"
performs a single MCMC iteration. Additionally, this function is also
made available to be called by C/C++ code in another package. To use
this function within C/C++ code, simply #include <update.h> (defined
in inst/include) in the C/C++ code of your package, which itself
Imports:/Depends: stochvol (>= 0.8). See package factorstochvol for
an example using this mechanism.
- Minor stylistic changes in helper functions and subroutines at
- Fixed a minor bug in sampler.cpp where regressionNoncentered
returned sigma instead of fabs(sigma) when phi is drawn outside of
the unit sphere.
- Fixed DESCRIPTION to Import: Rcpp (instead of Depend:).
- Fixed NAMESPACE: Now has "importFrom(Rcpp, evalCpp)" as required by
Changes in Version 0.7-2
- Updated CITATION file.
- Updated vignette (mainly stylistic changes).
Changes in Version 0.7-1
- Manual is now provided as a vignette.
Changes in Version 0.7-0
- Added a manual.
- Changed the default prior for mu from c(-10, 3) to c(0, 100) to
avoid disaster when percentage log-returns (instead of log-returns)
are used but the prior is not adapted accordingly.
- Included the date in the exrates dataset.
- Changed svsample to also accept vectors with zero-returns; it throws
a warning now (instead of an error) and adds an offset constant.
- Fixed plot.svdraws to reset par to old values.
- Added a "residual plot" feature. Thanks to Hedibert Lopes for
pointing this out.
- Added the convenience function "logret" for taking log-returns of a
given series, with the possibility of de-meaning.
- Cleaned up summary.svdraws, which now returns a "summary.svdraws"
object. For actual printing, print.summary.svdraws is used.
- Cleaned up summary.svsim, which now returns a "summary.svsim" object.
For actual printing, print.summary.svsim is used.
Changes in Version 0.6-1
- Fixed typo in wrapper.R which previously disallowed changing the
"expert" argument "proposalvar4sigmaphi": Replaced
"proposalvar2sigmaphi" by "proposalvar4sigmaphi" on line 76.
- Included EUR exchange rates from the European Bank's Statistical Data
Warehouse. Use with "data(exrates)".
- Added CITATION file.
- Replaced Rprintf by REprintf and cat(...) by cat(..., file=stderr())
for status reports. Thanks to Kurt Hornik for pointing this out.
Changes in Version 0.6-0
- Introduced ".svsample" for minimal overhead sampling. Intended to
be used as a plug-in into other MCMC samplers. No input checking, use
with proper care!
- Disabled progress bar in non-Unix-like systems due to problems with
- Some bug fixes for solaris. Seems to build fine now. Thanks to Brian
Ripley for reporting the bugs.
Changes in Version 0.5-1
- Replaced all paste0(...) calls by paste(..., sep='') for
Changes in Version 0.5-0
- First CRAN release version.
- Code updatesummary in C (apply w/ quantiles is slow).
- Make AWOL sampler available for fixed parameters. Thanks to Hedibert
Lopes for pointing this out.