Page 55 of 56

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

Posted: October 3rd, 2019, 4:13 pm
by Amin
I have quickly done some basic mathematics that can probably be used by friends to solve the fokker planck PDEs. First we are dealing with densities of SDEs where the density vanishes at zero. We will improve that later to include the case of densities that reach zero. We suppose that we choose a certain point on the density of SDE and this point evolves in times so that the CDF of the SDE density remains constant. Let us suppose that we denote the density of SDE as [$]p(x,t)[$] and the CDF as [$]P(x,t)[$] and we denote the time changing constant CDF points as [$]v(t)[$]. We have the following integrals

[$]\int_0^{v(t)} p(x,t) dx =P(v,t)[$]
We also know that this point preserves the CDF so that 
[$]\int_0^{v(t)} \frac{\partial p(x,t)}{\partial t} dx=0[$]

we write a general Fokker planck equation in Lamperti coordinates as
[$]-\frac{\partial [\mu(x) p(x,t)]}{\partial x} + .5 {\sigma}^2 \frac{\partial ^2 p(x,t)}{\partial x^2} = \frac{\partial p(x,t)}{\partial t}[$]

we integrate both sides of the partial differential equation from 0 to [$]v(t)[$] which is the constant CDF point(or constant CDF curve in time)

[$]- \int_0^{v(t)} \frac{\partial [\mu(x) p(x,t)]}{\partial x} dx+ .5 {\sigma}^2 \int_0^{v(t)} \frac{\partial ^2 p(x,t)}{\partial x^2} dx= \int_0^{v(t)} \frac{\partial p(x,t)}{\partial t}dx[$]
but [$] \int_0^{v(t)} \frac{\partial p(x,t)}{\partial t}dx= \frac {\partial P(v,t)}{\partial t}=0 [$] so we are left with the left hand side of the equation and the right hand side goes to zero and
[$]- \int_0^{v(t)} \frac{\partial [\mu(x) p(x,t)]}{\partial x} dx+ .5 {\sigma}^2 \int_0^{v(t)} \frac{\partial ^2 p(x,t)}{\partial x^2} dx= 0[$]
differentiating both sides by t, we get by Leibniz integral rule

[$]- \frac{\partial [\mu(v) p(v,t)]}{\partial v} \frac{\partial v}{\partial t}- \int_0^{v(t)} \frac{\partial^2 [\mu(x) p(x,t)]}{\partial x \partial t} dx[$]
[$]+ .5 {\sigma}^2 \frac{\partial ^2 p(v,t)}{\partial v^2} \frac{\partial v}{\partial t} + .5 {\sigma}^2 \int_0^{v(t)} \frac{\partial ^3 p(x,t)}{\partial x^2 \partial t} dx=0[$]

It is the [$]\frac{\partial v}{\partial t}[$] that tells us about the evolution of constant CDF points. I believe we can we very easily and recursively do these integrations going from one constant CDF point to the next constant CDF point and determining their evolution one by one. By construction, we know the CDF on each of the constant CDF points and its derivatives can be found by numerical differentiation and the partial differential with respect to t can be calculated by recursively using the original PDE. I will come back with more experiments in a few days.

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

Posted: October 6th, 2019, 1:53 pm
by Amin
I have made some quick notes on solution of fokker planck equation with hermite polynomials. I have not numerically verified anything so please pardon any errors but the main ideas would stay the same.

Let us suppose we want to solve a general SDE given as
[$]dX(t)=\mu(X) dt + \sigma(X) dz(t)[$]
The fokker planck equation of this SDE is given as
[$]\frac{\partial p(X,t)}{\partial t} = -\frac{\partial [\mu(X) p(X,t)]}{\partial X} + .5 \frac{\partial^2 [{\sigma(X)}^2 p(X,t)]}{\partial X^2}[$]

First a very brief primer on derivatives of normal and derivatives of the SDE variable.
I denote the standard normal density as p(Z)
We want to convert derivatives of the SDE density of X(t) into derivatives of standard normal density. Here are the main equations
[$]p(Z)=\frac{1}{\sqrt{2 \pi}} exp[-.5 Z^2][$]
derivatives of standard normal density are given in terms of hermite polynomials.
[$]\frac{\partial p(Z)}{\partial Z}=-Z p(Z)[$]
[$]\frac{\partial^2 p(Z)}{\partial Z^2}=(Z^2-1) p(Z)[$]
now we want to convert the density of X(t) and its derivatives in terms of density of Z. In the density of X, each value of X(t) is associated with a particular value of Z through constant CDF points on corresponding densities. So we calculate the density and derivatives of X(t) in terms of Z.
[$]p(X)=p(Z) |\frac{\partial Z}{\partial X}|[$]  This follows from the standard change of variables in a density.
[$]\frac{\partial p(X)}{\partial X}=\frac{\partial p(Z)}{\partial Z} {(\frac{\partial Z}{\partial X})}^2+p(Z) \frac{\partial^2 Z}{\partial X^2} =-Z p(Z){(\frac{\partial Z}{\partial X})}^2+p(Z) \frac{\partial^2 Z}{\partial X^2} [$]
[$]\frac{\partial^2 p(X)}{\partial X^2}=\frac{\partial^2 p(Z)}{\partial Z^2} {(\frac{\partial Z}{\partial X})}^3+3 \frac{\partial p(Z)}{\partial Z} \frac{\partial Z}{\partial X} \frac{\partial^2 Z}{\partial X^2}+p(Z) \frac{\partial^3 Z}{\partial X^3}[$]
[$]=(Z^2-1) p(Z) {(\frac{\partial Z}{\partial X})}^3 -3 Z p(Z) \frac{\partial Z}{\partial X} \frac{\partial^2 Z}{\partial X^2} +p(Z) \frac{\partial^3 Z}{\partial X^3}[$]

