I have been playing with some Brownian motion simulations (Euler scheme), when I discovered some strange behavior. When simulation 2 classical Brownian motions, the (Pearson) correlation between them is almost always quite significant (be it the absolute value and the p-value). Moreover, when increasing the number of increments, the correlation increases as well.
Here is my sample code:
import numpy as np
from scipy.stats import pearsonr
np.random.seed(12)
def BMpath(N,T,d=2):
dt = T/N
B = np.zeros((d,N+1))
for j in range(N):
dZ = np.random.normal(0,1,d)
dB = dZ*np.sqrt(dt)
B[:,j+1] = B[:,j] + dB
return B
b = BMpath(1000,100,2)
pearsonr(b[0,:],b[1,:])
When the correlation for this seed is (0.6067007021721034, 1.1145014850169111e-101) (the latter is the p-value). Is there an intuitive explanation why is that? My intuition says, that the correlation should be close to 0, as the increments are from i.i.d. $N(0,1)\sqrt{1/N}$.