I am new to forecast and I would appreciate any help.

I want to do Bayesian estimation of GARCH models. I read a similar question here, but I have some additional questions. The model is

$$y_i=\sigma_i\epsilon_i,$$ $$\sigma^2_i = \alpha_0 + \alpha_1 y^2_{i-1} + \alpha_2 \sigma^2_{i-1}, $$ $$ \text{where } \epsilon_i \overset{iid}{\sim}\mathcal{N}(0,1),\ i=1,2,\cdots,T.$$

The parameters of the model are estimated using the first $t$ observations, and these estimates are used to make one-step-ahead forecasts for the remaining $T-t$ periods. The vignette of the package stochvol says (page 23, Algortihm 1) to do the following steps:

Algorithm 1 (Predictive density and likelihood evaluation at time t + 1)

  1. Obtain M posterior draws of $\theta, \text{where } \theta=(\alpha_0,\ \alpha_1,\ \alpha_2).$
  2. Obtain M draws from the conditional distribution $ \sigma_{{t+1}|[1:t]}|y_{[1:t]},\theta_{[1:t]} $ by computing $ \sigma^{(m)}_{{t+1}|[1:t]} =\sqrt{ \alpha_{0,[1:t]}^{(m)} + \alpha_{1,[1:t]}^{(m)} (y_t^{o})^2+\alpha_{2,[1:t]}^{(m)} ( \sigma^{(m)}_{t,[1:t]})^2 } $
  3. To obtain $\text{PL}_{t+1}$, average over M densities of normal distribution with mean $(1,y_t) \times \beta_{[1:t]}^{(m)} $ and standard deviation $\exp( \sigma_{t+1,[1:t]}^{(m)}) $, each evaluated at $y_{t+1}^{o}$ for $m=1,2,\cdots, M.$
  4. To obtain M draws from the predictive distribution, simulate from a normal distribution with mean $(1,y_t) \times \beta_{[1:t]}^{(m)} $ and Standard deviation $\exp( \sigma_{t+1,[1:t]}^{(m)}) $ for $m=1,2,\cdots, M.$,

where by using the superscript $(^o)$ in $y_{[1:t]}$, we follow Geweke and Amisano (2010) and denote ex post realizations (observations) for the set of points in time ${1,2,\cdots,t}$ of the ex ante random values $y_{[1:t]}$ (page 22).

My questions are:

  1. For step 2: the term $(y_t^{o})^2$ represents the observed price at time $t$? I read here (page 7) that starting from the GARCH(1,1) equation for $\sigma_{t}^2$ , we can derive our forecast for next period's variance, $\hat{\sigma}_{t+1}^2$ by

$$ \hat{\sigma}_{t+1}^2 =\alpha_0 + \alpha_1 E(y_t^2|\mathcal{F}_{t-1}) + \alpha_2 \sigma_t^{2} = \alpha_0 +(\alpha_1 +\alpha_2)\sigma_t^{2}$$ While we use the observed value at step 2, we use the term $ E(y_t^2|\mathcal{F}_{t-1})$ at the last equation. Please, can you explain this to me. Moreover, why do we use the term $ E(y_t^2|\mathcal{F}_{t-1})$ and not $ E(y_t^2|\mathcal{F}_{t})$?

  1. For step 3: My question is similar. The terms $(y_{t+1}^{o})^2$ are the true values? Here, I don't have $\beta$-parameters, so the mean is zero?
  2. Could you please propose a book that will help me?
  • $\begingroup$ stochvol does not handle Bayesian GARCH estimation but stochastic volatility. The vignette just shows a comparison between stochastic volatility and a GARCH method, however, a random walk MCMC is implemented which is (to my knowledge) not included in the stochvol package per se. Instead, use for example the bayesGARCH package! $\endgroup$ – muffin1974 Feb 19 '16 at 17:09
  • $\begingroup$ Just a brief notice regarding your question 2: $\beta$ is any way to compute the expected mean, this is not covered by GARCH estimation as this does only focus on volatilities. $\beta$ would come up if you additionally impose an ARMA process (or whatever idea you have regarding the dynamics of the mean), otherwise just set it to 0 $\endgroup$ – muffin1974 Feb 19 '16 at 17:14
  • $\begingroup$ Thank you for your answer. I edit my question. I just want to understand the steps of the algorithm and to write my code. $\endgroup$ – F.F. Feb 19 '16 at 17:24
  1. Question: The identity $E(y_t ^2|F_{t-1})=(y_t^0) ^2$ holds, because in this setting you assume that the mean dynamics of $y_t$ is flat, which means the best predictor of $y_t$ at time $t-1$ is just $y_{t-1}$. So you are correct, $y_t^0$ is the $t-1$ observed return. $E(y_t ^2|F_{t})$ cannot be used because given you could now this value there would be no need to predict anything as $E(y_t ^2|F_{t})=y_t$. However, the best predictor in terms of mean-squared error is $E(y_t ^2|F_{t-1})$ thats is the reason why you use this value.

  2. Yes, you are correct, and as I wrote in the comments, the underlying assumption is that of a flat mean dynamic, so $\beta=0$.

  3. Well, to answer this properly some more insights are necessary, I don't know what you want to learn additionally.

  • $\begingroup$ Hi! Thank you very much. To be honest, I don't understand why to take mean. Suppose that we have data $y_1,y_2,\cdots,y_t$ and estimates $\hat{\theta}$. We know that $\sigma^2_{t+1}=\alpha_0+\alpha_1y^2_t + \alpha_2\sigma^2_t$. At time $t$, $y_{t+1}$ is not known, but $y_t$ is known. So, we predict $\hat{\sigma}^2_{t+1}=\hat{\alpha_0}+\hat{\alpha_1}y^2_t + \hat{\alpha_2}\sigma^2_t$. So, why to take mean? Maybe, I haven't understoond properly the definition of prediction. $\endgroup$ – F.F. Feb 19 '16 at 19:57
  • $\begingroup$ Can you try to be more precise, I do not get what you mean with 'take mean'? Are you wondering why the formula says $E(y_t|F_t)$ although in the end you just use $y_{t-1}$? $\endgroup$ – muffin1974 Feb 20 '16 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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