SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Amin
Topic Author
Posts: 1516
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

February 9th, 2017, 2:50 pm

Amin wrote:
Instead of Black Scholes, I was a little more bold and tried solution of CEV noise fokker planck pde. I have given initial steps and I will complete full numerical analysis tomorrow.

We try to find the solution of following fokker planck equation
[$]\frac{\partial p}{\partial t}=.5 \sigma ^2\frac{\partial ^2\left[x^{2\gamma }p\right]}{\partial x^2}=.5 \sigma ^2x^{2\gamma }\frac{\partial ^2p}{\partial x^2}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial p}{\partial x}+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}p[$] Equation(1)

We change coordinates from p(x,t) to [$]\text{w($\zeta $,t)}[$] such that   [$]\text{p(x,t)=w($\zeta $,t)}[$]  We have after the change of coordinates
[$]\frac{\partial p}{\partial x}=\frac{\partial w}{\partial \zeta }\frac{\partial \zeta }{\partial x}[$]
[$]\frac{\partial p}{\partial t}=\frac{\partial w}{\partial \zeta }\frac{\partial \zeta }{\partial t}+\frac{\partial w}{\partial t}[$]
[$]\frac{\partial ^2p}{\partial x^2}=\frac{\partial ^2w}{\partial \zeta ^2}\left(\frac{\partial \zeta }{\partial x}\right)^2+\frac{\partial w}{\partial \zeta }\frac{\partial ^2\zeta }{\partial x^2}[$]  Equations(2)

Substituting Equations(2) in Equation(1), we get
[$]\frac{\partial w}{\partial t}=.5 \sigma ^2x^{2\gamma }(\frac{\partial \zeta }{\partial x})^2\frac{\partial ^2w}{\partial \zeta ^2}+\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }[$]
[$]+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w[$] Equation(3)

We want to convert the transformed equation(3) into standard heat equation in new coordinates. Assuming we can successfully do that we will get a standard brownian motion as the solution to heat equation in new coordinates.
For that to happen, we will have to impose the conditions

[$].5 \sigma ^2x^{2\gamma }(\frac{\partial \zeta }{\partial x})^2=1[$]  Equation(4)
[$]\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w=0[$] Equation(5)

But we also know once we have satisfied the above conditions, as we stated earlier we will get a standard brownian motion as the solution to heat equation in new coordinates.
[$]w=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right][$]  Equation(6)
[$]\frac{\partial w}{\partial \zeta }=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right]\left(-\frac{\zeta }{2t}\right)[$]  Equation(7)

From Equation (4) , we get
[$]\frac{\partial \zeta }{\partial x}=\frac{1}{\sqrt{.5 }\text{$\sigma $x}^{\gamma }}[$] Equation(8)
From above equation
[$]\zeta (x)=\frac{x^{1-\gamma }}{\sqrt{.5 }\sigma (1-\gamma )}-\frac{x_0{}^{1-\gamma }}{\sqrt{.5 }\sigma (1-\gamma )}[$]  Equation(9)
[$]\frac{\partial ^2\zeta }{\partial x^2}=\frac{(-\gamma )}{\sqrt{.5 }\text{$\sigma $x}^{\gamma +1}}[$] Equation(10)
Putting Equations (6) and (7) in Equaiton(5) and simplifying to cancel the exponential, we get
[$]\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\left(-\frac{\zeta }{2t}\right)+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}=0[$] Equation(11)
We try to solve the following ODE  which can be solved for both zeta or x.(I will attempt to give the complete solution tomorrow but we will have to convert the eqution into zeta or x because a map between both variables exists as given by equation(9) for example. 
[$]\frac{\partial \zeta }{\partial t}=\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)-\left(\frac{2t}{\zeta }\right)\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}[$]

I will try to give complete numerically worked out solution tomorrow. The PDE can then easily be solved in the light of example I cited in the previous post. Here is the reference again. Please look at equation 4.24 in example 4.7 on page 48 of the book, "Essential partial differential equations: Analytical and computational aspects" by David F. Griffiths, John W. Dold, and David J. Silvester. I followed the reference in the above derivation.