Now I write the fokker planck equation after applying the derivatives as
[$]\frac{\partial p(X,t)}{\partial t} = -\mu(X) \frac{\partial p(X,t)}{\partial X} - \frac{\partial \mu(X)}{\partial X} p(X,t)[$]
[$]+({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) p(X,t)[$]
[$]+2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} \frac{\partial p(X,t)}{\partial X}+ .5 {\sigma(X)}^2 \frac{\partial^2 p(X,t)}{\partial X^2}[$]

Now we write the density of X(t) in terms of density of standard normal Z by substituting from above equations

[$]\frac{\partial [p(Z) \frac{\partial Z}{\partial X} ]}{\partial t} = -\mu(X) (-Z p(Z){(\frac{\partial Z}{\partial X})}^2+p(Z) \frac{\partial^2 Z}{\partial X^2}) - \frac{\partial \mu(X)}{\partial X} p(Z) |\frac{\partial Z}{\partial X}|[$]
[$]+({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) p(Z) |\frac{\partial Z}{\partial X}|[$]
[$]+2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} (-Z p(Z){(\frac{\partial Z}{\partial X})}^2+p(Z) \frac{\partial^2 Z}{\partial X^2})[$]
[$]+ .5 {\sigma(X)}^2 ((Z^2-1) p(Z) {(\frac{\partial Z}{\partial X})}^3 -3 Z p(Z) \frac{\partial Z}{\partial X} \frac{\partial^2 Z}{\partial X^2} +p(Z) \frac{\partial^3 Z}{\partial X^3}) [$]

We see that [$]p(Z)[$] which is a static density is common throughout the equations. We eliminate it and write the new equation as

