I want to simulate a random walk without drift to predict a time serie. The random walk model is $X_t = X_{t-1} + \epsilon_t$ where $\epsilon_t$ a white noise with a Normal distribution.

It seems that I can't just take the mean and the standard deviation of my data's first difference ($Y_t = X_t -X_{t-1}$) and extrapoled it to $\epsilon_t$.

I have calculated a confidence interval according to the Notes on the random walk model, with :
the 1-step-ahead forecast standard error : $\operatorname{SE_{fcst(1)}} =\sqrt{\sigma_{diff}^2 + \bar{x}_{diff}^2}$
where :
$\bar{x}_{diff}$ is the mean of my data's first differences and $\sigma_{diff}^2$ his variance

So i can calculated a $(1-\alpha)$% confidence interval $(1-\alpha)$% with : $$ P(\bar{x_k}-t_{\alpha\,/2,(n-1)}\times SE_{fcst(1)}\times\sqrt{(k)} \leq \mu_{k} \leq \bar{x_k}+t_{\alpha\,/2,(n-1)}\times SE_{fcst(1)}\times\sqrt{(k)}) = (1-\alpha) $$

where :
$\bar{x_k}$ is the mean of my forecast at period $k$ (egal to the last value of my data, because I do a random walk without drift)

I also have used the function rwf from the forecast package in R to validated my intervals and they are the same. The problem is, when a simulated a large number of random walks (where $\epsilon \sim {\mathcal {N}}(0,\sigma_{diff}^2)$), I have more value in my intervals that I should have. For instance, in my 50% intervals there are 55% of my predicted values. In my 95% intervals there are 97.3% of my predicted values.

So, how am I supposed to calculated the variance of $\epsilon$ ? May I forgot to add an error ?

  • 1
    $\begingroup$ Could you explain why a forecast error would be relevant to your estimate? Why not just estimate the variance of the $Y_t$ in the usual way? After all, they are assumed to be iid variables with constant variance. $\endgroup$ – whuber Jun 2 '17 at 15:11
  • $\begingroup$ Actually, I didn't do a lot af statistics and even less prediction models. So I wanted to confirm my method. So if I assume $\epsilon \sim {\mathcal {N}}(0 ,\sigma_{diff} ^2)$, it is correct ? $\endgroup$ – Paulloed Jun 2 '17 at 16:21

Your Answer

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

Browse other questions tagged or ask your own question.