Sorry for late update. I will do numerics tomorrow but quickly, equation(11) is not an ODE, it is again a PDE. zeta is a function of both x and t and the map in equation(9) should be valid for t=0 though equation(8) for d/dx_zeta(x,t) should be valid everywhere in t. We can expand zeta(x,t) by method of iterated integrals as

zeta(x,t)=zeta(x,0)+ integral(0 to t) d/dt_(zeta(x,0)) dt + double-integral(0,t) d2/dt2_(zeta(x,0)) dt dt + triple-integral(0,t) d3/dt3_(zeta(x,0)) dt dt dt +....higher order terms
all of the  d/dt_(zeta(x,0), d2/dt2_(zeta(x,0)) and d3/dt3_(zeta(x,0)) can be found from the equations 8,9,10 for the initial data combined with the equation 11. Sorry for the quick, non-standard rough notation but will put everything in latex tomorrow and try to add numerics.


Paul wrote:
There's a pattern here: list and Amin both ignore the advice of the experts and go merrily their own way, learning nothing in the process.

Do the Black-Scholes PDE with call payoff.


Yes, I will give numerics for Black Scholes lognormal model first and will try to do that tomorrow. Sorry for going the wrong way first.
 
User avatar
Amin
Topic Author
Posts: 1516
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

February 13th, 2017, 1:53 pm

In p(x,t) when we start from p(x_0,t_0)  the first argument x is totally general and can change as a function of time and can also change by arbitrary value at the final time cross section. We can write  
[$]x=x_0+ \int _{t_0}^tdx(s)+\int _{x(t)}^xdx[$] 
or 
[$]\text{d$\zeta $}(x,t)=\frac{\partial }{\partial t}\zeta (x(t),t)+\frac{\partial }{\partial x}\zeta (x(s),s)\frac{\partial x}{\partial s}+\frac{\partial }{\partial x}\zeta (x,t)[$]
We can also write
[$]\zeta (x,t)=\zeta \left(x_0,t_0\right)+\int_{t_0}^t \frac{\partial }{\partial s}\zeta (x(s),s) \, ds+\int _{t_0}^t\frac{\partial }{\partial x}\zeta (x(s),s)\frac{\partial x}{\partial s}ds[$]
[$]+\int_{x(t)}^x \frac{\partial }{\partial x}\zeta (x,t) \, dx[$]
From integration by parts
[$]\int _{t_0}^t\frac{\partial }{\partial x}\zeta (x(s),s)\frac{\partial x}{\partial s}ds=x(t)\frac{\partial }{\partial x}\zeta (x(t),t)-x\left(t_0\right)\frac{\partial }{\partial x}\zeta \left(x\left(t_0\right),t_0\right)[$]
[$]-\int _{t_0}^tx(s)\frac{\partial }{\partial x}\left[\frac{\partial }{\partial s}\zeta (x(s),s)\right]ds[$]
where [$]\frac{\partial \zeta (x(s),s)}{\partial s}[$] is given by the last equation in post (478) and [$]\frac{\partial \zeta }{\partial x}[$] is given by equation (8) in post (478).
Sorry, I was unable to get back to work for past few days but will try to complete the numerical work for Black Scholes quickly in a few days.
 
User avatar
Amin
Topic Author
Posts: 1516
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

February 15th, 2017, 12:47 pm

Amin wrote:
Instead of Black Scholes, I was a little more bold and tried solution of CEV noise fokker planck pde. I have given initial steps and I will complete full numerical analysis tomorrow.

We try to find the solution of following fokker planck equation
[$]\frac{\partial p}{\partial t}=.5 \sigma ^2\frac{\partial ^2\left[x^{2\gamma }p\right]}{\partial x^2}=.5 \sigma ^2x^{2\gamma }\frac{\partial ^2p}{\partial x^2}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial p}{\partial x}+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}p[$] Equation(1)

