# Random walk with “negative coefficient”

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.

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?

• 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. – whuber Oct 22 '18 at 16:31
• @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? – user475168 Oct 22 '18 at 16:43
• 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) – whuber Oct 22 '18 at 21:03
• @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. – user475168 Oct 22 '18 at 21:53
• 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. – whuber Oct 22 '18 at 23:09

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.

• 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? – user475168 Oct 22 '18 at 21:59
• @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. – Alecos Papadopoulos Oct 22 '18 at 22:04
• 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. – user475168 Oct 22 '18 at 22:08
• I believe $|\phi|=1$ includes the case $\phi=-1.$ – whuber Oct 22 '18 at 23:08
• 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. – mlofton Oct 23 '18 at 5:56