[$]\frac{\partial [ \frac{\partial Z}{\partial X} ]}{\partial t} = \mu(X)  (-Z {(\frac{\partial Z}{\partial X})}^2+ \frac{\partial^2 Z}{\partial X^2}) - \frac{\partial \mu(X)}{\partial X}  |\frac{\partial Z}{\partial X}|[$]
[$]+({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) |\frac{\partial Z}{\partial X}|[$]
[$]+2 \sigma(X) \frac{\partial \sigma(X)}{\partial X}  (-Z {(\frac{\partial Z}{\partial X})}^2+ \frac{\partial^2 Z}{\partial X^2})[$]
[$]+ .5 {\sigma(X)}^2 ((Z^2-1) {(\frac{\partial Z}{\partial X})}^3 -3 Z  \frac{\partial Z}{\partial X} \frac{\partial^2 Z}{\partial X^2} + \frac{\partial^3 Z}{\partial X^3})[$]

So we get an explicit equation in terms of hermite polynomials describing how  [$]\frac{\partial [ \frac{\partial Z}{\partial X} ]}{\partial t}[$] is locally expanding/contracting in time. We can easily use this to write a numerical program for the evolution of constant CDF lines associated with a particular value of Z ranging from -5 to +5. There can be an infinite amount of analytics that can be done on this form of equation. So we have effectively eliminated the density and we are now directly dealing with how the density is changing/scaling as a function of Z.
Please bookmark this thread as I will be coming with more numerical examples and analytic techniques.
I will also be distributing a numerical program based on these analytics. Hope friends enjoyed reading this.

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

Posted: October 8th, 2019, 3:18 pm
by Amin
I copy the second last equation from the previous post.

[$]\frac{\partial [p(Z) \frac{\partial Z}{\partial X} ]}{\partial t} = -\mu(X) (-Z p(Z){(\frac{\partial Z}{\partial X})}^2+p(Z) \frac{\partial^2 Z}{\partial X^2}) - \frac{\partial \mu(X)}{\partial X} p(Z) |\frac{\partial Z}{\partial X}|[$]
[$]+({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) p(Z) |\frac{\partial Z}{\partial X}|[$]
[$]+2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} (-Z p(Z){(\frac{\partial Z}{\partial X})}^2+p(Z) \frac{\partial^2 Z}{\partial X^2})[$]
[$]+ .5 {\sigma(X)}^2 ((Z^2-1) p(Z) {(\frac{\partial Z}{\partial X})}^3 -3 Z p(Z) \frac{\partial Z}{\partial X} \frac{\partial^2 Z}{\partial X^2} +p(Z) \frac{\partial^3 Z}{\partial X^3}) [$]

I had not expnded the left hand side derivative with respect to t. This expansion is 
[$]\frac{\partial p(X)}{\partial t}=\frac{\partial [p(Z) \frac{\partial Z}{\partial X}]}{\partial t}= \frac{\partial p(Z)}{\partial Z} {(\frac{\partial Z}{\partial X})}^2 \frac{\partial X}{\partial t}+ p(Z) \frac{\partial^2 Z}{\partial X^2} \frac{\partial X}{\partial t}[$]
[$]=-Zp(Z) {(\frac{\partial Z}{\partial X})}^2 \frac{\partial X}{\partial t}+ p(Z) \frac{\partial^2 Z}{\partial X^2} \frac{\partial X}{\partial t}[$]

putting this expansion on left side of the first equation, we get
[$]-Zp(Z) {(\frac{\partial Z}{\partial X})}^2 \frac{\partial X}{\partial t}+ p(Z) \frac{\partial^2 Z}{\partial X^2} \frac{\partial X}{\partial t}[$]
[$]= -\mu(X) (-Z p(Z){(\frac{\partial Z}{\partial X})}^2+p(Z) \frac{\partial^2 Z}{\partial X^2}) - \frac{\partial \mu(X)}{\partial X} p(Z) |\frac{\partial Z}{\partial X}|[$]
[$]+({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) p(Z) |\frac{\partial Z}{\partial X}|[$]
[$]+2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} (-Z p(Z){(\frac{\partial Z}{\partial X})}^2+p(Z) \frac{\partial^2 Z}{\partial X^2})[$]
[$]+ .5 {\sigma(X)}^2 ((Z^2-1) p(Z) {(\frac{\partial Z}{\partial X})}^3 -3 Z p(Z) \frac{\partial Z}{\partial X} \frac{\partial^2 Z}{\partial X^2} +p(Z) \frac{\partial^3 Z}{\partial X^3}) [$]

eliminating [$]p(Z)[$] from the equation we get an explicit formula for evolution of [$]X(t)[$] as

[$]\frac{\partial X}{\partial t} (-Z {(\frac{\partial Z}{\partial X})}^2 + \frac{\partial^2 Z}{\partial X^2})[$]
[$]= -\mu(X) (-Z {(\frac{\partial Z}{\partial X})}^2+ \frac{\partial^2 Z}{\partial X^2}) - \frac{\partial \mu(X)}{\partial X} |\frac{\partial Z}{\partial X}|[$]
[$]+({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) |\frac{\partial Z}{\partial X}|[$]
[$]+2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} (-Z {(\frac{\partial Z}{\partial X})}^2+ \frac{\partial^2 Z}{\partial X^2})[$]
[$]+ .5 {\sigma(X)}^2 ((Z^2-1) {(\frac{\partial Z}{\partial X})}^3 -3 Z \frac{\partial Z}{\partial X} \frac{\partial^2 Z}{\partial X^2} + \frac{\partial^3 Z}{\partial X^3}) [$]

Let us apply it on toy problem of brownian motion where these partial derivatives with respect to standard normal are known. Please pardon me for some formulas as we are not in a formal brownian motion framework. We are in brownian motion density simulation framework where density is evolving in time along constant CDF lines. Here are some formulas for these constant CDF lines 
[$]B(t)=\sigma \sqrt{t} Z[$]
[$]\frac{\partial B}{\partial Z}=\sigma \sqrt{t}[$]
[$]\frac{\partial B}{\partial t}=\frac{\sigma}{2 \sqrt{t}} Z[$]
[$]\frac{\partial^2 B}{\partial Z^2}=0[$]
[$]\frac{\partial^3 B}{\partial Z^3}=0[$]

Fokker planck for brownian motion is given as
[$]\frac{\partial p(X)}{\partial t}=.5 \sigma^2 \frac{\partial^2 p(X)}{\partial X^2}[$]
expanding both sides in our framework into derivatives with respect to density of standard normal and after eliminating the density on both sides we get
[$]\frac{\partial X}{\partial t} (-Z {(\frac{\partial Z}{\partial X})}^2 + \frac{\partial^2 Z}{\partial X^2})[$]
[$]= .5 {\sigma}^2 ((Z^2-1) {(\frac{\partial Z}{\partial X})}^3 -3 Z \frac{\partial Z}{\partial X} \frac{\partial^2 Z}{\partial X^2} + \frac{\partial^3 Z}{\partial X^3}) [$]

substituting the known values of partial derivatives, we get

[$]\frac{\partial B}{\partial t} (-Z {( \frac{1}{\sigma \sqrt{t}} )}^2 )=.5 {\sigma}^2 ((Z^2-1) {( \frac{1}{\sigma \sqrt{t}} )}^3)[$]
from which follows
[$]\frac{\partial B}{\partial t} = \frac{(Z^2-1) }{-Z} .5 {\sigma}^2  {( {\sigma \sqrt{t}} )}^2{( \frac{1}{\sigma \sqrt{t}} )}^3)=\frac{(Z^2-1) }{-Z} .5 \frac{\sigma}{\sqrt{t}}[$]
I believe [$]\frac{(Z^2-1) }{-Z}[$] approaches Z from the properties of hermite polynomials and normal density(I am looking on it if it is an error). Then
[$]\frac{\partial B}{\partial t} = .5 \frac{\sigma}{\sqrt{t}} Z[$] and integrating it we retrieve the original equation of brownian motion along constant CDF lines as
[$]B(t) = \sigma \sqrt{t} Z[$] 

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