We change coordinates from p(x,t) to [$]\text{w($\zeta $,t)}[$] such that   [$]\text{p(x,t)=w($\zeta $,t)}[$]  We have after the change of coordinates
[$]\frac{\partial p}{\partial x}=\frac{\partial w}{\partial \zeta }\frac{\partial \zeta }{\partial x}[$]
[$]\frac{\partial p}{\partial t}=\frac{\partial w}{\partial \zeta }\frac{\partial \zeta }{\partial t}+\frac{\partial w}{\partial t}[$]
[$]\frac{\partial ^2p}{\partial x^2}=\frac{\partial ^2w}{\partial \zeta ^2}\left(\frac{\partial \zeta }{\partial x}\right)^2+\frac{\partial w}{\partial \zeta }\frac{\partial ^2\zeta }{\partial x^2}[$]  Equations(2)

Substituting Equations(2) in Equation(1), we get
[$]\frac{\partial w}{\partial t}=.5 \sigma ^2x^{2\gamma }(\frac{\partial \zeta }{\partial x})^2\frac{\partial ^2w}{\partial \zeta ^2}+\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }[$]
[$]+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w[$] Equation(3)

We want to convert the transformed equation(3) into standard heat equation in new coordinates. Assuming we can successfully do that we will get a standard brownian motion as the solution to heat equation in new coordinates.
For that to happen, we will have to impose the conditions

[$].5 \sigma ^2x^{2\gamma }(\frac{\partial \zeta }{\partial x})^2=1[$]  Equation(4)
[$]\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w=0[$] Equation(5)

But we also know once we have satisfied the above conditions, as we stated earlier we will get a standard brownian motion as the solution to heat equation in new coordinates.
[$]w=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right][$]  Equation(6)
[$]\frac{\partial w}{\partial \zeta }=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right]\left(-\frac{\zeta }{2t}\right)[$]  Equation(7)

From Equation (4) , we get
[$]\frac{\partial \zeta }{\partial x}=\frac{1}{\sqrt{.5 }\text{$\sigma $x}^{\gamma }}[$] Equation(8)
From above equation
[$]\zeta (x)=\frac{x^{1-\gamma }}{\sqrt{.5 }\sigma (1-\gamma )}-\frac{x_0{}^{1-\gamma }}{\sqrt{.5 }\sigma (1-\gamma )}[$]  Equation(9)
[$]\frac{\partial ^2\zeta }{\partial x^2}=\frac{(-\gamma )}{\sqrt{.5 }\text{$\sigma $x}^{\gamma +1}}[$] Equation(10)
Putting Equations (6) and (7) in Equaiton(5) and simplifying to cancel the exponential, we get
[$]\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\left(-\frac{\zeta }{2t}\right)+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}=0[$] Equation(11)
We try to solve the following ODE  which can be solved for both zeta or x.(I will attempt to give the complete solution tomorrow but we will have to convert the eqution into zeta or x because a map between both variables exists as given by equation(9) for example. 
[$]\frac{\partial \zeta }{\partial t}=\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)-\left(\frac{2t}{\zeta }\right)\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}[$]

I will try to give complete numerically worked out solution tomorrow. The PDE can then easily be solved in the light of example I cited in the previous post. Here is the reference again. Please look at equation 4.24 in example 4.7 on page 48 of the book, "Essential partial differential equations: Analytical and computational aspects" by David F. Griffiths, John W. Dold, and David J. Silvester. I followed the reference in the above derivation.

OK, I tried to do the above work for driftless lognormal diffusion. We try to find the solution of following fokker planck equation
[$]\frac{\partial p}{\partial t}= \sigma ^2\frac{\partial ^2\left[x^2p\right]}{\partial x^2}= \sigma ^2x^2\frac{\partial ^2p}{\partial x^2}+4\sigma ^2x\frac{\partial p}{\partial x}+2\sigma ^2p[$] Equation (1)

