Taylor Series and Transition Density Functions

See my Github repo for full details.

https://github.com/eightsmile/cqf

1. Trinomial Random Walk

2. Transition Probability Density Function

The transition probability density function, p(y,t;y,t)p(y,t;y’,t’), is defined by,

Prob(a<y<b,at time t|y at time t)=abp(yet;y,t)dy

In words this is “the probability that the random variable y ′ lies between a and b at time t ′ in the future, given that it started out with value y at time t.”

Think of y and t as being current values with y ′ and t ′ being future values. The transition probability density function can be used to answer the question,

“What is the probability of the variable y ′ being in a specified range at time t ′ in the future given that it started out with value y at time t?”

Our Goal is to find the transition probability p.d.f., and so we find the relationship between p(y,t;y,t)p(y,t;y’,t’), and p(y,t;y,tδt)p(y,t;y’,t’-\delta t),

3. From the Trinomial model to the Transition Probability Density function

The variable y can either rise, fall or take the same value after a time step δt. These movements have certain probabilities associated with them.

We are going to assume that the probability of a rise and a fall are both the same, α<12\alpha<\frac{1}{2} . (But, of course, this can be generalized. Why would we want to generalize this?)

3.1 The Forward Equation

Given y,t{y,t}, or says y,t{y,t} the current and previous. y,t{y’,t’} are variate in the future time.

The probability of being at yy’ at time tt’ is related to the probabilities of being at the previous three values and moving in the right direction:

p(y,t;y,t)=α p(y,t;y+δy,tδt)+ (12α) p(y,t;y,tδt)+α p(y,t;yδy,tδt)

Given y,t{y,t}, we find relationship between y,t{y’,t’} and y±δy,tδt{y’\pm \delta y,t’-\delta t} that is y’ and t’ a bit time previously.

Remember, our goal is to find a solution of p(.)p(.), we try to solve the above equation.

3.2 Taylor Series Expansion

We expand each term of the equation.

p(y,t;y,t)=α p(y,t;y+δy,tδt)+ (12α) p(y,t;y,tδt)+α p(y,t;yδy,tδt)

Why we do that? Because there are too many variables in it, hard to solve it. We have to reduce the dimension.

p(y,t;y+δy,tδt) p(y,t;y,t)δtpt+δypy+12δy22py2+O(2pt2)

p(y,t;y,tδt) p(y,t;y,t)δtpt+O(2pt2)

p(y,t;yδy,tδt) p(y,t;y,t)δtptδypy+12δy22py2+O(2pt2)

Plug them back into that equation, and after cancel out terms repeated we would left with,

pt=αδy2δt2py2+O(2pt2)

We drop those derivative terms with order greater and equal than O(2pt2)O(\frac{\partial^2 p}{\partial t’^2}).

pt=αδy2δt2py2

In the RHS, we focus on αδy2δt\alpha \frac{\delta y^2}{\delta t}, firstly. The denominator and numerator have to be in the same order to make that term definite. Or, say δyO(δt)\delta y \sim O(\sqrt{\delta t}).

We thus let c2=αδy2δtc^2 = \alpha \frac{\delta y^2}{\delta t}

pt=c22py2

The above equation is also named Fokker–Planck or forward Kolmogorov equation.

Now, we have a partial differential equation. Solve it, we can get the form of pp.

3.3 Backward Equation works similar.

p(y,t;y,t)=α p(y+δy,t+δt;y,t)+ (12α) p(y,t+δt;y,t)+α p(yδy,t+δt;y,t)

the dimension-reduced result is the blow, and it is called the backward Kolmogorov equation.

pt+c22py2=0

4. Solve the Forward Kolmogorov Equation

We will solve for pp right now! However, we will solve it by assuming similarity solution.

pt=c22py2

This equation has an infinite number of solutions. It has different solutions for different initial conditions and different boundary conditions. We need only a special solution here. The detailed process of finding that solution is showing as the following,

4. 1 Assume a Solution Form

p=taf(ytb)=taf(ξ)

ξ=ytb

, where aa, and bb are indefinite variables.

Again, don’t ask why it is in this form, because it is a special solution!

4.2 Derivation

py=tabdfdξ

2py2=ta2bd2fdξ2