Posted: October 9th, 2019, 3:59 pm
by Amin
I think it would be better to expand the diffusions in terms of derivatives with respect to brownian motion instead of standard normal Because otherwise it is difficult to get something proportional to second hermite polynmial(that is associated with second derivative of the density of normal) on the left hand side of the fokker planck equation in time derivative.I am pursuing a strategy to expand the fokker planck in terms of derivatives with respect to brownian motion and then separate the evolution of each hermite polynomial into independent equations. I will be posting the detailed equations here in a day or two once I confirm the analytics with some experiments. 

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

Posted: October 10th, 2019, 8:32 am
by Amin
Friends, here is the new derivation of solution of Fokker-Planck using the derivatives of X(t) with respect to Brownian motion. 
Let us suppose we want to solve a general SDE given as
[$]dX(t)=\mu(X) dt + \sigma(X) dz(t)[$]
The fokker planck equation of this SDE is given as
[$]\frac{\partial p(X,t)}{\partial t} = -\frac{\partial [\mu(X) p(X,t)]}{\partial X} + .5 \frac{\partial^2 [{\sigma(X)}^2 p(X,t)]}{\partial X^2}[$]

First a very brief primer on derivatives of Brownian and derivatives of the SDE variable.
I denote the density of Brownian motion as p(B)
We want to convert derivatives of the SDE density of X(t) into derivatives of standard normal density. Here are the main equations
[$]p(B(t))=\frac{1}{\sqrt{2 \pi t}} exp[-.5 \frac{{B(t)}^2}{t}][$]
derivatives of standard normal density are given in terms of hermite polynomials.
[$]\frac{\partial p(B(t))}{\partial B(t)}=\frac{-B(t)}{t} p(B(t))[$]
[$]\frac{\partial^2 p(B(t))}{\partial {B(t)}^2}=(\frac{{B(t)}^2}{t^2}-\frac{1}{t}) p(B(t))[$]
[$]\frac{\partial p(B(t))}{\partial t}=\frac{1}{2} (\frac{{B(t)}^2}{t^2}-\frac{1}{t}) p(B(t))[$]
now we want to convert the density of X(t) and its derivatives in terms of density of B(t). In the density of X, each value of X(t) is associated with a particular value of B(t) through constant CDF points on corresponding densities. So we calculate the density and derivatives of X(t) in terms of B(t).
[$]p(X)=p(B) |\frac{\partial B}{\partial X}|[$]  This follows from the standard change of variables in a density.
[$]\frac{\partial p(X)}{\partial X}=\frac{\partial p(B)}{\partial B} {(\frac{\partial B}{\partial X})}^2+p(B) \frac{\partial^2 B}{\partial X(t)^2} =\frac{-B}{t} p(B){(\frac{\partial B}{\partial X})}^2+p(B) \frac{\partial^2 B}{\partial X^2} [$]
[$]\frac{\partial^2 p(X)}{\partial X^2}=\frac{\partial^2 p(B)}{\partial B^2} {(\frac{\partial B}{\partial X})}^3+3 \frac{\partial p(B)}{\partial B} \frac{\partial B}{\partial X} \frac{\partial^2 B}{\partial X^2}+p(B) \frac{\partial^3 B}{\partial X^3}[$]
[$]=(\frac{B^2}{t^2}-\frac{1}{t}) p(B) {(\frac{\partial B}{\partial X})}^3 +3 \frac{-B}{t} p(B(t)) \frac{\partial B}{\partial X} \frac{\partial^2 B}{\partial X^2} +p(B) \frac{\partial^3 B}{\partial X^3}[$]