I changed coordinates from p(x,t) to w(zeta,t) such that   p(x,t)=w(zeta,t)  We have after the change of coordinates (as I did in the quoted post)
[$]\frac{\partial w}{\partial t}=\sigma ^2x^2(\frac{\partial \zeta }{\partial x})^2\frac{\partial ^2w}{\partial \zeta ^2}+\left.(\sigma ^2x^2\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+4\sigma ^2x\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+2\sigma ^2w[$]  Equation(3)

We want to convert the transformed equation into standard heat equation in new coordinates. Assuming we can successfully do that we will get a standard brownian motion as the solution to heat equation in new coordinates.
For that to happen, we will have to impose the conditions

[$]\sigma ^2x^2\left(\frac{\partial \zeta }{\partial x}\right)^2=1[$]  Equation(4)
[$]\left.( \sigma ^2x^2\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+4\sigma ^2x\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+2\sigma ^2w=0[$]  Equation(5)
But we also know once we have satisfied the above conditions, 
[$]w=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right][$] Equation(6)
[$]\frac{\partial w}{\partial \zeta }=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right]\left(-\frac{\zeta }{2t}\right)[$] Equation(7)

From Equation (3) , we get
[$]\frac{\partial \zeta }{\partial x}=\frac{1}{\text{$\sigma $x}}[$] Equation(8)
From above equation
[$]\zeta (x,0)=\frac{\ln (x)}{\sigma }-\frac{\ln \left(x_0\right)}{\sigma }[$] Equation(9)
[$]\frac{\partial ^2\zeta }{\partial x^2}=\frac{-1}{\text{$\sigma $x}^2}[$] Equation(10)
After substituting Equations(8) and (10) in equation (5), we get
[$]\left.(\sigma ^2x^2\frac{-1}{\text{$\sigma $x}^2}-\frac{\partial \zeta }{\partial t}+4\sigma ^2x\frac{1}{\text{$\sigma $x}}\right)\left(-\frac{\zeta }{2t}\right)+2\sigma ^2=0[$] Equation(11)
[$]\left.(- \sigma -\frac{\partial \zeta }{\partial t}+4\sigma \right)-\left(\frac{2t}{\zeta }\right)2\sigma ^2=0[$] Equation(12)
[$]\frac{\partial \zeta }{\partial t}=3\sigma -\frac{4t}{\zeta }\sigma ^2[$] Equation(13)

The solution to the above ode is [$]\zeta (t)=\zeta (0)+3\text{$\sigma $t}[$], however, we do realize that if we are tracking the mean of the distribution, the first derivative has to be zero in equation (5)  while the second derivative in equation (5) will not be zero because change of mean should be equal to drift in the diffusion which is zero in the case of driftless lognormal SDE we used to get the fokker planck. I would be able to write a new version of equation (5) for the mean of the lognormal driftless diffusion when mean does not change as in our case 
[$]\left.( \sigma ^2x^2\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}\right)\frac{\partial w}{\partial \zeta }+2\sigma ^2w=0[$] 
which has the solution [$]\zeta (t)=\zeta (0)-\text{$\sigma $t}[$]  and using equation(9), we get the new equation as
[$]\zeta (x,t)=\frac{\ln (x)}{\sigma }-\frac{\ln \left(x_0\right)}{\sigma }-\text{$\sigma $t}[$] which gives us the solution to the lognormal SDE model.
Last edited by Amin on February 15th, 2017, 1:34 pm
 
User avatar
Amin
Topic Author
Posts: 1516
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

February 15th, 2017, 12:54 pm

Amin wrote:
Amin wrote:
Instead of Black Scholes, I was a little more bold and tried solution of CEV noise fokker planck pde. I have given initial steps and I will complete full numerical analysis tomorrow.

We try to find the solution of following fokker planck equation
[$]\frac{\partial p}{\partial t}=.5 \sigma ^2\frac{\partial ^2\left[x^{2\gamma }p\right]}{\partial x^2}=.5 \sigma ^2x^{2\gamma }\frac{\partial ^2p}{\partial x^2}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial p}{\partial x}+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}p[$] Equation(1)

