0
$\begingroup$

I was playing around in R with simulating random walks. At some point I tried this model:

x = NULL
x[1] = 0

for (i in 2:2000) {
  x[i] = -x[i-1] + rnorm(1) 
}

Below are a time series plot, the acf and pacf.

enter image description here

Now, what exactly is this? Is it also called random walk? The time series plot doesn't look like one (seems to be stable around the mean). It's not, to me, clear if the variance is increasing over time. The ACF and PACF, however, is what one might expect except for the oscillating pattern.

Is there anything concrete that can be modelled with this model?

$\endgroup$
  • $\begingroup$ It's an AR ("autoregressive") model: that gives you a search term to investigate further. You can also note that $X_{2i+2}=X_{2i} + \varepsilon_i$ where $\varepsilon_i$ are iid with a Normal distribution of variance $(1)^2+(-1)^2=2.$ Setting $Y_i=X_{2i}/\sqrt{2}$ therefore gives the usual Brownian Motion. $\endgroup$ – whuber Oct 22 '18 at 16:31
  • $\begingroup$ @whuber A "proper" random walk would also be a AR process, so can I then from your answer assume that this is not a special case of a random walk? Does this special case have a name? $\endgroup$ – user475168 Oct 22 '18 at 16:43
  • $\begingroup$ Here's an R simulation to provide insight. It plots the variance versus $t$ for $t$ out to n, based on n.sim independent path realizations. Total time is about one second. n <- 5e2; n.sim <- 2e4; system.time({ x <- matrix(0, n, n.sim); e <- matrix(rnorm(n*n.sim), n, n.sim); for (i in 2:n) x[i,] <- -x[i-1,] + e[i,]; }); plot(apply(x, 1, var), col="#00000040", asp=1, xlab="t", ylab="Variance"); abline(0:1, col="Red", lwd=2) $\endgroup$ – whuber Oct 22 '18 at 21:03
  • 1
    $\begingroup$ @whuber Thank you for all your help. Unfortunately your helpful comments also got deleted when a previous answer was deleted. Sad that all comments are deleted when a post is deleted here on stackexchange. $\endgroup$ – user475168 Oct 22 '18 at 21:53
  • 1
    $\begingroup$ Here's the lost comment: From $$X_{t+2}=-X_{t+1}+\varepsilon_{t+1} = -\left(X_t+\varepsilon_t\right)+\varepsilon_{t+1}=X_t+(\varepsilon_{t+1}-\varepsilon_t)$$ we obtain two correlated processes $X_{2t}$ and $X_{2t+1},$ both of which are explicitly Brownian motions because the disturbances $\varepsilon_{2t+1}-\varepsilon_{2t}$ are iid Normal. In particular, the variances of the increments are directly proportional to the time differences and therefore are unbounded. (I'm still unsure what you mean by "infinite.") The algebra with the lag operator is invalid because there's no convergence. $\endgroup$ – whuber Oct 22 '18 at 23:09
2
$\begingroup$

To answer the variance issue, we consider

$$x_t = -x_{t-1}+u_t,\;\;\; x_1=0,\;\; u_t \sim WN(\sigma^2_u)$$

Writing recursively backwards we have

$$x_t = -x_{t-1}+u_t = -(-x_{t-2}+u_{t-1})+u_t = x_{t-2} -u_{t-1}+u_t$$

$$=-x_{t-3}+u_{t-2} -u_{t-1}+u_t = -(-x_{t-4}+u_{t-3})+u_{t-2} -u_{t-1}+u_t$$

$$= x_{t-4} - u_{t-3}+u_{t-2} -u_{t-1}+u_t$$

or

$$x_t = u_t-u_{t-1}+u_{t-2}...(-1)^{p_{t}}u_1$$

where $p_t$ here is the parity of $t$, taking the value $1$ if $t$ is an even number. regardless, the variance of the process is

$$\text{Var}(x_t) = t\cdot \sigma^2_u$$

So it has the same mean (zero), and variance as

$$x_t = \sum_{s=1}^tu_s$$

but indeed different typical evolution over time, as should be expected.

Don't expect to straightforwardly verify the "equal variances" result through sample moments, since these are not ergodic processes.

$\endgroup$
  • $\begingroup$ Great, thanks! Obvious, when you put it like that. Indicative of a good answer! I have one more question, though: "Is there anything concrete that can be modelled with this model?". In all my googling trying to find an answer to what in the world this model is supposed to represent, I haven't seen anyone use it as an example. I'm guessing that means it's not really a good model for anything? $\endgroup$ – user475168 Oct 22 '18 at 21:59
  • $\begingroup$ @user475168 It's a process with oscillations, constantly up-and-down, up-and-down... a lot. Graph only a few points to see this. And not trig-wave symmetric either. It appears rather special. $\endgroup$ – Alecos Papadopoulos Oct 22 '18 at 22:04
  • $\begingroup$ It seems like such a trivial example. Every textbook and webpage give examples of: |phi| < 1, stationary AR(1). |phi| = 1, random walk. |phi| > 1, explosive process. But none consider the case of -1. $\endgroup$ – user475168 Oct 22 '18 at 22:08
  • $\begingroup$ I believe $|\phi|=1$ includes the case $\phi=-1.$ $\endgroup$ – whuber Oct 22 '18 at 23:08
  • $\begingroup$ It may be only semantics, so by the def $|\phi| = 1$, you could call it an RW, I guess. But, if you were referring to your model, called it a random walk and didn't bother to mention that you use $\phi = -1$, I guarantee you that most would assume it was 1.0. The term itself "random walk" is really out of the financial lingo and is usually associated with market efficiency. That model with $\phi = -1$ is about as market inefficient as a model could get. The model predicts the - every other period so I don't see why you're surprised that it's not a popular model. It's not practical. $\endgroup$ – mlofton Oct 23 '18 at 5:56

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.