I have not expnded the left hand side derivative with respect to t. This expansion is 
[$]\frac{\partial p(X)}{\partial t}=\frac{\partial [p(B) \frac{\partial B}{\partial X}]}{\partial t}= \frac{\partial p(B)}{\partial t} (\frac{\partial B}{\partial X}) +\frac{\partial p(B)}{\partial B} \frac{\partial B}{\partial t} {(\frac{\partial B}{\partial X})}[$]
[$]+\frac{\partial p(B)}{\partial B} {(\frac{\partial B}{\partial X})}^2 \frac{\partial X}{\partial t}+ p(B) \frac{\partial^2 B}{\partial X^2} \frac{\partial X}{\partial t}[$]
[$]=\frac{1}{2}(\frac{B^2}{t^2}-\frac{1}{t}) p(B) +\frac{-B}{t} p(B(t)) \frac{\partial B}{\partial t}{(\frac{\partial B}{\partial X})}[$]
[$]+\frac{-B}{t} p(B(t)) {(\frac{\partial B}{\partial X})}^2 \frac{\partial X}{\partial t}+ p(B) \frac{\partial^2 B}{\partial X^2} \frac{\partial X}{\partial t}[$]

Now I write the fokker planck equation after applying the derivatives as
[$]\frac{\partial p(X,t)}{\partial t} = -\mu(X) \frac{\partial p(X,t)}{\partial X} - \frac{\partial \mu(X)}{\partial X} p(X,t)[$]
[$]+({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) p(X,t)[$]
[$]+2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} \frac{\partial p(X,t)}{\partial X}+ .5 {\sigma(X)}^2 \frac{\partial^2 p(X,t)}{\partial X^2}[$]

Substituting the equations of derivatives of X(t) in terms of derivatives with respect to brownian motion, we get
[$]\frac{1}{2}(\frac{B^2}{t^2} {(\frac{\partial B}{\partial X})}-\frac{1}{t}) p(B) +\frac{-B}{t} p(B(t)) \frac{\partial B}{\partial t}{(\frac{\partial B}{\partial X})}[$]
[$]+\frac{-B}{t} p(B(t)) {(\frac{\partial B}{\partial X})}^2 \frac{\partial X}{\partial t}+ p(B) \frac{\partial^2 B}{\partial X^2} \frac{\partial X}{\partial t}[$]
[$]= -\mu(X) (\frac{-B}{t} p(B){(\frac{\partial B}{\partial X})}^2+p(B) \frac{\partial^2 B}{\partial X^2}) - \frac{\partial \mu(X)}{\partial X} p(B) |\frac{\partial B}{\partial X}|[$]
[$]+({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) p(B) |\frac{\partial B}{\partial X}|[$]
[$]+2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} (\frac{-B}{t} p(B){(\frac{\partial B}{\partial X})}^2+p(B) \frac{\partial^2 B}{\partial X^2})[$]
[$]+ .5 {\sigma(X)}^2 ((\frac{B^2}{t^2}-\frac{1}{t}) p(B)  {(\frac{\partial B}{\partial X})}^3[$]
[$]+3 \frac{-B}{t} p(B) \frac{\partial Z}{\partial X} \frac{\partial^2 B}{\partial X^2} +p(B) \frac{\partial^3 B}{\partial X^3}) [$]

eliminating [$]P(B)[$] from throughout the equation, we get the new equation
[$]\frac{1}{2}(\frac{B^2}{t^2}-\frac{1}{t}) {(\frac{\partial B}{\partial X})}+\frac{-B}{t} \frac{\partial B}{\partial t}{(\frac{\partial B}{\partial X})}[$]
[$]+\frac{-B}{t} {(\frac{\partial B}{\partial X})}^2 \frac{\partial X}{\partial t}+ \frac{\partial^2 B}{\partial X^2} \frac{\partial X}{\partial t}[$]
[$]= -\mu(X) (\frac{-B}{t} {(\frac{\partial B}{\partial X})}^2+ \frac{\partial^2 B}{\partial X^2}) - \frac{\partial \mu(X)}{\partial X} |\frac{\partial B}{\partial X}|[$]
[$]+({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) |\frac{\partial B}{\partial X}|[$]
[$]+2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} (\frac{-B}{t} {(\frac{\partial B}{\partial X})}^2+ \frac{\partial^2 B}{\partial X^2})[$]
[$]+ .5 {\sigma(X)}^2 ((\frac{B^2}{t^2}-\frac{1}{t})  {(\frac{\partial B}{\partial X})}^3 +3 \frac{-B}{t} \frac{\partial Z}{\partial X} \frac{\partial^2 B}{\partial X^2} +\frac{\partial^3 B}{\partial X^3}) [$]

We get three different equations for three independent modes of evolution, in terms of 2nd hermite, 1st hermite and constant from the above equation. These equations are given for three independent modes of evolution associated with each hermite polynomial. All of these three independent modes are treated independently and results are added to get the final solution.

