= Solution
For the <Brownian first-passage time> to a line, set $\lambda=\theta>0$ and choose $h=b+\sqrt{b^2+2\lambda}>0$, so $h^2/2-bh=\lambda$. The <Exponential martingale for Brownian motion> $M_s=e^{hW_s-h^2s/2}$, stopped at $T_{a,b}$, obeys
$$
0\leq M_{s\wedge T_{a,b}}\leq e^{ha}e^{-\lambda(s\wedge T_{a,b})}.
$$
The <optional stopping theorem> at the bounded time $s\wedge T_{a,b}$ gives expectation one. The contribution from $\{T_{a,b}>s\}$ is at most $e^{ha-\lambda s}$, and tends to zero. Taking $e^{-\lambda\infty}=0$ therefore yields
$$
\boxed{\mathbb E e^{-\theta T_{a,b}}=e^{-a(b+\sqrt{b^2+2\theta})},\qquad b\in\mathbb R.}
$$
Letting $\theta\downarrow0$ shows that the hitting probability is one for $b\leq0$ and $e^{-2ab}$ for $b>0$; in the latter case the hitting-time law has mass at infinity.
To derive the finite-time <linear-boundary Brownian first-passage distribution>, put $Z_s=W_s-bs$. This is <Brownian motion> with drift $\mu=-b$, and the event is $\{\sup_{s\leq t}Z_s\geq a\}$. For driftless <Brownian motion>, the <Brownian reflection principle> says that the joint endpoint density on this event equals the normal density $p_t(x)$ when $x\geq a$ and the reflected density $p_t(2a-x)$ when $x<a$, where $p_t(x)=(2\pi t)^{-1/2}e^{-x^2/(2t)}$. The constant-drift change of measure weights these densities by $e^{\mu x-\mu^2t/2}$. Thus the crossing probability is
$$
\int_a^\infty e^{\mu x-\mu^2t/2}p_t(x)\,dx+\int_{-\infty}^a e^{\mu x-\mu^2t/2}p_t(2a-x)\,dx.
$$
Completing the square gives respectively $\Phi((\mu t-a)/\sqrt t)$ and $e^{2\mu a}\Phi((-\mu t-a)/\sqrt t)$. Substituting $\mu=-b$ proves
$$
\boxed{\mathbb P(T_{a,b}\leq t)=e^{-2ab}\Phi\!\left(\frac{bt-a}{\sqrt t}\right)+1-\Phi\!\left(\frac{a+bt}{\sqrt t}\right).}
$$
The density weighting follows directly from the <Exponential martingale for Brownian motion>, or the <Girsanov theorem>, on the fixed finite horizon; it does not require eventual hitting.
For the <barrier digital call>, under the <risk-neutral measure> in the <Black-Scholes model>,
$$
\log(S_s/S_0)=(\rho-\sigma^2/2)s+\sigma W_s^Q.
$$
Assume $\sigma>0$, put $a=\log(c/S_0)/\sigma>0$ and $b=-(\rho-\sigma^2/2)/\sigma$. The upper stock barrier is reached exactly when $W_s^Q$ reaches $a+bs$. The payment is at the fixed maturity $t_0$, not at the random hitting time. Hence its price is
$$
\boxed{V_0=e^{-\rho t_0}\left[e^{-2ab}\Phi\!\left(\frac{bt_0-a}{\sqrt{t_0}}\right)+1-\Phi\!\left(\frac{a+bt_0}{\sqrt{t_0}}\right)\right].}
$$
If $\sigma=0$, use the deterministic path $S_s=S_0e^{\rho s}$ instead: the value is $e^{-\rho t_0}$ if that path reaches $c$ by $t_0$, and zero otherwise. The nondegenerate formula concerns the usual positive-volatility model.
Back to article page