I have the following python code
x = [100.0 for _ in range(1000)]
for i in range(1, len(x)):
x[i] = x[i-1] + (2*randint(0, 1)-1)*step_size
import numpy as np
print np.corrcoef(x[:-1], x[1:])
I am getting extremely high correlation values, over 99.9%, more precisely
[[ 1. 0.99785636]
[ 0.99785636 1. ]]
Does anyone know what's going on? How can I get such large autocorrelation?