[$] [{(\frac{\partial B}{\partial X})} - {\sigma(X)}^2{(\frac{\partial B}{\partial X})}^3] (\frac{1}{2}(\frac{B^2}{t^2}-\frac{1}{t}))=M_1(t) [$]  Equation(1)

[$] [\frac{\partial B}{\partial t}{(\frac{\partial B}{\partial X})} + {(\frac{\partial B}{\partial X})}^2 \frac{\partial X}{\partial t}[$]
[$]+ \mu(X) ( {(\frac{\partial B}{\partial X})}^2)-2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} {(\frac{\partial B}{\partial X})}^2[$]
[$]-.5 {\sigma(X)}^2 (+3 \frac{\partial B}{\partial X} \frac{\partial ^2 B}{\partial X^2}) ] (\frac{-B}{t})=M_2(t)[$]  Equation(2)

[$] \frac{\partial^2 B}{\partial X^2} \frac{\partial X}{\partial t} +\mu(X)  \frac{\partial^2 B}{\partial X^2} + \frac{\partial \mu(X)}{\partial X} |\frac{\partial B}{\partial X}|-({(\frac{\partial \sigma(X)}{\partial X})}^2+\sigma(X) \frac{\partial^2 \sigma(X)}{\partial X^2}) |\frac{\partial B}{\partial X}|[$]
[$]-2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} (\frac{\partial^2 B}{\partial X^2})- .5 {\sigma(X)}^2 (\frac{\partial^3 B}{\partial X^3})=M_3(t)[$]
    Equation(3)

Here the first mode describes the effective value of diffusion that is added/subtracted over the diffusion of brownian motion. Equation(2)/second mode of evolution describes first order effects which are scaled in relative proportion to brownian motion and the equation(3)/mode three is higher order effects.
From the second mode of evolution, we get the value for [$]\frac{\partial X}{\partial t}[$] by dividing by [$]{(\frac{\partial B}{\partial X})}^2[$] which is the coefficient of  [$]\frac{\partial X}{\partial t}[$] in the equation (2) as

[$] \frac{\partial X}{\partial t}=(\frac{\partial B}{\partial t}{(\frac{\partial X}{\partial B})} + \mu(X) -2 \sigma(X) \frac{\partial \sigma(X)}{\partial X}[$]
[$] -.5 {\sigma(X)}^2 (+3 {\frac{\partial B}{\partial X}}^{-1} \frac{\partial ^2 B}{\partial X^2})) [$]  Equation(4)
We have yet not added the effective diffusion effect from first equation But from above equation
[$] X(t+\Delta t)=X(t)+(B(t + \Delta t) -B(t))  {(\frac{\partial X}{\partial B})} + \mu(X) {\Delta t} -2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} {\Delta t}[$]
[$]-.5 {\sigma(X)}^2 (+3 {\frac{\partial B}{\partial X}}^{-1} \frac{\partial ^2 B}{\partial X^2}) {\Delta t} [$] Equation(5)

 Now we add the diffusion effect from the first mode of evolution to get the right evolution equation along the CDF lines as

[$] X(t+\Delta t)=X(t)+(B(t + \Delta t) -B(t))  {(\frac{\partial X}{\partial B})} + \mu(X) {\Delta t} -2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} {\Delta t}[$]
[$]-.5 {\sigma(X)}^2 (+3 {\frac{\partial B}{\partial X}}^{-1} \frac{\partial ^2 B}{\partial X^2}) {\Delta t} + ({(\frac{\partial X}{\partial B})} - {\sigma(X)}^2{(\frac{\partial B}{\partial X})}) (\sqrt{t+\Delta t}-\sqrt{t}) Z [$] Equation(6)

here in the above equation [$](B(t + \Delta t) -B(t))=Z (\sqrt{t+\Delta t}-\sqrt{t})  [$]

I have still not added the higher order effects from equation(3)/third mode of evolution in the above evolution scheme.  I tried the evolution method in equation(6) for evolution of equations in Lamperti coordinates and it perfectly replicates the exact process as long as it continues but my finite differences were becoming unstable after a little while as I am not very well versed in the numerical solution of PDEs where people learn everything about finite differences and their stability. 

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

Posted: October 10th, 2019, 11:29 am
by Amin
Sorry double post.

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

Posted: October 10th, 2019, 11:20 pm
by Amin
I have updated the exposition. I had wrongly equated all of the three independent modes of evolution equations to zero. Sorry, I had not prepared any proper notes for the equations and I was  not careful when I wrote the post. These are three independent modes of evolution dictated by each eigenvector/hermite polynomial and obviously cannot be equated to zero right away. I have made changes to earlier notes in post 815. Please pardon this error.

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

