Stochastic volatility (SV)¶
Overview¶
Stochastic volatility (SV) allows the variance of VAR residuals to change over time. This is important in macro/financial data where volatility can shift markedly across regimes.
This toolkit implements SV variants commonly used in the Bayesian VAR literature:
log-volatility dynamics: random walk (
SVRW) or AR(1)residual covariance: diagonal covariance (independent shocks) or a triangular factorization with time-invariant correlations (CCC-style)
Model sketch¶
Let \(h_{t,j}\) be the log-variance state for series \(j\) at time \(t\).
Random walk (SVRW)¶
For each series \(j\) the log-variance evolves as:
AR(1)¶
Optionally, the log-variance follows an AR(1):
Residual covariance structure¶
By default, conditional residual covariance is diagonal:
With the triangular factorization, the model uses:
where \(Q\) is upper-triangular with ones on the diagonal. This yields time-varying variances with a time-invariant correlation structure.
Inference approach (KSC mixture)¶
The toolkit uses a standard auxiliary-mixture method (Kim, Shephard and Chib) to sample log-volatilities efficiently by approximating the log-\(\chi^2\) distribution with a discrete mixture.
Implementation notes:
the log-volatility state is sampled with a banded precision representation;
when
covariance="triangular", the triangular factor is updated via a Gaussian prior on off-diagonal elements.
Related: