Follow @solverworld Tweet this
“All about X, part 1” is really a fancy way of saying a little bit about X.
How do you eat an elephant?
One bite at a time 1
So let’s eat stochastic difference equations one bite at a time. Let’s consider a first-order linear equation driven by a Gaussian random variable.
xn+1=axn+wnwn∼N(0,σ2)|a|<1.
Let’s dissect this one bit at a time. xn is our system’s state, or value, at time n. Our time variable n takes on integer values, -2, -1, 0, 1, 2, and so on. wn is our noise term, and it is a normally distributed Gaussian variable with mean 0 and standard deviation σ at each time n. The values at different times are uncorrelated. We require |a|<1 so that our equation is stable, or does not blow up.
What does this series look like? Here is a sample run of 5000 steps for a=0.9967 and σ=0.082. The significance of these numbers will be revealed later.
Let’s derive some basic properties of our stochastic series xn. Recall that E() is the expectation operator, meaning it computes the expected value of its random variable argument.
What is the average (expected) value of xn? Since our process is stationary, that is, a is fixed, and wn does not varying it’s statistics over time, IE(xn) is constant, let’s call it IE(x). Then
IE(xn+1)=aIE(xn)+IE(wn)IE(x)(1−a)=IE(wn)IE(x)=0
where we used E(wn)=0 for the final step.
What about the variance of x?
Var(xn+1)=a2Var(xn)+Var(wn)Var(x)(1−a2)=σ2Var(x)=σ21−a2
Cov(xn+1,xn)=IE[(xn+1−IE(xn+1))(xn−IE(xn))]=IE[xn+1xn]=IE[(axn+wn)xn]=IE[ax2n]=aσ21−a2
Let’s look at the increments:
Δxn+1=xn+1−xn=(a−1)xn+wnVar(Δx)=(a−1)2Var(x)+σ2Var(Δx)=σ2[(1−a)21−a2+1]=σ221+a.
Note If a is close to 1, then the variance of the increments is close to σ2.
Now, let’s get a little more involved and compute the variance over k steps. From some basic system theory (or inspection):
xk=x0ak+k−1∑s=0ak−s−1ws
To make sure we have the right limits, let’s check for k=1:
x1=ax0+w0
That looks right, let’s continue on.
Var(xk−x0)=(ak−1)2Var(x)+σ2k−1∑s=0(ak−s−1)2
Now, using the Sum of a Geometric Series, we have
Var(xk−x0)=(ak−1)21−a2σ2+1−a2k1−a2=σ2[(ak−1)2+1–a2k1−a2=2σ21−ak1−a2.
Checking when k=1 and we see it matches our earlier result.
In Part 2 we will look more closely at some simulations and trading results on these series.
Notes:
- Generally credited to General Creighton Williams Abrams, Jr., Chief of Staff of United States Army 1972-1974, but an earlier reference to the concept is Frank Cody, Detroit’s Superintendent of Schools in 1921 link