Beyond MLE: Implementing Bayesian Volatility Models in High-Performance C++. The No U-Turn Sampler

9. From HMC to NUTS: Automating the Hamiltonian In the previous post we visited the (simplified) version of a Bayesian estimator of the $GARCH(1,1)$ volatility model parameters distributions using the Hamiltonian Monte Carlo technique. We suggested then, that implementing the No U-Turn Sampler (NUTS) would provide an added bonus of better convergence and faster run times. This article serves as the second part of that series - and will number the sections accordingly. ...

August 3, 2026

Beyond MLE: Implementing Bayesian Volatility Models in High-Performance C++

1. The Model: GARCH(1,1) We assume a time series of returns $y_t$. We model them as: $$y_t = \sigma_t \epsilon_t \quad \text{where} \quad \epsilon_t \sim \mathcal{N}(0, 1)$$ The variance $\sigma_t^2$ evolves according to the GARCH(1,1) recursion: $$\sigma_t^2 = \omega + \alpha y_{t-1}^2 + \beta \sigma_{t-1}^2$$ Constraints for Stability: $\omega \gt 0, \alpha \ge 0, \beta \ge 0$ (Positivity) $\alpha + \beta \lt 1$ (Stationarity/Mean Reversion) 2. The Bayesian Objective (Log-Posterior) In HMC, we don’t just want the “best” parameters; we want to sample from the posterior distribution $P(\theta | y)$. By Bayes’ Theorem: $$\log P(\theta | y) = \log P(y | \theta) + \log P(\theta)$$ ...

July 31, 2026