Question: Unit Root and Serial Correlation- Hummmm

 

If we run the below code we will get a plot of a pure unit root and the serial correlation parameter for a pure unit root

My question is why do we have such a large amount of serial correlation in a process that is supposed to be random?

I ran a simulation and found that the average serial correlation for a 100 pure unit roots was 0.941

It does not seam right.....am I doing something wrong here?

I thought the basic definition of a random variable was serial correlation=zero.

 

restart:
randomize():
with(Statistics):
a := 0:
b := 1:
n := 100:
randd := Sample(RandomVariable(Normal(0, 1)), 100):
s[1] := 0; for i from 2 to n do
s[i] := a+b*s[i-1]+randd[i] end do:
s := [seq(s[i], i = 1 .. 100)]:
t_ := [seq(i, i = 1 .. 100)]:
with(plots);
plot(t_, s, color = black, thickness = 2, labels = ["t", "Stock_Price"]);
Correlation(s[1 .. n-1], s[2 .. n]);
 

 

 

 

 

Please Wait...