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.

Statistics: Posted by Amin — 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.

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

Statistics: Posted by Amin — February 15th, 2017, 12:54 pm

]]>

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.

Statistics: Posted by Amin — February 15th, 2017, 12:47 pm

]]>

[$]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.

Statistics: Posted by Amin — February 13th, 2017, 1:53 pm

]]>

Simulation is the most direct way to find out. I really appreciate your suggestions on what to test for. I was wondering if there is any theoretical conclusion and guidance. The reference you provided is just the kind I am looking for.

Statistics: Posted by lovenatalya — February 10th, 2017, 7:20 pm

]]>

downloadable:

https://faculty.wharton.upenn.edu/wp-content/uploads/2012/04/Filtering-and-forecasting.pdf

Nelson's papers can be difficult.

I suggest you just simulate the Heston process (thousands of times), each time making your estimates, and calculate the sampling distributions of whatever statistics you are interested in. What is the error distribution of the daily estimates? How do the errors depend on the true parameters of the model? How well is the long-run distribution of [$]V_t[$] estimated? the mean-reversion rate? The latter is particularly difficult to estimate accurately -- even with a proper maximum likelihood estimator.

Statistics: Posted by Alan — February 10th, 2017, 3:09 pm

]]>

where $(a,b)$ is positive satisfying [$]a+b=1[$]. What is the accuracy, in terms of distribution or some statistical attributes, of this estimate? Are there any references for this problem?

Statistics: Posted by lovenatalya — February 9th, 2017, 5:51 pm

]]>

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.

Statistics: Posted by Amin — February 9th, 2017, 2:50 pm

]]>

Does anyone know where I can source something like this?

Thanks for the help

Statistics: Posted by stas — February 8th, 2017, 11:44 am

]]>

For example, suppose we have a 3M DKO call on USDJPY traded today (7 Feb 2017) struck at 112.01, with barriers at 118.02 and 106.78. Expiration and delivery dates are, respectively, 5 and 9 May. Let the deposit rate on JPY be -0.75, vol be 14% and forward be 112.01 and spot at 113.

This translates to r at -0.0077862, t at 0.238356164, and q at 0.02913194. The value I get from formulae (eg Haug pages 156-7) is 0.26221727, whereas Bloomberg implied a value of 0.259882. However, if I now set spot to be the same as forward at 112.01, so that r=q=-0.0077862, the formulae and Bloomberg are now in agreement at 0.2822787.

Am wondering if anyone have came across this situation before? Is there something that I missed or overlooked?

Thanks very much for your time and help on this.

Statistics: Posted by quanteric — February 7th, 2017, 10:07 am

]]>

Do the Black-Scholes PDE with call payoff.

Statistics: Posted by Paul — February 6th, 2017, 2:35 pm

]]>

In software projects, this is what I would call gold plating == nice to have == non-essential complexity == window dressing == foam.

In mathematics, the essential difficulty can be shown by BS PDE. As you agreed with Paul, that was the first test case.

By all means FPE is a worthy successor to BSE.

Statistics: Posted by Cuchulainn — February 6th, 2017, 2:20 pm

]]>

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.

Statistics: Posted by Amin — February 6th, 2017, 1:46 pm

]]>

]]>

Statistics: Posted by BerndSchmitz — February 6th, 2017, 8:19 am

]]>