I'm considering the standard stochastic volatility model:

$$x_t = \rho x_{t-1} + \sigma \epsilon_x$$ $$y_t = \beta \exp\left[ \frac{x_t}{2} \right] \epsilon_y$$

where $y_t$ is the log-returns and $x_t$ the log-vol associated to $y_t$.

I used PMCMC to estimate $\rho, \sigma, \beta$.

My question is:

My target is to model the volatility of an asset (equity spread) $(p_t)_t$ based on this model. $y_t$ is calculated this way:

$$ y_t = \log(p_t) - \log(p_{t-1}) $$

Now that I estimated the latent variables, I get $x_t$, I don't know how I can get back the volatility of the spread $p_t$.

Can you help me out?

  • 1
    $\begingroup$ Please make acronyms like PMCMC explicit or provide a link. Where did you get this volatility model from? Did you estimate an $x_0$ as well or do you assume $x_0 = 0$? You're assuming that the spread is always positive here, it this what you want? $\endgroup$
    – SRKX
    Commented Jun 18, 2015 at 4:39
  • $\begingroup$ - This model is the standard stochastic volatility. You can find content on arxiv.org/pdf/1408.6980.pdf (p. 13). I assume $x_0 = 0$. The spread can be positive/negative since it's a linear combination of asset prices (The most important in this analysis is the stationarity of the spread). $\endgroup$ Commented Jun 18, 2015 at 10:10
  • $\begingroup$ What I think is: Because $p_t | x_t, p_{t-1} = p_{t-1} \exp( N(0, \beta^2 exp(x_t)))$ So with a simple Monte Carlo, I sample from this dist to construct the volatility associated to $p_t$ with regard to $x_t, p_{t-1}$. $\endgroup$ Commented Jun 18, 2015 at 11:11
  • $\begingroup$ With this model, you have $p_t = p_{t-1} \exp(y_t)$, and this means that if $p_t$ is the price of the spread (as I think you do), then it will never change sign. $\endgroup$
    – SRKX
    Commented Jun 19, 2015 at 1:23
  • $\begingroup$ You're right! My model only permits positive values for the spread. So I need another formula to compute the returns. It should be more something like $y_t = |p_t / p_{t-1}| - 1$ $\endgroup$ Commented Jun 19, 2015 at 21:35

1 Answer 1


The volatility of your asset $y_t$ is simply its time varying standard deviation, given by $\beta \exp(x_t/2)$. Once you've got the estimates for latent factor $x_t$ from converged MCMC chain, calculate the expected value for volatility at time $t$ using $$ \hat{v_t} = \mathbb{E}[\beta \exp(x_t/2)] = \frac{1}{R}\sum_{r=1}^R \beta \exp(x_t^{(r)}) $$ where $R$ is the total number of MCMC chains you've got and $x_t^{(r)}$ is the value of $x_t$ in $r$-th chain.

  • $\begingroup$ Thanks for the help but I'm more keen on to model the volatility of $p_t$ instead of $y_t$. Do you know how I can proceed? $\endgroup$ Commented Jun 18, 2015 at 9:58
  • $\begingroup$ $y_t$ is the return, the different between consecutive price $p_t$. So you want to model the volatility of the price instead of return? If that's case, it's typically un-doable because financial price is non-stationary (not refers to heteroskedasticity, but the trending component in a price time series) and the volatility for non-stationary time-series is undefined. $\endgroup$
    – Jianxun Li
    Commented Jun 18, 2015 at 12:12
  • $\begingroup$ If you are modelling spread (price difference between different assets at the same time), it has a chance that those two assets are co-integrated (and hence suitable for pair-trading). In that case, you can model the volatility of the spread either by this standard SV model or a regime-switching SV model. $\endgroup$
    – Jianxun Li
    Commented Jun 18, 2015 at 12:14
  • $\begingroup$ Yes that's exactly what I'm doing. My spread $p_t$ is stationary. I use $p_t|x_t,p_{t-1} = p_{t-1} \exp(N(0, \beta^2 \exp(x_t)))$, because $y_t = \log(p_t) - \log(p_{t-1})$ and a simple Monte Carlo method to sample from this dist to have the hidden volatility associated to $p_t$. I can't input $p_t$ to a standard SV model, do I? $\endgroup$ Commented Jun 18, 2015 at 12:43
  • $\begingroup$ As a matter of fact, my goal is to model the volatility of the spread. $\endgroup$ Commented Jun 18, 2015 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.