NEWS
bayesGARCH 2.2.0 (2026-08-21)
- BUG FIX, AFFECTS RESULTS: 'control$addPriorConditions' now enters the
acceptance test of each Metropolis-Hastings step instead of being applied
once to the whole block. The previous scheme accepted or rejected the
entire sweep on the final value of psi. Each sub-step is reversible with
respect to the unconstrained posterior, but their composition is only
invariant, not reversible, so rejecting the block did not leave the
constrained posterior p(psi|y) I[psi in A] invariant and the chain
converged to the wrong distribution. On the dem2gbp benchmark under the
covariance-stationarity constraint alpha1 + beta < 1, the posterior mean
of alpha0 was overstated by about 60% and that of alpha1 by about 35%.
Users who called bayesGARCH() with 'addPriorConditions' should re-run.
Runs WITHOUT 'addPriorConditions' target the same posterior as before and
need not be revisited; see the note on numerical changes below for why
they are nonetheless no longer reproduced bit for bit from a given seed.
- BUG FIX, AFFECTS RESULTS: the series is now rescaled internally to unit
root mean square and the draws are mapped back, so that results no longer
depend on the units of 'y'. The proposals are built from a weighted least
squares fit whose conditioning depends on the size of y^2 relative to
alpha0, and whose starting value for alpha0 was a fixed 0.01. On a series
whose scale was far from unity every alpha and beta move was rejected: the
move rates were exactly zero, nu was then dragged down to delta, the latent
variances collapsed, and the root solved in the nu update eventually left
its bracket and aborted the run. Dividing a series by 100 -- log-returns in
decimals rather than in percent -- was enough to trigger it. Only alpha0
carries the scale, and the Normal prior on alpha transforms exactly under
the map, so the posterior explored is unchanged; the factor is a power of
two, which makes the rescaling and its inverse exact. Note that the prior
is stated in the units of 'y': rescaling 'y' without rescaling
'Sigma.alpha' changes the posterior, as it should.
- BUG FIX: the rejection-envelope rate of the nu update was solved on the
fixed interval [1e-5, 500]. The root can lie above 500, for a sharply
concentrated prior on nu such as lambda = 500 with delta = 500. The bracket
is now widened geometrically until the endpoints differ in sign, and a
failure to bracket is reported with a message naming the state instead of
surfacing as 'f() values at end points not of opposite sign'.
- BUG FIX: 'control$addPriorConditions' is now validated identically wherever
it is called. The starting values were checked with isTRUE() while proposed
states were tested directly, so a function returning a truthy number such
as 1 was refused up front although the sampler would have accepted it, and
a function returning NA only at some proposed states aborted the chain
mid-run with 'missing value where TRUE/FALSE needed'. Both now give one
message naming the offending parameter vector.
- Prior variances too concentrated to invert are refused with a clear
message: 'Sigma.beta' and 'lambda' whose reciprocals overflow, and a
'Sigma.alpha' that cannot be inverted. 'Sigma.alpha' is inverted in the
units of 'y', where it is well conditioned, and the precision is then
mapped to the rescaled units.
- The symmetry of 'Sigma.alpha' is judged to tolerance rather than by exact
floating-point equality, so a matrix whose off-diagonal entries are
arithmetically equal but not bit-identical is accepted; it is symmetrised
before use. Genuinely asymmetric matrices are still refused.
- A series on a scale that cannot be represented after squaring is refused
with a clear message rather than failing inside a Cholesky factorisation or
returning a chain that never moves.
- BUG FIX, AFFECTS RESULTS: starting values are now required to lie in the
support of the posterior, and are rejected with an error naming the row and
the failed condition otherwise. Every Metropolis-Hastings step only accepts
a move into the admissible region, so a chain started outside it could never
enter: the starting value was returned unchanged at every iteration and the
whole sample consisted of draws the posterior gives zero mass, with no
warning. A chain started at alpha1 + beta = 1.3 under the covariance
stationarity constraint returned 200 identical inadmissible draws out of
200. This was easy to trigger by accident, since the documented advice to
start from the parameters of a previous estimation step supplies an
unconstrained estimate; on the dem2gbp benchmark the unconstrained posterior
puts 62% of its mass outside the covariance stationary region.
- BUG FIX: the nu step tested 'control$addPriorConditions' inside its
accept-reject loop, so it exhausted all 50000 proposals whenever no value of
nu could satisfy the condition, which is the usual case since conditions
such as alpha1 + beta < 1 do not involve nu. The draw is now taken from the
full conditional first and the condition applied once afterwards, as an
independence Metropolis-Hastings step whose ratio reduces to the indicator.
This is equivalent when the condition is satisfiable and roughly thirty
times faster when it is not.
- The default starting value for nu is now the prior mean, delta + 1/lambda,
rather than a fixed 100. The fixed value lay below the prior support for the
Normal special case documented under 'lambda = 100, delta = 500'.
- Unknown components of 'control' are now rejected rather than silently
ignored, so that a mistyped name is reported instead of leaving the default
in force. The internal 'hypers' component is no longer reachable through
'control'; it could be used to replace hyper-parameters that had already
been validated as arguments of bayesGARCH().
- 'y' and all hyper-parameters must now be finite. In particular
'Sigma.beta = Inf' was previously accepted and silently imposed an improper
prior; other non-finite inputs failed later with implementation-level
messages from .C() or uniroot().
- 'control$l.chain', 'control$n.chain', 'control$refresh' and
'control$digits' must now be finite whole numbers. Fractional values were
silently truncated, and NA values failed inside the sampling loop or printed
meaningless progress reports.
- formSmpl() now requires a non-empty list of matrices sharing the same
dimensions and column names, and whole-number 'l.bi' and 'batch.size'. In
particular 'batch.size = Inf' previously returned a single row of NA rather
than signalling an error.
- BUG FIX: supplying 'control$n.chain' together with a 'control$start.val'
matrix of several rows failed with "length of 'dimnames' [2] not equal to
array extent". Several rows are now used as documented (one per chain), a
single row or a vector is replicated across chains, and a mismatch
between the two is reported clearly.
- BUG FIX: formSmpl() validated the length of 'l.bi' where it meant
'batch.size'.
- BUG FIX: a non-finite Metropolis-Hastings ratio, which can arise when two
log posterior evaluations are both -Inf, made the acceptance test NA and
aborted the chain. Such a proposal is now rejected.
- BUG FIX: fixed a potential out-of-bounds write in the simulation branch
of the C variance recursion. It was unreachable from R, where 'sim' is
always zero.
- 'control$l.chain' and 'control$n.chain' are now validated. A 'l.chain' of
1 previously wrote past the end of the chain.
- 'y' may now be any numeric vector, including a 'ts' or 'zoo' series,
which the previous is.vector() test rejected.
- Progress reports use message() rather than cat(), so they can be silenced
with suppressMessages(). This applies to bayesGARCH() and formSmpl().
- Each chain of the returned mcmc.list carries a "move.rates" attribute
giving the proportion of iterations at which each parameter moved. A high
rate is not by itself evidence of good mixing: the accepted moves are
typically small and the chains are strongly autocorrelated.
- The returned object is built with coda::mcmc.list() rather than by
setting the class attribute directly.
- SPEED: about a quarter less time per iteration. mvtnorm::dmvnorm() and
mvtnorm::rmvnorm(method = "eigen") were replaced, in the alpha step only,
by internal equivalents that perform the same operations in the same order
without the argument checking and dispatch that dominated their cost at
p = 2; these are exact substitutes, and tests pin them against mvtnorm.
The w and alpha steps now share one evaluation of the conditional variance
instead of computing it twice, and the Gamma shape in the w step is no
longer expanded into a vector of identical values. Neither of those
changes the arithmetic.
- NUMERICS, changes the low-order bits of the draws: fn.Dd.D() now forms the
weighted cross-products from the whitened regressors Z := X/sqrt(h),
through crossprod(), rather than from X/h through t(X/h) %*% X. Both
compute X' diag(1/h) X. The new form is symmetric by construction, about
five times closer to the exactly rounded value for that matrix, and about
an order of magnitude closer for the cross-products of the beta step,
whose regressors change sign. The posterior precision is then inverted
through its Cholesky factor rather than by a general LU solve, which is
both faster and, unlike solve(), returns an exactly symmetric D. That
removes a latent inconsistency: D is handed to chol(), which reads its
upper triangle, and to eigen(symmetric = TRUE), which reads its lower one,
so an asymmetric D meant the covariance used to draw the candidate and the
covariance used to evaluate its density differed in their last bits. The
posterior being targeted is unchanged, but a given seed no longer
reproduces the draws of version 2.1.10 exactly.
- mvtnorm moved from Imports to Suggests, where it is now used only to test
the equivalence above.
- Documented the corrected handling of 'addPriorConditions'.
- Documentation fix: the default 'control$start.val' was documented as
c(0.01,0.1,0.7,20); the code uses c(0.01,0.1,0.7,100).
- Documentation fix: replaced the claims about the sampler's speed and
mixing with a measured statement. The cost per iteration is modest on
current hardware, but the default l.chain=10000 yields an effective
sample size of only a few hundred draws per parameter on dem2gbp.
Readers are pointed at coda::effectiveSize() and coda::gelman.diag().
- CITATION file updated to bibentry(); citEntry() and personList() are
deprecated.
- Added a testthat suite. The statistical checks, namely the dem2gbp Normal
benchmark and a regression test pinning the constrained posterior to an
independently obtained reference, are skipped on CRAN.
- Removed cvGARCH(), which was never exported, documented or called, and
the C routines fnFilterAlphaAsymC() and fnFilterWAsymC(), which were
neither registered nor called.
- mvtnorm and coda functions are now consistently namespace-qualified.
- DESCRIPTION: dropped the CRAN-generated Author and Repository fields and
a RoxygenNote entry for a package that uses no roxygen; added Encoding
and the 'fnd' role for the author.
bayesGARCH 2.1.10 (2021-05-16)
bayesGARCH 2.1.9
bayesGARCH 2.1.8 (2021-04-22)
- Reverted some parts of 2.1.5 to ensure proper versioning
bayesGARCH 2.1.7 (2021-04-20)
- Update doc to remove ftp:// sites
- Update https
- RegisteringDynamic Symbols
bayesGARCH 2.1.5 (2020-04-20)
bayesGARCH 2.1.4 (2020-04-19)
- Doc update
- Citation modified
bayesGARCH 2.1.2 (2017-01-12)
- Update doc
- Adapt to new CRAN standards
- paper added
bayesGARCH 2.0.4
bayesGARCH 2.0.3
- DESCRIPTION modified
- references modified
bayesGARCH 2.0.2 (2015-12-15)
- DESCRIPTION file adapted to new standard
- Vignette modified
bayesGARCH 2.0.1 (2014-01-07)
- new version compiled
- change of email address
- change of package's structure
- speedup of examples
- change of version number
bayesGARCH 1-00.10 (2011-04-15)
- package vignette modified
bayesGARCH 1-00.9
- new package vignette added
- changes in documetation.
bayesGARCH 1-00.8
- CITATION file modified.
- package vignette updated.
- package vignette published in The R Journal.
bayesGARCH 1-00.7
- CITATION file modified.
- documentation files modified.
- package vignette added to \inst\doc.
bayesGARCH 1-00.6
- function addPriorConditions is now a control parameter in bayesGARCH.
- demo file modified accordingly.
- documentation modified accordingly.
- CITATION file modified.
- remove obsolete vignette
bayesGARCH 1-00.05 (2009-11-25)
bayesGARCH 1-00.04 (2009-05-11)
- CITATION file modified.
- changes in documetation.
bayesGARCH 1-00.03
bayesGARCH 1-00.02 (2008-12-04)
- changes in documentation.
bayesGARCH 1-00.01 (2008-06-03)
- changes in documentation.