Source: Artificial Intelligence on Medium

# Brownian Motion

## Brownian Motion Conditions

The definition of Brownian motion follows these assumptions…

- Consider indexes of time s,t such that 0 ≤ s < t < infinity
- W[x] is a random variable indexed by x
- W[0] = 0
- W[t] – W[s] ~ N(0, t-s)
- By normalizing the previous assumption W[t] – W[s] = Z*sqrt(t-s) where Z is a standard normal random variable
- The process is a Martingale (no drift)
- The process is Markov

## Brownian Motion Example

Recall the Martingale example from my previous article. We have an evolution of wealth after a sequence of fair bets. Let’s assume (because I proved a majority of it in the previous article) the process is Brownian motion. Instead of regarding the evolution of wealth as a sequence of fair bets, consider it a sequence of investment outcomes at t[1], t[2], … , t[n].

- Δt is the equal discrete time difference in investment outcomes, t[j] = j*Δt
- b[t][j] = number of units of the asset held at t[j]
- S[t][j] = price of the asset at t[j]
- ΔS[t][j] = S[t][j+1] – S[t][j] = change in asset price from t[j] to t[j+1]
- Y[t][j] = wealth at t[j]
- ΔY[t][j] = Y[t][j+1] – Y[t][j] = change in wealth from t[j] to t[j+1]
- Y[t][0] = initial wealth

Each period our wealth evolves by the following equation

Y[t][j+1] = Y[t][j] + b[t][j](S[t][j+1] – S[t][j])

We can simply this down by doing some algebra

Y[t][j+1] = Y[t][j] + b[t][j](S[t][j+1] — S[t][j])

Y[t][j+1] + Y[t][j] = b[t][j](S[t][j+1] — S[t][j])

ΔY[t][j] = b[t][j](ΔS[t][j]) by definition

Then following this the total change in wealth would be a simple summation

Y[T] – Y[0] = Σ(b[t][j]*ΔS[t][j])

We just mathematically defined our wealth as a sequence of financial investments in discrete time. But trading doesn’t operate in discrete time steps, it’s continuous. If you’ve done any coursework in higher mathematics you know what’s to follow when I say we need to let Δt go to zero creating an infinite number of steps: an integral.

Y[T] — Y[0] = ∫ b[t]*dS[t]

This is an integral of a function (b[t]) with respect to a stochastic process, and when S is a function of Brownian motion (which it will be) this is called an Itô Integral.

# The equation for the Evolution of Wealth

Why are we describing wealth generated by an investment over a period of time as an integral? Well going back to the discrete equation we have…

Y[T] — Y[0] = Σ(b[t][j]*ΔS[t][j])

Consider your wealth at two points in time Y[0] and Y[T] where the former is initial wealth at time index 0 and the latter is wealth at time index T such that 0 < T. If currently in time we are at R such that 0 < T < R then we no longer have a stochastic equation, Y[T] and Y[0] are realizations, hence we can solve the equation to determine how wealth evolved from time index 0 to T. Now, consider we are at R such that R ≤ 0 < T such that we are at or before the period of initial wealth, what does this equation describe? We are essentially computing a summation over the *sample paths* the sequence of wealth may take, allowing us to compute the various moments of statistics. This goes for the continuous case as well.

Y[T] — Y[0] = ∫ b[t]*dS[t]

The integral in place of the summation allows us to accomplish the same thing.

# Evaluating a Stochastic Integral

Solving a stochastic integral is very different from solving a traditional integral from calculus. After all, we are essentially wetting our feet in stochastic calculus. We are going to be using a variety of tools to assist us in solving stochastic integrals, vaguely similar to how we have tools at our disposal for regular integrals: U-Substitution, Integration by Parts, Trig Substitution, etc… I offer an example of the evaluation of a stochastic integral, not one that is rooted heavily in financial purposes but so that you may begin to understand the process we are dealing with.

## Example Problem

Consider the stochastic integral where b[t] = W[t]

∫ W[t]*dW[t] where W[t] is brownian motion

To evaluate this we are going to use the definitions we established earlier

Plim[m -> infinity] Σ (W[t][j-1]*(W[t][j] – W[t][j-1]))

We can distribute and rewrite the summation as

Σ(W[t][j-1]*W[t][j]) – Σ(W[t][j-1]²)

For the purposes of creating a perfect square lets separate this as

Σ(W[t][j-1]*W[t][j]) – (1/2)*Σ(W[t][j-1]²) – (1/2)*Σ(W[t][j-1]²)

Looking at the summation Σ(W[t][j]²) and Σ(W[t][j-1]²) we find the difference in terms and create an equivalent expression

Σ(W[t][j-1]²) = W[t][0]² + W[t][1]² + W[t][2]² + … + W[t][m-1]²

Σ(W[t][j]²) = W[t][1]² + W[t][2]² + W[t][3]² + … + W[t][m]²

The equivalent expression is therefore

Σ(W[t][j-1]²) = Σ(W[t][j]²) + (W[t][0]² – W[t][m]²)

Let’s substitute that for where we made an effort to write the summations as a perfect square

Σ(W[t][j-1]*W[t][j]) – (1/2)*Σ(W[t][j-1]²) – (1/2)*Σ(W[t][j-1]²)

Σ(W[t][j-1]*W[t][j]) – (1/2)*(Σ(W[t][j-1]²) – Σ(W[t][j-1]²))

Σ(W[t][j-1]*W[t][j]) – (1/2)*(Σ(W[t][j-1]²) – Σ(W[t][j]²) + (W[t][0]² – W[t][m]²))

Which looks absolutely mortifying until you realize that you can factor out the 1/2 and write it as a perfect square

(-1/2)*Σ((W[t][j-1]*W[t][j])²) + (1/2)*(W[t][0]² — W[t][m]²)