double barrier stopping time density function
We define a Brownian motion $W$, and two stopping times as follow :
$$\tau_a=\inf(t \ge 0 | W_t>a)$$ $$\tau_b=\inf(t \ge 0 | W_t<-b)$$
where $a,b >0$
We can define another stopping time as follow $$\tau=\min(\tau_a,\tau_b)$$
While the density functions of $\tau_a$ and $\tau_b$ are known (by using the Brownian motion reflection principal), how about $\tau$ ?
Solution 1:
This is best done by first solving for $u(x,t)=\mathbb{P}_x[\tau>t]$ where $\mathbb{P}_x$ means the probability measure if start at $x$ at time $0$. One can show (or read in a book) that $u$ solves the PDE $\frac{1}{2}\frac{d^2}{dx^2}u=\frac{d}{dt}u$ (in general $Lu=\frac{d}{dt}u$ for a process with generator $L$). The boundary conditions are easier to see, $u(0,x)=1$ for all $x\in(a,b)$ and $u(a,t)=u(b,t)=0$ for $t>0$. The solution can be given as the Fourier series $u(x,t)=\sum_{n=1}^\infty\frac{2}{n\pi}(1-(-1)^n)\sin\left(\frac{n\pi(x-a)}{b-a}\right)e^{-\frac{n^2\pi^2t}{2(b-a)^2}}$. Then your density is $-\frac{d}{dt}u(x,t)=\sum_{n=1}^\infty\frac{n\pi}{(b-a)^2}(1-(-1)^n)\sin\left(\frac{n\pi(x-a)}{b-a}\right)e^{-\frac{n^2\pi^2t}{2(b-a)^2}}$. You can't do much better than this but it could be useful for simulations.