We change coordinates from p(x,t) to [$]\text{w($\zeta $,t)}[$] such that   [$]\text{p(x,t)=w($\zeta $,t)}[$]  We have after the change of coordinates
[$]\frac{\partial p}{\partial x}=\frac{\partial w}{\partial \zeta }\frac{\partial \zeta }{\partial x}[$]
[$]\frac{\partial p}{\partial t}=\frac{\partial w}{\partial \zeta }\frac{\partial \zeta }{\partial t}+\frac{\partial w}{\partial t}[$]
[$]\frac{\partial ^2p}{\partial x^2}=\frac{\partial ^2w}{\partial \zeta ^2}\left(\frac{\partial \zeta }{\partial x}\right)^2+\frac{\partial w}{\partial \zeta }\frac{\partial ^2\zeta }{\partial x^2}[$]  Equations(2)

Substituting Equations(2) in Equation(1), we get
[$]\frac{\partial w}{\partial t}=.5 \sigma ^2x^{2\gamma }(\frac{\partial \zeta }{\partial x})^2\frac{\partial ^2w}{\partial \zeta ^2}+\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }[$]
[$]+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w[$] Equation(3)

We want to convert the transformed equation(3) into standard heat equation in new coordinates. Assuming we can successfully do that we will get a standard brownian motion as the solution to heat equation in new coordinates.
For that to happen, we will have to impose the conditions

[$].5 \sigma ^2x^{2\gamma }(\frac{\partial \zeta }{\partial x})^2=1[$]  Equation(4)
[$]\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w=0[$] Equation(5)

But we also know once we have satisfied the above conditions, as we stated earlier we will get a standard brownian motion as the solution to heat equation in new coordinates.
[$]w=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right][$]  Equation(6)
[$]\frac{\partial w}{\partial \zeta }=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right]\left(-\frac{\zeta }{2t}\right)[$]  Equation(7)

From Equation (4) , we get
[$]\frac{\partial \zeta }{\partial x}=\frac{1}{\sqrt{.5 }\text{$\sigma $x}^{\gamma }}[$] Equation(8)
From above equation
[$]\zeta (x)=\frac{x^{1-\gamma }}{\sqrt{.5 }\sigma (1-\gamma )}-\frac{x_0{}^{1-\gamma }}{\sqrt{.5 }\sigma (1-\gamma )}[$]  Equation(9)
[$]\frac{\partial ^2\zeta }{\partial x^2}=\frac{(-\gamma )}{\sqrt{.5 }\text{$\sigma $x}^{\gamma +1}}[$] Equation(10)
Putting Equations (6) and (7) in Equaiton(5) and simplifying to cancel the exponential, we get
[$]\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\left(-\frac{\zeta }{2t}\right)+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}=0[$] Equation(11)
We try to solve the following ODE  which can be solved for both zeta or x.(I will attempt to give the complete solution tomorrow but we will have to convert the eqution into zeta or x because a map between both variables exists as given by equation(9) for example. 
[$]\frac{\partial \zeta }{\partial t}=\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)-\left(\frac{2t}{\zeta }\right)\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}[$]

I will try to give complete numerically worked out solution tomorrow. The PDE can then easily be solved in the light of example I cited in the previous post. Here is the reference again. Please look at equation 4.24 in example 4.7 on page 48 of the book, "Essential partial differential equations: Analytical and computational aspects" by David F. Griffiths, John W. Dold, and David J. Silvester. I followed the reference in the above derivation.

OK, I tried to do the above work for driftless lognormal diffusion. We try to find the solution of following fokker planck equation
[$]\frac{\partial p}{\partial t}= \sigma ^2\frac{\partial ^2\left[x^2p\right]}{\partial x^2}= \sigma ^2x^2\frac{\partial ^2p}{\partial x^2}+4\sigma ^2x\frac{\partial p}{\partial x}+2\sigma ^2p[$] Equation (1)

I changed coordinates from p(x,t) to w(zeta,t) such that   p(x,t)=w(zeta,t)  We have after the change of coordinates (as I did in the quoted post)
[$]\frac{\partial w}{\partial t}=\sigma ^2x^2(\frac{\partial \zeta }{\partial x})^2\frac{\partial ^2w}{\partial \zeta ^2}+\left.(\sigma ^2x^2\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+4\sigma ^2x\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+2\sigma ^2w[$]  Equation(3)

We want to convert the transformed equation into standard heat equation in new coordinates. Assuming we can successfully do that we will get a standard brownian motion as the solution to heat equation in new coordinates.
For that to happen, we will have to impose the conditions

[$]\sigma ^2x^2\left(\frac{\partial \zeta }{\partial x}\right)^2=1[$]  Equation(4)
[$]\left.( \sigma ^2x^2\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+4\sigma ^2x\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+2\sigma ^2w=0[$]  Equation(5)
But we also know once we have satisfied the above conditions, 
[$]w=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right][$] Equation(6)
[$]\frac{\partial w}{\partial \zeta }=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right]\left(-\frac{\zeta }{2t}\right)[$] Equation(7)

From Equation (3) , we get
[$]\frac{\partial \zeta }{\partial x}=\frac{1}{\text{$\sigma $x}}[$] Equation(8)
From above equation
[$]\zeta (x,0)=\frac{\ln (x)}{\sigma }-\frac{\ln \left(x_0\right)}{\sigma }[$] Equation(9)
[$]\frac{\partial ^2\zeta }{\partial x^2}=\frac{-1}{\text{$\sigma $x}^2}[$] Equation(10)
After substituting Equations(8) and (10) in equation (3), we get
[$]\left.(\sigma ^2x^2\frac{-1}{\text{$\sigma $x}^2}-\frac{\partial \zeta }{\partial t}+4\sigma ^2x\frac{1}{\text{$\sigma $x}}\right)\left(-\frac{\zeta }{2t}\right)+2\sigma ^2=0[$] Equation(11)
[$]\left.(- \sigma -\frac{\partial \zeta }{\partial t}+4\sigma \right)-\left(\frac{2t}{\zeta }\right)2\sigma ^2=0[$] Equation(12)
[$]\frac{\partial \zeta }{\partial t}=3\sigma -\frac{4t}{\zeta }\sigma ^2[$] Equation(13)

The solution to the above ode is [$]\zeta (t)=\zeta (0)+3\text{$\sigma $t}[$], however, we do realize that if we are tracking the median of the diffusion, the first derivative has to be zero while the second derivative will not be zero because change of median should be equal to drift in the diffusion which is zero in the case of driftless lognormal SDE we used to get the fokker planck. We would be able to write a new version of equation (5) for the median of the lognormal driftless diffusion when median does not change as in our case 
[$]\left.( \sigma ^2x^2\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}\right)\frac{\partial w}{\partial \zeta }+2\sigma ^2w=0[$] 
which has the solution [$]\zeta (t)=\zeta (0)-\text{$\sigma $t}[$]  and using equation(9), we get the new equation as
[$]\zeta (x,t)=\frac{\ln (x)}{\sigma }-\frac{\ln \left(x_0\right)}{\sigma }-\text{$\sigma $t}[$] which gives us the solution to the lognormal SDE model.

Sorry the equation (3) in the above post is

[$]\frac{\partial w}{\partial t}=\sigma ^2x^2(\frac{\partial \zeta }{\partial x})^2\frac{\partial ^2w}{\partial \zeta ^2}+\left.(\sigma ^2x^2\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+4\sigma ^2x\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+2\sigma ^2w[$]

For the solution to ODE in Equation(13) in previous post and for the later ODE when we took change in mean to be zero, I used the mathematica program given in example 4, page 11-12 of my paper. I used no initial condition and omitted the line 6 in the code there where initial condition is numerically specified. As you can see the solution to ODE is independent of the initial conditions. You can download the paper from https://papers.ssrn.com/sol3/papers2.cfm?abstract_id=2872598
 
User avatar
Amin
Topic Author
Posts: 1516
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

Yesterday, 1:30 pm

Amin wrote:
Instead of Black Scholes, I was a little more bold and tried solution of CEV noise fokker planck pde. I have given initial steps and I will complete full numerical analysis tomorrow.

We try to find the solution of following fokker planck equation
[$]\frac{\partial p}{\partial t}=.5 \sigma ^2\frac{\partial ^2\left[x^{2\gamma }p\right]}{\partial x^2}=.5 \sigma ^2x^{2\gamma }\frac{\partial ^2p}{\partial x^2}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial p}{\partial x}+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}p[$] Equation(1)

