Stochastic Vol with Jumps that's smooth and well defined for MCMC

Hi. How to model latent rare events (<1%) in a way that’s good for MCMC?. As far as I know using discrete distributions like Bernouli doesn’t work well with MCMC.

Problem stock volatility has sharp jumps looking similar to asymmetric saw.

Such jumps could be modelled with Bernoulli, example: SV with Jumps in Volatility (the volatility - e^{h_t/2}):

\begin{aligned} r_t &= \mu + e^{h_t/2}\varepsilon_t \quad \varepsilon_t \sim \text{Normal(0, 1)}\\ h_t &= \omega + \phi(h_{t-1}-\omega) + \sigma_h\eta_t + I_t J_t \\ J_t &\sim \text{Normal|LogNormal|Exp}(\mu_j,\sigma_j) \\ I_t &\sim \mathrm{Bernoulli}(p) \\ \end{aligned}

It’s possible to replace Bernoulli with I_t \sim \text{sigmoid}(k \mathcal{N}(\mu_p, \sigma_p)) and choose k so that it will be sharp enough. But, it would worsen the MCMC fit, the Jump params estimation is not reliable and sometimes chains diverge, it’s slow, etc.

My current workaround (works but not very well):

\begin{aligned} r_t &= \mu + \exp(h_t)\,\varepsilon_t \\ h_t &= \omega + \phi(h_{t-1}-\omega) + \sigma J_t \\ J_t &= \frac{z_t - \mathbb{E}[z_t]}{\sqrt{\mathrm{Var}(z_t)}} \\ z_t &\sim \mathrm{LogNormal}(0,\nu) \end{aligned}

I drive model with asymmetrical LogNormal innovation, and it produces similar pattern

Problem - the magnitude of the jump is hard to control and sometimes it overshoots producing unrealistically large jumps.

Question: would limiting the magnitude of a jump with sigmoid h_t = h_{max}\text{sigmoid}(h_t/h_{max}) ok for Stan? Or is it better to limit the random variable z_t = z_{max}\text{sigmoid}(z_t/z_{max}) or maybe with a hard bounds in variable declaration vector<upper=10>[T] z?

A better model (but I don’t know how to make it work, it has hard switch):

The idea is to use Normal innovation, but allow it sometimes bypass the recursion and set vol directly, producing sudden asymmetrical up jumps.

\begin{aligned} r_t &= \mu + \exp(h_t)\epsilon_t \\ h_t &= \begin{cases} \sigma / \sqrt{1 - \phi^2} z_t, & \text{if } I_t = 1 \text{ and } z_t > h_{t-1}, \\ \omega + \phi(h_{t-1}-\omega) + \sigma z_t, & \text{otherwise} \end{cases} \\ I_t &\sim \mathrm{Bernoulli}(p) \\ z_t &\sim \mathcal{N}(0,1) \\ \end{aligned}

It’s possible to make it soft with sigmoids. But, to make it realistic sigmoids should be sharp enough, and it destroy smoothness and makes it hard for MCMC.

\begin{aligned} I_t &= \text{sigmoid}(\text{Normal}(\mu_p, \sigma_p))\ \text{sigmoid}(z_t - h_t) \\ h_t &= (1-I_t)[\omega + \phi(h_{t-1}-\omega) + \sigma z_t] + I_t \sigma / \sqrt{1 - \phi^2} z_t \end{aligned}

Question: Is there a way to make something like this smoothly and well suited for MCMC fit? Any good and simple model with asymmetrical jumps? Maybe I’m missing something (I’m new to MCMC)?

I’m sorry if I’m reading too fast and missing important detail, but I want to chime in just in case this is helpful. From what I can see, it should be straightforward to fit the Bernoulli model you originally want. The challenge you see is that you have an entire sequence of Bernoulli states, and it looks like there would be 2^n terms in a marginalization over that sequence. But unless I’m missing something, there’s a trick here that lets you compute the correct marginalization in \mathcal{O}(n). Treat this model as a hidden markov model, and compute the likelihood via the forward algorithm, i.e. in a single forward pass accumulating the log-likelihood as you go. This framework is even flexibile enough to accomodate more complicated Markovian dependence in the latent state, if desired, but certainly includes your assumption of iid Bernoulli as a special case. Stan even has a built-in hmm_marginal for these likelihoods. See Time-Series Models

1 Like