2
$\begingroup$

I am trying to find the cdf of a diffusion process with drift at a given time. Specifically I want to find:

$$ p(x

Where $x,X,z,t>0$. I haven't done calculus in a long time but I found:

$$ p(x,t) = \frac{1}{\sqrt{2\pi \sigma^{2}t}} \left( exp^{\frac{(x-z-\mu t)^2}{2\sigma^2 t}} - exp^{-\frac{(x-z-\mu t)^2+4xz}{2\sigma^2 t}} \right) = \frac{1}{\sqrt{2\pi \sigma^{2}t}} \left( exp^{-\frac{(x-z-\mu t)^2}{2\sigma^2 t}} - exp^{-\frac{-2z\mu}{\sigma^2}}exp^{-\frac{(x+z-\mu t)^2}{2\sigma^2 t}} \right) $$

This is the part where I am less sure of what I have done. Substituting $u^2= \frac{(x-z-\mu t)^2}{2\sigma^2 t}$ and $v^2= \frac{(x+z-\mu t)^2}{2\sigma^2 t}$:

$$p(x

I checked numerically integrating $p(x,t)$ and comparing it to the analytical solution I found and it seems very close but there are some systematic differences between the 2. I don't know if it comes from errors in the numerical integration or a mistake in my equation. I would greatly appreciate if someone could check the equation and tell me if I made a mistake. Also, I was able to find the integral of $p(x,t)$ across x (instead of t) in books and it is:

$$S(t) = \Phi\left(+\frac{z}{\sqrt{\sigma^2 t}}\left(\frac{\mu t}{z}-1\right)\right) + exp^{\frac{2\mu z}{\sigma^2}}\Phi\left(-\frac{z}{\sqrt{\sigma^2 t}}\left(\frac{\mu t}{z}+1\right)\right) $$

Which seems somewhat similar. Is there a way to simplify the 4 erf functions in my equation in only 2 like in the equation above? I haven't been able to figure that out. Thanks.

0 Answers 0