We change coordinates from p(x,t) to [$]\text{w($\zeta $,t)}[$] such that   [$]\text{p(x,t)=w($\zeta $,t)}[$]  We have after the change of coordinates
[$]\frac{\partial p}{\partial x}=\frac{\partial w}{\partial \zeta }\frac{\partial \zeta }{\partial x}[$]
[$]\frac{\partial p}{\partial t}=\frac{\partial w}{\partial \zeta }\frac{\partial \zeta }{\partial t}+\frac{\partial w}{\partial t}[$]
[$]\frac{\partial ^2p}{\partial x^2}=\frac{\partial ^2w}{\partial \zeta ^2}\left(\frac{\partial \zeta }{\partial x}\right)^2+\frac{\partial w}{\partial \zeta }\frac{\partial ^2\zeta }{\partial x^2}[$]  Equations(2)

Substituting Equations(2) in Equation(1), we get
[$]\frac{\partial w}{\partial t}=.5 \sigma ^2x^{2\gamma }(\frac{\partial \zeta }{\partial x})^2\frac{\partial ^2w}{\partial \zeta ^2}+\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }[$]
[$]+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w[$] Equation(3)

We want to convert the transformed equation(3) into standard heat equation in new coordinates. Assuming we can successfully do that we will get a standard brownian motion as the solution to heat equation in new coordinates.
For that to happen, we will have to impose the conditions

[$].5 \sigma ^2x^{2\gamma }(\frac{\partial \zeta }{\partial x})^2=1[$]  Equation(4)
[$]\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w=0[$] Equation(5)

But we also know once we have satisfied the above conditions, as we stated earlier we will get a standard brownian motion as the solution to heat equation in new coordinates.
[$]w=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right][$]  Equation(6)
[$]\frac{\partial w}{\partial \zeta }=\frac{1}{\sqrt{4\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{4t}\right]\left(-\frac{\zeta }{2t}\right)[$]  Equation(7)

From Equation (4) , we get
[$]\frac{\partial \zeta }{\partial x}=\frac{1}{\sqrt{.5 }\text{$\sigma $x}^{\gamma }}[$] Equation(8)
From above equation
[$]\zeta (x)=\frac{x^{1-\gamma }}{\sqrt{.5 }\sigma (1-\gamma )}-\frac{x_0{}^{1-\gamma }}{\sqrt{.5 }\sigma (1-\gamma )}[$]  Equation(9)
[$]\frac{\partial ^2\zeta }{\partial x^2}=\frac{(-\gamma )}{\sqrt{.5 }\text{$\sigma $x}^{\gamma +1}}[$] Equation(10)
Putting Equations (6) and (7) in Equaiton(5) and simplifying to cancel the exponential, we get
[$]\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\left(-\frac{\zeta }{2t}\right)+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}=0[$] Equation(11)
We try to solve the following ODE  which can be solved for both zeta or x.(I will attempt to give the complete solution tomorrow but we will have to convert the eqution into zeta or x because a map between both variables exists as given by equation(9) for example. 
[$]\frac{\partial \zeta }{\partial t}=\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)-\left(\frac{2t}{\zeta }\right)\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}[$]

I will try to give complete numerically worked out solution tomorrow. The PDE can then easily be solved in the light of example I cited in the previous post. Here is the reference again. Please look at equation 4.24 in example 4.7 on page 48 of the book, "Essential partial differential equations: Analytical and computational aspects" by David F. Griffiths, John W. Dold, and David J. Silvester. I followed the reference in the above derivation.

I have tried to solve the fokker-planck PDE related to driftless CEV diffusion. Here is the steps I have taken for the solution. Unlike the above analysis, I used the standard definition of normal with .5 in the exponential and .5 in the standard heat equation.
The equation (3) in the quoted post above becomes
[$]\frac{\partial w}{\partial t}=.5 \sigma ^2x^{2\gamma }(\frac{\partial \zeta }{\partial x})^2\frac{\partial ^2w}{\partial \zeta ^2}+\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }[$]
[$]+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w[$]   Equation(1)