Posted: October 11th, 2019, 4:43 pm
by Amin
Over the weekend, I will present a detailed method about how to calculate the derivatives of the sort [$]\frac{\partial B}{\partial w}[$] , [$]\frac{\partial ^2 B}{\partial w^2}[$] and [$]\frac{\partial ^3 B}{\partial w^3}[$] analytically. I have worked over the main idea and I am completing the details. I will again be giving a detailed exposition with equations.

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

Posted: October 13th, 2019, 3:36 am
by Amin
Friends, I have edited equation 6 in post 815 for time being. I will be coming with detailed solution in 2-3 days with analytic calculation of derivatives w.r.t brownian motion.

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

Posted: October 13th, 2019, 4:00 pm
by Amin
Here are some of my comments on the previous equations and some analogies.
Let us suppose we are given an SDE of the form

[$]dX(t)=\mu(X) dt + \sigma(X) dz(t)[$]

The short term solution to the associated fokker planck given by fourier transform is given as  
refrence for the above is (  https://digital.library.adelaide.edu.au ... 02main.pdf ) : page 143

[$]P(t+\Delta t,y,t,x)=\frac{1}{\sqrt{4 Pi {\sigma(X)}^2 \Delta t }} \exp[-\frac{(y-x-\mu(x) \Delta t +2 \frac{\partial {[\sigma(x)]}^2}{\partial x} \Delta t}{4{\sigma(x)}^2 \Delta t})][$]
[$]* \exp[-\frac{\partial \mu(x)}{\partial x} \Delta t+ \frac{\partial^2 [{\sigma(x)}^2]}{\partial x^2}\Delta t][$]

The first exponential in the above line is gaussian exponential. 2nd exponential that is being multiplied and is written on the next line is change of probability exponential or Feynman-kac exponential.
Our 2nd equation/2nd mode in the previous posts(post 815) corresponds to the numerator of the above gaussian exponential that is why we equate it(2nd mode/2nd equation)  to zero. Our 1st equation/1st mode in post 815 corresponds to denominator of the above gaussian exponential(There is some difference that we expanded our FP PDE with respect to brownain motion and that takes some diffusion out of the denominator into the 2nd equation/2nd mode in post 815.)
Our third mode/third equation on post 815, corresponds to the second exponential written on the next line to gaussian exponential. This is change of probability/Feynman-Kac exponential.
We could have written a naiive evolution equation from above gaussian exponential as
[$]y=x+\mu(x) \Delta t -2 \frac{\partial {[\sigma(x)]}^2}{\partial x} \Delta t + \sigma(x) dz(t)[$]
(The above would correspond to naiive scheme, I have given in post 815 based on equation 1 and 2 or first two modes.)
But then we would need to modify to include the effect of second exponential which is change of probability/Feynman-kac exponential. Since this Feynamn-Kac exponential multiplies the Gaussian exponential probability, we could easily do it. Here is how to do that: we want to continue our evolution on the constant CDF lines with respect to Gaussian(or BM) probability. Our true probability evolution includes both exponentials and is [$]p(Gaussian)*p(FeynmanKac)[$] Suppose our first derivative with respect to gaussian is given as [$]\frac{\partial Z}{\partial x}[$] so that before evolution we had [$]\frac{\partial Z}{\partial x} p(Gaussian)=p(x)[$]
We first evolve the x according to naiive gaussian scheme and then find new Gaussian [$]\frac{\partial Z}{\partial x}(Gaussian)[$] and then modify it to find the true value of [$]\frac{\partial Z}{\partial x}(true)=\frac{\frac{\partial Z}{\partial x}(Gaussian)}{p(FeynmanKac)}[$]

I hope to update friends with the progress in a day or two.

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

Posted: October 14th, 2019, 1:43 pm
by Amin
An informal update for time being
The right evolution equation along the CDF lines incorporating the effect of first and second mode (1st and 2nd equation post 815) is given as

[$] X(t+\Delta t)=X(t)+(B(t + \Delta t) -B(t))  {(\frac{\partial X}{\partial B})} + \mu(X) {\Delta t} -2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} {\Delta t}[$]
[$]-.5 {\sigma(X)}^2 (+3 {\frac{\partial B}{\partial X}}^{-1} \frac{\partial ^2 B}{\partial X^2}) {\Delta t} - ({(\frac{\partial X}{\partial B})} - {\sigma(X)}^2{(\frac{\partial B}{\partial X})}) (B(t + \Delta t) -B(t)) [$] (Equation(6) in post 815)

which can be written after simplifying it as

[$] X(t+\Delta t)=X(t) + \mu(X) {\Delta t} -2 \sigma(X) \frac{\partial \sigma(X)}{\partial X} {\Delta t}[$]
[$]-.5 {\sigma(X)}^2 (+3 {\frac{\partial B}{\partial X}}^{-1} \frac{\partial ^2 B}{\partial X^2}) {\Delta t} + ( {\sigma(X)}^2{(\frac{\partial B}{\partial X})}) (B(t + \Delta t) -B(t)) [$]

