First-Passage Probabilities and Optimal Barriers for Brownian Motion with Drift

Stochastic Processes · Hard · Free problem

Let $X_t = \mu t + W_t$ where $W_t$ is a standard Brownian motion and $\mu$ is a constant drift. Two absorbing barriers sit at $-L < 0$ and $U > 0$. Define $\tau = \inf\{t \geq 0 : X_t \in \{-L, U\}\}$ as the first time the process hits either barrier.

  1. Compute $P(X_\tau = U)$, the probability of hitting the upper barrier before the lower.
  2. Compute $E[\tau]$, the expected time to absorption.
  3. Describe what happens in the limiting cases $\mu \to 0$ and $U, L \to \infty$.
  4. Suppose you can choose a single symmetric barrier $b = U = L > 0$ before trading begins. How should the optimal $b$ change with $|\mu|$ to balance hit probability against expected duration? Discuss the trade-off qualitatively and describe what the optimal $b$ looks like as $|\mu| \to 0$ and $|\mu| \to \infty$.

Hints

  1. Think about what function of $X_t$ kills the drift and produces a martingale -- the exponential family $e^{\lambda X_t}$ is the right place to start. Choose $\lambda$ so the $dt$ terms cancel.
  2. For $E[\tau]$, set up the ODE $\mu u'(x) + \frac{1}{2}u''(x) = -1$ from Dynkin's formula with boundary conditions $u(-L) = u(U) = 0$. The particular solution takes the form $-x/\mu$, and you solve for two constants using the boundary conditions.
  3. For the symmetric barrier, compute the profit rate $b(2p(b) - 1)/E_b[\tau]$ using $2p - 1 = \tanh(\mu b)$ and $E_b[\tau] = (b/\mu)\tanh(\mu b)$. Simplify before you optimize. If the result does not depend on $b$, ask what extra criterion, such as a target win rate or a time budget, would pick a width.

Worked Solution

How to Think About It: Think of $X_t$ as a position that drifts steadily in one direction while also jiggling randomly. You want to know which barrier it touches first and how long that takes. The key tool is the exponential martingale $e^{-2\mu X_t}$ (when $\mu \neq 0$): optional stopping on it pins down the exit probabilities exactly. For the expected duration, the generator gives a clean ODE, and the martingale $X_t - \mu t$ confirms the answer in one line. For the symmetric barrier question, compute the natural objective before assuming it has a maximum: a tight barrier ($b$ small) resolves quickly but pays close to a coin flip, a wide barrier ($b$ large) is reliable but slow, and those two effects turn out to cancel exactly in profit per unit time.

Quick Estimate: Take $\mu = 0.5$, $U = 2$, $L = 1$. With no drift the answer would be $L/(L+U) = 1/3$, since the nearer barrier is the likelier one. Positive drift should lift that well above $1/3$, but not to certainty, because one unit of noise by time 1 makes an early touch of $-L$ quite possible. Using the exit probability formula $P(\text{hit } U) = (1 - e^{2\mu L}) / (e^{-2\mu U} - e^{2\mu L})$ with $\mu = 0.5$, $U = 2$, $L = 1$: numerator $= 1 - e^{1} \approx -1.718$, denominator $= e^{-2} - e^{1} \approx 0.135 - 2.718 = -2.583$, so $P \approx 0.665$. That is about two-thirds, double the driftless value.

