Dear friends, I was trying to think how to derive the proper equations for the evolution of density in Ito-hermite method. I was able to find some other interesting equations that I decided to share here with friends.
Before I write the main equations, I want to mention that this idea is based on equivalence between two densities. I take one density that is standard normal called Z (could also be taken as brownian motion) and then I try to find the evolution of a particular point on the density of SDE variable X(t,Z) and this particular point is related to a specific fixed value of Z which is already known. Z is a static density that does not change with time at all.
I will write a few equations first that we will use later in the main derivation. Here are the equations
[img]/User%20Files/850/Latex-Equation-14591.gif[/img] Follows from change of variable formula for densities.
[img]/User%20Files/850/Latex-Equation-14592.gif[/img]
[img]/User%20Files/850/Latex-Equation-14593.gif[/img]
[img]/User%20Files/850/Latex-Equation-14594.gif[/img]
[img]/User%20Files/850/Latex-Equation-14595.gif[/img] where f(X,t) is the fokker planck equation.(sorry for missing index t in latex)
Now we come towards the main equation derivation(which might as well possibly be wrong)
Since standard normal is a static density and it does not change with time, we can write
[img]/User%20Files/850/Latex-Equation-14596.gif[/img]
since we can write densities in terms of each other using change of variable formula, we can write
[img]/User%20Files/850/Latex-Equation-14597.gif[/img]
taking the derivatives, we can expand the above equation as
[img]/User%20Files/850/Latex-Equation-14598.gif[/img]
[img]/User%20Files/850/Latex-Equation-14599.gif[/img]
using
[img]/User%20Files/850/Latex-Equation-14600.gif[/img]
[img]/User%20Files/850/Latex-Equation-14601.gif[/img]
in the above equation ,we get
[img]/User%20Files/850/Latex-Equation-14603.gif[/img]
where[img]/User%20Files/850/Latex-Equation-14604.gif[/img] is the fokker planck equation for the related SDE.
We can use the change of variable formula in fokker-planck again to get rid of the densities and get an evolution equation solely in terms of Z and SDE variable X(Z,t). Suppose the structure of fokker planck is given as
[img]/User%20Files/850/Latex-Equation-14605.gif[/img]
when we have a(X,t)=0 we can eliminate the densities from the equation by converting p(X,t) into p(Z) and cancelling the p(Z) in the equation. using the following formulas, we get
[img]/User%20Files/850/Latex-Equation-14606.gif[/img] This follows from the standard change of variables in a density.
[img]/User%20Files/850/Latex-Equation-14607.gif[/img]
[img]/User%20Files/850/Latex-Equation-14608.gif[/img]
[img]/User%20Files/850/Latex-Equation-14609.gif[/img]
[img]/User%20Files/850/Latex-Equation-14610.gif[/img]
[img]/User%20Files/850/Latex-Equation-14611.gif[/img]
putting the above value of fokker planck in the first equation and cancelling p(Z) we get
[img]/User%20Files/850/Latex-Equation-14612.gif[/img]
Please be careful with signs as I might have missed some absolute in change of probability derivatives.
In order to work out a proper evolution equation, We can take the value of Z and its derivatives [img]/User%20Files/850/Latex-Equation-14613.gif[/img] and [img]/User%20Files/850/Latex-Equation-14614.gif[/img] and [img]/User%20Files/850/Latex-Equation-14615.gif[/img] as constant at start of the time step and expand the integrals of the kind like[img]/User%20Files/850/Latex-Equation-14616.gif[/img], [img]/User%20Files/850/Latex-Equation-14617.gif[/img] and [img]/User%20Files/850/Latex-Equation-14618.gif[/img] for a particular value of Z related to each grid point using stochastics just like we did for monte carlo simulations and then form a valid evolution equation. In the above integrals H_n(Z) is a standard normal hermite polynomial of nth degree.
These are very basic thoughts that I just worked out quickly and there is also some possibility that we might have to use the equivalence relation with brownian motion density instead of standard normal density but if required doing the same exercise on brownian motion should also be straightforward.
For more information about the analytics and other background, you can see my other thread here::https://lnkd.in/dYq_u-n
and please feel free to ask me any questions.
Derivation of Equations For Analytical Solution of Fokker-Planck Equations
- amin
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
- amin
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
Derivation of Equations For Analytical Solution of Fokker-Planck Equations
Dear friends, the method proposed in previous post to solve for the densities of SDEs by doing a change of variable with static density of standard normal will work for other SDEs only if it works for the simplest SDE which is that of brownian motion. And doing it for brownian motion SDE will give us insights about how to solve more complicated SDEs since mathematics there can become very tedious and knowing basic principles towards solution of brownian motion SDE will be very helpful. Therefore I tried to solve the brownian motion SDE with this method and it does work. Here are the details.
In what follows, we use the notation B(t) for standard brownian motion and Z for standard normal.
The fokker planck equation for Brownian motion is given as
[img]/User%20Files/850/Latex-Equation-14619.gif[/img]Equation(1)
and we apply time derivative on static standard normal density as
[img]/User%20Files/850/Latex-Equation-14620.gif[/img] Equation(2)
Changing to standard brownian motion density inside the brackets by application of change of variable formula
[img]/User%20Files/850/Latex-Equation-14621.gif[/img] Equation(3)
applying the time derivative to equation (3), we get the equation
[img]/User%20Files/850/Latex-Equation-14622.gif[/img]
[img]/User%20Files/850/Latex-Equation-14623.gif[/img] Equation(4)
I have removed absolute signs since the derivative between brownian motion and standard normal will be positive.
We put the expression for standard brownian fokker-planck equation from equation(1) to above equation (4)
[img]/User%20Files/850/Latex-Equation-14624.gif[/img]
[img]/User%20Files/850/Latex-Equation-14625.gif[/img] Equation(5)
now we want to convert the derivatives [img]/User%20Files/850/Latex-Equation-14626.gif[/img], [img]/User%20Files/850/Latex-Equation-14627.gif[/img] and P(B,t) again to standard normal density so that we can cancel the densities from our equation.
We use the following equations
[img]/User%20Files/850/Latex-Equation-14628.gif[/img]
[img]/User%20Files/850/Latex-Equation-14629.gif[/img]
[img]/User%20Files/850/Latex-Equation-14630.gif[/img]
[img]/User%20Files/850/Latex-Equation-14631.gif[/img]
[img]/User%20Files/850/Latex-Equation-14632.gif[/img]
where I have used
[img]/User%20Files/850/Latex-Equation-14633.gif[/img] and
[img]/User%20Files/850/Latex-Equation-14634.gif[/img] which are derivatives of standard normal density.
After applying the above formulas in previous equation(5) and cancelling P(Z) that is common throughout, we get
[img]/User%20Files/850/Latex-Equation-14635.gif[/img]
[img]/User%20Files/850/Latex-Equation-14636.gif[/img]
[img]/User%20Files/850/Latex-Equation-14637.gif[/img] Equation(6)
For general solution of SDEs, we will have to find out the derivatives like [img]/User%20Files/850/Latex-Equation-14638.gif[/img] and [img]/User%20Files/850/Latex-Equation-14639.gif[/img] and the third derivative using finite differences or some other analytic procedure. But in case of brownian motion, we know these derivatives and apply them in the above equation
[img]/User%20Files/850/Latex-Equation-14640.gif[/img]
[img]/User%20Files/850/Latex-Equation-14641.gif[/img]
[img]/User%20Files/850/Latex-Equation-14642.gif[/img]
and now our above equation (6) becomes
[img]/User%20Files/850/Latex-Equation-14643.gif[/img]Equation(7)
But [img]/User%20Files/850/Latex-Equation-14644.gif[/img] and [img]/User%20Files/850/Latex-Equation-14645.gif[/img]
So we get from Equation(7)
[img]/User%20Files/850/Latex-Equation-14646.gif[/img]
[img]/User%20Files/850/Latex-Equation-14647.gif[/img]
taking dt to the other side of the equation(i.e multiply by dt.), we get
[img]/User%20Files/850/Latex-Equation-14648.gif[/img]
or
[img]/User%20Files/850/Latex-Equation-14649.gif[/img]
The expression on the left can be solved(by integration on both sides) to get
[img]/User%20Files/850/Latex-Equation-14651.gif[/img] or in general
[img]/User%20Files/850/Latex-Equation-14652.gif[/img] Equation(8)
Of course we will have to take care of signs on Z when taking root on the above formula.
So we can solve for Brownian motion with this method and the good thing is that we learnt that we will have to do some mathematical manipulation of the equations to solve the general SDE and turn the solution expression into squared form and this seems to be very helpful that we know in advance that complicated SDEs will also have to be solved for squared expressions.
In what follows, we use the notation B(t) for standard brownian motion and Z for standard normal.
The fokker planck equation for Brownian motion is given as
[img]/User%20Files/850/Latex-Equation-14619.gif[/img]Equation(1)
and we apply time derivative on static standard normal density as
[img]/User%20Files/850/Latex-Equation-14620.gif[/img] Equation(2)
Changing to standard brownian motion density inside the brackets by application of change of variable formula
[img]/User%20Files/850/Latex-Equation-14621.gif[/img] Equation(3)
applying the time derivative to equation (3), we get the equation
[img]/User%20Files/850/Latex-Equation-14622.gif[/img]
[img]/User%20Files/850/Latex-Equation-14623.gif[/img] Equation(4)
I have removed absolute signs since the derivative between brownian motion and standard normal will be positive.
We put the expression for standard brownian fokker-planck equation from equation(1) to above equation (4)
[img]/User%20Files/850/Latex-Equation-14624.gif[/img]
[img]/User%20Files/850/Latex-Equation-14625.gif[/img] Equation(5)
now we want to convert the derivatives [img]/User%20Files/850/Latex-Equation-14626.gif[/img], [img]/User%20Files/850/Latex-Equation-14627.gif[/img] and P(B,t) again to standard normal density so that we can cancel the densities from our equation.
We use the following equations
[img]/User%20Files/850/Latex-Equation-14628.gif[/img]
[img]/User%20Files/850/Latex-Equation-14629.gif[/img]
[img]/User%20Files/850/Latex-Equation-14630.gif[/img]
[img]/User%20Files/850/Latex-Equation-14631.gif[/img]
[img]/User%20Files/850/Latex-Equation-14632.gif[/img]
where I have used
[img]/User%20Files/850/Latex-Equation-14633.gif[/img] and
[img]/User%20Files/850/Latex-Equation-14634.gif[/img] which are derivatives of standard normal density.
After applying the above formulas in previous equation(5) and cancelling P(Z) that is common throughout, we get
[img]/User%20Files/850/Latex-Equation-14635.gif[/img]
[img]/User%20Files/850/Latex-Equation-14636.gif[/img]
[img]/User%20Files/850/Latex-Equation-14637.gif[/img] Equation(6)
For general solution of SDEs, we will have to find out the derivatives like [img]/User%20Files/850/Latex-Equation-14638.gif[/img] and [img]/User%20Files/850/Latex-Equation-14639.gif[/img] and the third derivative using finite differences or some other analytic procedure. But in case of brownian motion, we know these derivatives and apply them in the above equation
[img]/User%20Files/850/Latex-Equation-14640.gif[/img]
[img]/User%20Files/850/Latex-Equation-14641.gif[/img]
[img]/User%20Files/850/Latex-Equation-14642.gif[/img]
and now our above equation (6) becomes
[img]/User%20Files/850/Latex-Equation-14643.gif[/img]Equation(7)
But [img]/User%20Files/850/Latex-Equation-14644.gif[/img] and [img]/User%20Files/850/Latex-Equation-14645.gif[/img]
So we get from Equation(7)
[img]/User%20Files/850/Latex-Equation-14646.gif[/img]
[img]/User%20Files/850/Latex-Equation-14647.gif[/img]
taking dt to the other side of the equation(i.e multiply by dt.), we get
[img]/User%20Files/850/Latex-Equation-14648.gif[/img]
or
[img]/User%20Files/850/Latex-Equation-14649.gif[/img]
The expression on the left can be solved(by integration on both sides) to get
[img]/User%20Files/850/Latex-Equation-14651.gif[/img] or in general
[img]/User%20Files/850/Latex-Equation-14652.gif[/img] Equation(8)
Of course we will have to take care of signs on Z when taking root on the above formula.
So we can solve for Brownian motion with this method and the good thing is that we learnt that we will have to do some mathematical manipulation of the equations to solve the general SDE and turn the solution expression into squared form and this seems to be very helpful that we know in advance that complicated SDEs will also have to be solved for squared expressions.
- pj
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
Derivation of Equations For Analytical Solution of Fokker-Planck Equations
Hi, Amin,
So the square of Brownian motion is just a normal variable times t[img]/User%20Files/126/Latex-Equation-14653.gif[/img]?
Thus with deterministic increments?
Scared
So the square of Brownian motion is just a normal variable times t[img]/User%20Files/126/Latex-Equation-14653.gif[/img]?
Thus with deterministic increments?
Scared
«Да чего там описывать, планировать! Жизнь всё равно богаче». (Саня Радченко about specification writing)
- amin
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
Derivation of Equations For Analytical Solution of Fokker-Planck Equations
Thank for the question Paulius. This is not valid in traditional framework of monte carlo simulations. This technique is for simulating the densities of Stochastic differential equations. In this density simulation framework, the whole SDE grid is mapped on standard normal random variable with each point on the grid corresponding to a particular value of normal ranging from -5 to +5. A typical grid can have an equidistant Z-spacing of .2 (starting from -.5 up to +.5) And the whole grid moves and expands(and sometimes possibly contracts) as a function of underlying Z which is the standard normal variable. As time advances, any point on the grid continues to take the same value of Z that is associated with the same grid point. This is not a typical simulation but it is for the deterministic calculation of the density that is why it is derived from fokker-planck equation which is known to represent the densities of SDEs.
By the way it is [img]/User%20Files/850/Latex-Equation-14654.gif[/img]
Normal random variable appears in a squared form. For more details, you will have to look at the other math-finance forum where I have been posting regularly in more detail. The link to my thread on other forum is given in the first post.
By the way it is [img]/User%20Files/850/Latex-Equation-14654.gif[/img]
Normal random variable appears in a squared form. For more details, you will have to look at the other math-finance forum where I have been posting regularly in more detail. The link to my thread on other forum is given in the first post.
- amin
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
Derivation of Equations For Analytical Solution of Fokker-Planck Equations
Download Matlab Code for Semi-Analytical Solution of Fokker-Planck Equation -- New Research
Here you can download the code for analytical solution of Fokker-planck equation that you can use for solution of densities of Stochastic Differential Equations with multiple drift and volatility terms.
Please download the code at post 971 here
https://lnkd.in/eJ5r3ET
Here in post 970 you can view fifteen overlaid graphs that show how our solution is faithfully close to true solution for a large number of difficult scenarios of mean-reverting SDEs
https://lnkd.in/eyYW7dC
With this new method you can easily simulate SDEs with three or four drift terms for advanced calibration to stochastic volatility models. You can also handle bi-modal densities.
Here you can download the code for analytical solution of Fokker-planck equation that you can use for solution of densities of Stochastic Differential Equations with multiple drift and volatility terms.
Please download the code at post 971 here
https://lnkd.in/eJ5r3ET
Here in post 970 you can view fifteen overlaid graphs that show how our solution is faithfully close to true solution for a large number of difficult scenarios of mean-reverting SDEs
https://lnkd.in/eyYW7dC
With this new method you can easily simulate SDEs with three or four drift terms for advanced calibration to stochastic volatility models. You can also handle bi-modal densities.
- amin
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
Derivation of Equations For Analytical Solution of Fokker-Planck Equations
Download Improved Much Faster Matlab Code for Semi-Analytical Solution of Fokker-Planck Equation
I am releasing a new much faster and improved version of the code for semi-analytic solution program for FPE. I have removed any matlab specific function (spline interpolation) and there is only ultra-fast lagrange polynomial interpolation. You can easily code it in any language.
Here in post 983 you can download the new improved code for densities of SDEs with multiple drift terms.
https://lnkd.in/ebtMQiA
With this new method you can easily simulate SDEs with three or four drift terms for advanced calibration to stochastic volatility models and handle bi-modal densities. If you need any help with advanced analytics and stochastic volatility solutions, please mention here or drop me a message on my linkedin.
I am releasing a new much faster and improved version of the code for semi-analytic solution program for FPE. I have removed any matlab specific function (spline interpolation) and there is only ultra-fast lagrange polynomial interpolation. You can easily code it in any language.
Here in post 983 you can download the new improved code for densities of SDEs with multiple drift terms.
https://lnkd.in/ebtMQiA
With this new method you can easily simulate SDEs with three or four drift terms for advanced calibration to stochastic volatility models and handle bi-modal densities. If you need any help with advanced analytics and stochastic volatility solutions, please mention here or drop me a message on my linkedin.