here in the above equation [$](B(t + \Delta t) -B(t))=Z (\sqrt{t+\Delta t}-\sqrt{t})  [$]
Now we are left with incorporating the change of probability effect from third mode(equation 3 in post 815).

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

Posted: October 15th, 2019, 12:34 pm
by Amin
I have decided to halt this thread for the time being. For reasons, please look at my thread in off-topic. Post 983.

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

Posted: October 16th, 2019, 3:02 pm
by Amin
Today was a slightly better day. I still did not do any work but had some thoughts. Here I put them on paper for friends.

We are done with diffusion and translation with respect to Z or B(t). We have to take into account the effect of killing/growth of probability density by Feynman Kac exponential. I have not tested these ideas on a compute program and they are just to stimulate further thought and help in solution of Fokker-Planck equation. Ok, we can alternatively to last paragraph of post (), instead change Z/B(t) on each evolution step. Our new probabilty density is 
[$]=p(Gaussian)*p(FKac)=p_{true}[$]

if Gaussian probability function p(Gaussian) is denoted by [$]pZ()[$] then we could instead simply move our Z grid on each step so that on new grid the new modified Gaussian probabilities are equal to true probabilities as give by [$]p_{true}[$] as
[$]Z=pZ^{-1}(p_{true})[$] using inverse of normal pdf 


but then we will not be moving on a equally spaced constant width Z/B(t) grid and CDF lines would be changing in time. Something can easily be done to interpolate X back on fixed equally spaced Z grid. I have more thoughts and would share them as they slightly more mature.

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

Posted: October 17th, 2019, 3:03 pm
by Amin
if Gaussian probability function p(Gaussian) is denoted by [$]pZ()[$] then we could instead simply move our Z grid on each step so that on new grid the new modified Gaussian probabilities are equal to true probabilities as give by [$]p_{true}[$] as
[$]Z=pZ^{-1}(p_{true})[$] using inverse of normal pdf 
Sorry this was a bad idea. The new density has nothing to do with normal density. We could use the inverse CDF though but then we will have to integrate the product of gaussian and F-Kac probabilities from one end of the density to find the CDF at a particular point.

I have written code for analytic calculation of first derivative of X with respect to Brownian motion. Tomorrow, I hope to extend it for higher derivatives and then write a stable density evolution algorithm based on FPE. Once we would not need finite differences, the solution will become perfectly stable. I hope to be posting an initial version of the working code in a few days.

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

Posted: October 21st, 2019, 10:54 am
by Amin
Here is the update about new progress. I was unable to work properly for past few days but was able to do slightly better work over the weekend. About the progress: I am calculating analytical derivatives by repeated differentiation of the original equation in the case of Lamperti form of fokker-planck first. These derivatives are stable and do not blow as opposed to finite-difference derivatives. 
But very recently I had better ideas for analytical solution of the equation that I want to share with friends. I will try these ideas myself but hope that other friends might be able to solve the equation using these ideas in case I cannot do it. 
Here are the main thoughts: Once we have eliminated the probability distribution of brownian motion from the Fokker-Planck equation, we can substitute for X(t) an analytical form in terms of time dependent coefficients and brownian motion hermite polynomials as

[$]X(t,B)=a_0(t) + a_1(t) H_1(B) + a_2(t) H_2(B)[$]  Equation(1)
[$]\frac{\partial X}{\partial t} =\frac{\partial a_0}{\partial t} +\frac{\partial a_1}{\partial t} H_1(B) +\frac{\partial a_2}{\partial t} H_2(B)[$]
[$]\frac{\partial X}{\partial B} = a_1(t) +2 a_2(t) H_1(B)[$]
[$]\frac{\partial^2 X}{\partial B^2} = 2 a_2(t)[$]

Hermite polynomials take this formula that I have used in the above equations: [$]\frac{\partial H_n(B)}{\partial B}=n H_{n-1}(B)[$] 

Since a derivative [$]\frac{\partial^3 B}{\partial X^3}[$] exists in the derivation, we may have to modify the equation(1) to contain three hermite polynomials. Using the inverse derivatives form all derivatives of the sort [$]\frac{\partial^2 B}{\partial X^2}[$] and [$]\frac{\partial^3 B}{\partial X^3}[$] can be represented by [$]\frac{\partial^2 X}{\partial B^2}[$] and [$]\frac{\partial^3 X}{\partial B^3}[$] after appropriate modifications. see here: https://en.wikipedia.org/wiki/Inverse_functions_and_differentiation
So basically we can force equation(1) or its modified form into the original PDE after elimination of the probability density and then try to find the differential equations for the time dependent coefficients of the hermite polynomials that would solve the PDE in time after making different equations for each hermite polynomial. I will try this and invite friends to try this as well. If you do succeed, please mention on this forum or email me as well. I will try to use this approach myself and continue to share more ideas here.