We want to convert the transformed equation into standard heat equation in new coordinates. Assuming we can successfully do that we will get a standard brownian motion as the solution to heat equation in new coordinates. For that to happen, we will have to impose the conditions
[$]\sigma ^2x^{2\gamma }\left(\frac{\partial \zeta }{\partial x}\right)^2=1[$]   Equation(2)
[$]\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\frac{\partial \zeta }{\partial t}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)\frac{\partial w}{\partial \zeta }+\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}w=0[$]  Equation(3)

But we also know once we have satisfied the above conditions, 

[$]w=\frac{1}{\sqrt{2\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{2t}\right][$] Equation(4)
[$]\frac{\partial w}{\partial \zeta }=\frac{1}{\sqrt{2\text{pi} t}}\text{Exp}\left[-\frac{\zeta ^2}{2t}\right]\left(-\frac{\zeta }{t}\right)[$]   Equation(5)

From equation(2) above, we can find the following three equations
[$]\frac{\partial \zeta }{\partial x}=\frac{1}{\text{$\sigma $x}^{\gamma }}[$]  Equation(6)
[$]\zeta (x,0)=\frac{x^{1-\gamma }}{\sigma (1-\gamma )}-\frac{x_0{}^{1-\gamma }}{\sigma (1-\gamma )}[$]   Equation(7)
[$]\frac{\partial ^2\zeta }{\partial x^2}=\frac{(-\gamma )}{\text{$\sigma $x}^{\gamma +1}}[$]   Equation(8)

From equation(3), we derive the following equation
[$]
\frac{\partial \zeta }{\partial t}=\left.(.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}+2\gamma \sigma ^2x^{2\gamma -1}\frac{\partial \zeta }{\partial x}\right)[$]
[$]-\left(\frac{t}{\zeta }\right)\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}[$]   Equation(9)
which simplifies in the case of driftless diffusion where we have to account only for second order derivative as
[$]\frac{\partial \zeta }{\partial t}=.5 \sigma ^2x^{2\gamma }\frac{\partial ^2\zeta }{\partial x^2}-\left(\frac{t}{\zeta }\right)\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}[$] Equation(10)
using equation(6), we get from equation(10)
[$]\frac{\partial \zeta }{\partial t}=-.5 \sigma \gamma x^{\gamma -1}-\left(\frac{t}{\zeta }\right)\gamma \sigma ^2(2\gamma -1)x^{2\gamma -2}[$] Equation(11)
From equation(7), we get the inverse map from zeta to x which is valid at time zero
[$]x=\left[\sigma (1-\gamma )\left(\zeta (x,0)+\frac{x_0{}^{1-\gamma }}{\sigma (1-\gamma )}\right)\right]{}^{\frac{1}{(1-\gamma )}}[$]  Equation(12)
using the above inverse map, we get from equation (11), the following ode
[$]\frac{\partial \zeta }{\partial t}=-.5 \sigma  \gamma \left[\sigma (1-\gamma )\left(\zeta (x,0)+\frac{x_0{}^{1-\gamma }}{\sigma (1-\gamma )}\right)\right]{}^{-1}[$]
[$]-\left(\frac{t}{\zeta }\right)\gamma \sigma ^2(2\gamma -1)[\sigma (1-\gamma )\left(\zeta (x,0)+\frac{x_0{}^{1-\gamma }}{\sigma (1-\gamma )}\right)]{}^{-2}[$]
We can very easily solve the above ordinary differential equation with method of iterated integrals in terms of general initial value. I would like the friends to recall that in the method of iterated integrals the series solution only depends on initial values of the dependent variable which are handily available in almost all the cases. The right initial value would usually be [$]\zeta (x,0)=0[$]  which will make many terms in the series expansion solution singular but once we change coordinates back to x  from equation (12), after the solution of ODE in zeta without giving numerical value of zeta(0) in the solution from the method of iterated integrals, the right initial value in terms of x would be x(0) which will give us a very valid solution.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...