Approach: Use two martingales. First, $M_t = e^{-2\mu X_t}$ is a martingale (verify by Ito's lemma), giving the exit probabilities via optional stopping. Second, $u(x) = E_x[\tau]$ solves an ODE from the generator $\mathcal{L} = \mu \partial_x + \frac{1}{2} \partial_{xx}$, and the martingale $X_t - \mu t$ gives an independent check.

Formal Solution:

*Part 1: Exit Probabilities*

When $\mu \neq 0$, apply Ito's lemma to $f(x) = e^{-2\mu x}$: $$df = -2\mu e^{-2\mu X_t} dX_t + \frac{1}{2}(4\mu^{2}) e^{-2\mu X_t} dt = e^{-2\mu X_t}(-2\mu \, dX_t + 2\mu^{2} \, dt)$$

Substituting $dX_t = \mu \, dt + dW_t$: $$df = e^{-2\mu X_t}(-2\mu(\mu \, dt + dW_t) + 2\mu^{2} \, dt) = e^{-2\mu X_t}(-2\mu \, dW_t)$$

So $M_t = e^{-2\mu X_t}$ is indeed a local martingale (and a true martingale on a bounded domain). By optional stopping at $\tau$: $$E[M_0] = E[M_\tau]$$ $$e^{0} = P(\text{hit } U) \cdot e^{-2\mu U} + P(\text{hit } -L) \cdot e^{2\mu L}$$

Let $p = P(X_\tau = U)$. Then $1-p = P(X_\tau = -L)$, so: $$1 = p \, e^{-2\mu U} + (1-p) e^{2\mu L}$$ $$\boxed{p = \frac{1 - e^{2\mu L}}{e^{-2\mu U} - e^{2\mu L}}}$$

When $\mu > 0$, the numerator is negative and the denominator is negative (since $e^{-2\mu U} < 1 < e^{2\mu L}$), so $p > 0$ as expected. Multiplying top and bottom by $-e^{-2\mu L}$ gives the equivalent form $p = (1 - e^{-2\mu L})/(1 - e^{-2\mu(L+U)})$, which is the easiest one for taking limits. Drift raises $p$ above the driftless value $L/(L+U)$, though $p$ can still be small if $L$ is much smaller than $U$. When $\mu < 0$, drift pulls toward $-L$ and $p < 1/2$ for symmetric barriers.

*Part 2: Expected Hitting Time*

Let $u(x) = E_x[\tau]$ where $E_x$ means starting from $x \in (-L, U)$. By Dynkin's formula for the generator $\mathcal{L} = \mu \partial_x + \frac{1}{2} \partial_{xx}$, $u$ satisfies the ODE: $$\mu u'(x) + \frac{1}{2} u''(x) = -1, \quad u(-L) = u(U) = 0$$

The homogeneous solution is $C_1 + C_2 e^{-2\mu x}$. A particular solution: try $u_p = ax$. Then $\mu a = -1$, so $a = -1/\mu$. Thus: $$u(x) = C_1 + C_2 e^{-2\mu x} - \frac{x}{\mu}$$

Apply boundary conditions $u(-L) = 0$ and $u(U) = 0$: $$C_1 + C_2 e^{2\mu L} + \frac{L}{\mu} = 0$$ $$C_1 + C_2 e^{-2\mu U} - \frac{U}{\mu} = 0$$

Subtracting the second from the first: $$C_2(e^{2\mu L} - e^{-2\mu U}) = -\frac{L+U}{\mu}$$ $$C_2 = \frac{-(L+U)/\mu}{e^{2\mu L} - e^{-2\mu U}}$$

And $C_1 = \frac{U}{\mu} - C_2 e^{-2\mu U}$. The expected duration starting from $x = 0$ is: $$E[\tau] = u(0) = C_1 + C_2$$

Substituting and simplifying: $$\boxed{E[\tau] = \frac{1}{\mu}\left[U \cdot \frac{e^{2\mu L} - 1}{e^{2\mu L} - e^{-2\mu U}} - L \cdot \frac{1 - e^{-2\mu U}}{e^{2\mu L} - e^{-2\mu U}}\right]}$$

*Check by Wald's identity.* $X_t - \mu t = W_t$ is a martingale, so $E[X_\tau] = \mu E[\tau]$. Since $X_\tau$ equals $U$ with probability $p$ and $-L$ with probability $1-p$, $$E[\tau] = \frac{pU - (1-p)L}{\mu},$$ which is the boxed formula, because $p = \frac{e^{2\mu L} - 1}{e^{2\mu L} - e^{-2\mu U}}$ and $1 - p = \frac{1 - e^{-2\mu U}}{e^{2\mu L} - e^{-2\mu U}}$. At $\mu = 0.5$, $U = 2$, $L = 1$ this gives $E[\tau] \approx 1.99$.

*Part 3: Limiting Cases*

Case $\mu \to 0$: Apply L'Hopital's rule (or Taylor-expand the exponentials) to recover the pure BM results: $$p \to \frac{L}{L+U}, \quad E[\tau] \to LU$$

This is the standard gambler's ruin for Brownian motion: you hit $U$ with probability $L/(L+U)$ and the expected time is $LU$. Both are purely geometric.

Case barriers to infinity with $\mu > 0$: The answer depends on which barriers move, so use $p = (1 - e^{-2\mu L})/(1 - e^{-2\mu(L+U)})$ and $E[\tau] = (pU - (1-p)L)/\mu$.

  • $L$ fixed, $U \to \infty$: $p \to 1 - e^{-2\mu L} < 1$. The lower barrier stays within reach of the noise: $e^{-2\mu L}$ is the probability that the process ever touches $-L$, so the upper barrier can only be reached on the paths that never do. For $\mu = 0.5$, $L = 1$ the limit is $1 - e^{-1} \approx 0.632$, not $1$. The duration grows like $E[\tau] \sim (1 - e^{-2\mu L})\,U/\mu$, because only those escaping paths take the long walk up.
  • $U$ fixed, $L \to \infty$: $p \to 1$ and $E[\tau] \to U/\mu$.
  • Both $U, L \to \infty$: $p \to 1$ and $E[\tau] \sim U/\mu$, the time to walk up to $U$ at drift rate $\mu$.

For $\mu < 0$ the picture mirrors: with both barriers out, $p \to 0$ and $E[\tau] \sim L/|\mu|$; with $U$ fixed and $L \to \infty$, $p \to e^{2\mu U} < 1$.

*Part 4: Choosing a Symmetric Barrier*

Treat the barrier the drift favors as the take-profit; by symmetry take $\mu > 0$ (for $\mu < 0$ mirror the process and read $|\mu|$ for $\mu$). With $U = L = b$ the formulas simplify to $$p(b) = \frac{1}{1 + e^{-2\mu b}}, \quad 2p(b) - 1 = \tanh(\mu b), \quad E_b[\tau] = \frac{b}{\mu}\tanh(\mu b).$$

So $p$ rises from $1/2$ toward $1$ as $b$ grows, while $E_b[\tau]$ rises from about $b^{2}$ for small $b$ to about $b/\mu$ for large $b$. That is the trade-off: reliability against speed.

Now test the natural objective. If hitting $+b$ pays $+b$ and hitting $-b$ pays $-b$, the expected profit per unit time is $$\frac{b(2p(b) - 1)}{E_b[\tau]} = \frac{b\tanh(\mu b)}{(b/\mu)\tanh(\mu b)} = \mu \quad \text{for every } b > 0.$$

The objective is flat. It does not go to $0$ as $b \to 0$: the numerator is about $\mu b^{2}$ and the denominator about $b^{2}$, so the ratio stays at $\mu$. There is no interior maximum, so no optimal width follows from this objective.

This is not special to the symmetric case. For any stopping rule with $E[\tau] < \infty$, the martingale $X_t - \mu t$ gives $E[X_\tau] = \mu E[\tau]$. Closing and re-entering at each barrier is the same as holding the position throughout, so you earn $\mu$ per unit time at any width. Risk does not separate widths either: $E[(X_\tau - \mu\tau)^{2}] = E[W_\tau^{2}] = E[\tau]$, so the long-run variance per unit time is $1$ and the Sharpe ratio is $\mu$ at every $b$. A fixed cost $c$ per round trip does not create an interior optimum: the rate becomes $\mu - c/E_b[\tau]$, which increases with $b$, so the widest barrier wins.

Selecting a width therefore needs an extra criterion, and the choice of criterion decides the answer. Two natural ones scale in opposite directions:

  • Target win rate $p_0 > 1/2$. Since $p$ depends only on $|\mu| b$, you need $b = \dfrac{\ln(p_0/(1-p_0))}{2|\mu|}$, and the wait is $E_b[\tau] = \dfrac{(2p_0 - 1)\ln(p_0/(1-p_0))}{2\mu^{2}}$. As $|\mu| \to 0$, $b \to \infty$ like $1/|\mu|$ and the wait grows like $1/\mu^{2}$: a weak signal needs a wide barrier and a long wait. As $|\mu| \to \infty$, $b \to 0$: a sliver of a barrier already pays reliably.
  • Holding-time budget $E_b[\tau] = T$. Solve $b\tanh(|\mu| b)/|\mu| = T$. As $|\mu| \to 0$, $b \to \sqrt{T}$, the pure diffusion scale. As $|\mu| \to \infty$, $b \approx |\mu| T$, the distance the drift covers in time $T$: here a stronger signal means a wider barrier.

So there is no single optimal $b(|\mu|)$. A fixed reliability target says tighten as the drift grows, and a fixed time budget says widen. A good answer states the criterion first.

Answer:

  • $P(X_\tau = U) = \dfrac{1 - e^{2\mu L}}{e^{-2\mu U} - e^{2\mu L}}$
  • $E[\tau] = \dfrac{1}{\mu}\left[U \cdot \dfrac{e^{2\mu L} - 1}{e^{2\mu L} - e^{-2\mu U}} - L \cdot \dfrac{1 - e^{-2\mu U}}{e^{2\mu L} - e^{-2\mu U}}\right]$
  • As $\mu \to 0$: $P(\text{hit } U) \to L/(L+U)$, $E[\tau] \to LU$ (gambler's ruin).
  • With $\mu > 0$ and $L$ fixed, $U \to \infty$ gives $P(\text{hit } U) \to 1 - e^{-2\mu L} < 1$ (about $0.632$ at $\mu = 0.5$, $L = 1$). Sending $L \to \infty$ as well (both barriers out) gives $P(\text{hit } U) \to 1$, with $E[\tau] \sim U/\mu$.
  • Symmetric barrier: $p(b) = 1/(1 + e^{-2\mu b})$ and $E_b[\tau] = (b/\mu)\tanh(\mu b)$, so profit per unit time $b(2p - 1)/E_b[\tau] = \mu$ for every $b > 0$ and does not select a width. An extra criterion is needed: a fixed win rate $p_0$ gives $b = \ln(p_0/(1-p_0))/(2|\mu|)$, wide as $|\mu| \to 0$ and tight as $|\mu| \to \infty$; a holding-time budget $T$ gives $b \to \sqrt{T}$ as $|\mu| \to 0$ and $b \approx |\mu| T$ as $|\mu| \to \infty$.

Intuition

The exponential martingale trick -- turning a drifted process into a martingale by composing it with $x \mapsto e^{-2\mu x}$ -- is a specific instance of a much broader idea: the Girsanov change of measure. When you apply optional stopping to $e^{-2\mu X_t}$, you are essentially computing how much the drift tilts the exit probabilities away from the purely diffusive case. The $\mu \to 0$ limit ($p \to L/(L+U)$) is the gambler's ruin result for pure BM -- a beautiful sanity check, because the exit probability for pure BM is linear in starting position.

The symmetric barrier question is a stylized version of a real trading decision: how wide should your take-profit and stop-loss be? For pure drift plus noise, the surprise is that barriers cannot create edge. Optional stopping gives $E[X_\tau] = \mu E[\tau]$, so expected profit per unit time is $\mu$ at any width. What the width does change is the shape of the outcomes: win rate, payoff size and holding time. Fixing a win rate needs a width proportional to $1/|\mu|$, so a weak signal means wide, slow barriers, while a fixed holding-time budget pushes the other way. In practice the reasons to prefer one width come from outside this model, such as costs, capital limits, or a drift that changes over time.

Open the full interactive solver →