pt=ata1f(ξ)+bytab1dfdξ

Substitue back into the forward Kolmogorov equation (remember y=tbξy’ = t’^b \xi), we get,

af(ξ)bξdfdξ=c2t2b+1d2fdξ2

4.3 Choose bb

As we need the RHS to be independent of tt’, we could choose the value of b=12b=\frac{1}{2}, to let the tt’ has a power of 0. Why we do that? Because we aim to reduce the partial differential equation to be a ordinary differential equation, in which the only variable is ξ\xi, and tt’ disappear.

By assuming the special form of pp, and letting b=1/2b= 1/2, our forward Kolmogorov becomes,

af(ξ)12ξdfdξ=c2d2fdξ2

p=taf(yt)=taf(ξ)

ξ=yt

4.4 Choose aa

p=taf(yt)

We know that pp is the transition p.d.f., its integral must be equal to ‘1’. tt’ is independent by the definition of random walk behaviour, so we do only integrate pp, w.r.t. yy’.

Rp dy=Rtaf(yt) dy=1

Rtaf(yt) dy=1

, by replace x=ytx = \frac{y’}{\sqrt{t’}},

Rta+1/2f(x) dx=ta+1/2Rf(x) dx=1

t is independent, so the above equation would be equal to ‘1’ regardless the power of t. Thus, a=12 for sure.

Also, we get Rf(x) dx=1\int_{\mathbb{R}} f(x)\ dx= 1.

4.5 Integrate! Solve it!

By assuming the special form of pp, and letting a=1/2a=-1/2, b=1/2b=1/2, we get,

12f(ξ)12ξdfdξ=c2d2fdξ2

p=1tf(yt)=1tf(ξ)

ξ=yt

The forward Kolmogorov equation becomes,

12(f(ξ)ξdfdξ)=c2d2fdξ2

12(dξf(ξ)dξ)=c2d2fdξ2

, as f(ξ)ξdfdξ=dξf(ξ)dξf(\xi) – \xi \frac{df}{d\xi} = \frac{d \xi f(\xi)}{d \xi}.

Integrate 1st Time

12ξf(ξ)=c2dfdξ+constant

There’s an arbitrary constant of integration that could go in here but for the answer we want this is zero. We need only a special solution, so we can set that arbitrary constant term be zero.

So, the eq could be rewritten as,

12c2ξdξ=1f(ξ)df

Integrate 2nd Time

ln f(ξ)=ξ24c2+C

Take exponential, f(ξ)=eCeξ24c2=Aeξ24c2f(\xi) = e^C e^{-\frac{\xi^2}{4c^2}} = A e^{-\frac{\xi^2}{4c^2}} .

Find AA

The Last Step here is to find the exact value of AA. AA is chosen such that the integral of ff is one.

Rf(ξ) dξ=1

RAeξ24c2 dξ=2cAReξ24c2 d(ξ2c)=1

2cAπ=1

, so we get A=12cπA = \frac{1}{2c\sqrt{\pi}}

Plug f(ξ),a,b,Af(\xi), a, b, A back into p=taf(ξ)p = t^a f(\xi).

p(y)=12cπ teξ24c2=12cπ tey24c2t

p(.) now is normal like distributed.

N(x)=12πσ2e(xμ)22σ2

So, we may say μy=0\mu_{y’}=0, and σy2=2c2t\sigma^2_{y’}=2c^2t’. Or, yN(0,2c2t)y’ \sim N(0, 2c^2t’).

5. Summary

p(y)=12cπ teξ24c2=12cπ tey24c2t

Finally, we solved the transition probability density function p(.)p(.). By assuming the forward or backward type of trinomial model, we find a partial differential relationship. Then, assuming a special form of p(.)p(.) by similarity method, we solve it.

The meaning is that p(y)=12cπ teξ24c2=12cπ tey24c2tp(y’)=\frac{1}{2c\sqrt{\pi \ t’}}e^{-\frac{\xi^2}{4c^2}} =\frac{1}{2c\sqrt{\pi \ t’}}e^{-\frac{y’^2}{4c^2t’}} is one of the transition probability density function that can satisfy the trinomial random walk.

Also, we find that p(.)p(.) is normally liked distributed.