Markets: A Rigorous Course

4A.6 Stops and targets as barrier problems

Core about 30 min

Motivation

Every swing system (M04 · 4.2) has a stop and many have a target. The questions a trader asks ("How often will this stop be hit? How long will the trade last? Does a 2:1 target improve my system?") have exact answers in the simplest model of prices. The answers are sobering and useful.

4A.6.1Hit probabilities of a bracket#

Setup

Measure P&L per unit from entry: Xt=μt+σWtX_t=\mu t+\sigma W_t, X0=0X_0=0, with tt in trading days and XX in rupees (or, for percentage stops, in log-return units). A bracket has a target at +a+a and a stop at −b-b, a,b>0a,b>0. Let

τ=inf⁡{t≥0:Xt∉(−b,a)},p=P(Xτ=a).\tau=\inf\{t\ge0: X_t\notin(-b,a)\},\qquad p=P(X_\tau=a).

Brownian motion with drift is the model of M02 and M08 for log prices over horizons where the drift is roughly constant. Every result below assumes continuous monitoring; discrete monitoring is treated at the end of the section. τ<∞\tau<\infty almost surely, and indeed Eτ<∞\mathbb E\tau<\infty (a Brownian motion leaves any bounded interval in finite expected time; the formulas below show it).

Proposition 4A.6driftless bracket

If μ=0\mu=0, then p=ba+bp=\dfrac{b}{a+b}.

Proof

Xt=σWtX_t=\sigma W_t is a martingale and ∣Xt∧τ∣≤max⁡(a,b)|X_{t\wedge\tau}|\le\max(a,b). By optional stopping (bounded stopped martingale, τ<∞\tau<\infty a.s.), 0=EXτ=ap−b(1−p)0=\mathbb EX_\tau=ap-b(1-p).∎

This is the continuous version of the gambler's ruin of M03 · 3.6, and it already contains the main lesson: in a driftless market, the hit probability is fixed by the geometry. A target twice as far as the stop is hit one time in three, whatever the chart looked like at entry.

Proposition 4A.7bracket with drift

For μ≠0\mu\ne0 put γ=2μ/σ2\gamma=2\mu/\sigma^2. Then

p=1−eγbe−γa−eγb.(4A.6)p=\frac{1-e^{\gamma b}}{e^{-\gamma a}-e^{\gamma b}}. \tag{4A.6}

As μ→0\mu\to0, p→b/(a+b)p\to b/(a+b). For a symmetric bracket a=ba=b, p=eγb/(1+eγb)p=e^{\gamma b}/(1+e^{\gamma b}).

Proof

Let s(x)=e−γxs(x)=e^{-\gamma x} (the scale function). By Itô's lemma, ds(Xt)=s′(Xt) dXt+12s′′(Xt)σ2dt=s(Xt)(−γμ+12γ2σ2)dt−γs(Xt)σ dWtds(X_t)=s'(X_t)\,dX_t+\tfrac12s''(X_t)\sigma^2dt=s(X_t)\big(-\gamma\mu+\tfrac12\gamma^2\sigma^2\big)dt-\gamma s(X_t)\sigma\,dW_t. The drift term vanishes because 12γ2σ2=γμ\tfrac12\gamma^2\sigma^2=\gamma\mu when γ=2μ/σ2\gamma=2\mu/\sigma^2. So s(Xt∧τ)s(X_{t\wedge\tau}) is a bounded martingale, and optional stopping gives s(0)=p s(a)+(1−p)s(−b)s(0)=p\,s(a)+(1-p)s(-b), i.e. 1=pe−γa+(1−p)eγb1=pe^{-\gamma a}+(1-p)e^{\gamma b}. Solve for pp. For the limit, expand numerator and denominator to first order in γ\gamma: −γb−γa−γb\frac{-\gamma b}{-\gamma a-\gamma b}. For a=ba=b: 1−eγbe−γb−eγb=eγb(eγb−1)(eγb−1)(eγb+1)\frac{1-e^{\gamma b}}{e^{-\gamma b}-e^{\gamma b}}=\frac{e^{\gamma b}(e^{\gamma b}-1)}{(e^{\gamma b}-1)(e^{\gamma b}+1)}.∎

4A.6.2Exit time and expectancy#

Proposition 4A.8expected time to exit

If μ=0\mu=0, Eτ=ab/σ2\mathbb E\tau=ab/\sigma^2. If μ≠0\mu\ne0,

Eτ=ap−b(1−p)μ.(4A.7)\mathbb E\tau=\frac{ap-b(1-p)}{\mu}. \tag{4A.7}
Proof

For μ=0\mu=0: Mt=Xt2−σ2tM_t=X_t^2-\sigma^2t is a martingale. Optional stopping at τ∧n\tau\wedge n gives σ2E[τ∧n]=E[Xτ∧n2]≤max⁡(a,b)2\sigma^2\mathbb E[\tau\wedge n]=\mathbb E[X_{\tau\wedge n}^2]\le\max(a,b)^2, so by monotone convergence Eτ<∞\mathbb E\tau<\infty, and then bounded convergence on the left gives σ2Eτ=EXτ2=a2p+b2(1−p)\sigma^2\mathbb E\tau=\mathbb EX_\tau^2=a^2p+b^2(1-p). With p=b/(a+b)p=b/(a+b) this is a2b+b2aa+b=ab\frac{a^2b+b^2a}{a+b}=ab. For μ≠0\mu\ne0: Xt−μtX_t-\mu t is a martingale; optional stopping at τ∧n\tau\wedge n gives μE[τ∧n]=E[Xτ∧n]∈[−b,a]\mu\mathbb E[\tau\wedge n]=\mathbb E[X_{\tau\wedge n}]\in[-b,a], so E[τ∧n]≤max⁡(a,b)/∣μ∣\mathbb E[\tau\wedge n]\le\max(a,b)/|\mu| and Eτ<∞\mathbb E\tau<\infty by monotone convergence; bounded convergence then gives EXτ=μEτ\mathbb EX_\tau=\mu\mathbb E\tau, and EXτ=ap−b(1−p)\mathbb EX_\tau=ap-b(1-p).∎

Proposition 4A.9exits do not create expectancy

Let τ\tau be any stopping time with Eτ<∞\mathbb E\tau<\infty (a bracket, a trailing stop, a time stop, a discretionary exit that uses only past prices). Then

E[Xτ]=μ E[τ].(4A.8)\mathbb E[X_\tau]=\mu\,\mathbb E[\tau]. \tag{4A.8}

In particular, if μ=0\mu=0 every exit rule has zero expectancy, and the R-multiple expectancy of a bracket with b=1Rb=1R and a=kRa=kR is kp−(1−p)=0kp-(1-p)=0.

Proof

Xt−μt=σWtX_t-\mu t=\sigma W_t is a martingale. For bounded τ\tau, optional stopping gives E[Xτ]=μEτ\mathbb E[X_\tau]=\mu\mathbb E\tau. For general τ\tau with Eτ<∞\mathbb E\tau<\infty, apply it to τ∧n\tau\wedge n and let n→∞n\to\infty: E[Wτ∧n2]=E[τ∧n]≤Eτ\mathbb E[W_{\tau\wedge n}^2]=\mathbb E[\tau\wedge n]\le\mathbb E\tau, so {Wτ∧n}\{W_{\tau\wedge n}\} is bounded in L2L^2, hence uniformly integrable, and EWτ∧n→EWτ\mathbb EW_{\tau\wedge n}\to\mathbb EW_\tau.∎

Read (4A.8) as: expectancy = drift × expected time in the trade. The exit rule chooses the shape of the P&L distribution (win rate, payoff ratio, skew) and the time spent exposed. It cannot change the sign of the expectancy, and it changes the size only through Eτ\mathbb E\tau. A "2:1 reward-to-risk" rule is not an edge; with no drift, it buys a 2:1 payoff with a 1-in-3 win rate.

Worked example 4A.5a swing trade, in rupees

A stock at ₹1,000 with daily volatility 2% (₹20 a day). Stop ₹960 (b=40b=40, so 1R = ₹40 per share), target ₹1,080 (a=80a=80, 2R).

  • No drift: p=40/120=1/3p=40/120=1/3; Eτ=80×40/202=8\mathbb E\tau=80\times40/20^2=8 trading days; expectancy 0.
  • Drift μ=+₹1\mu=+\text{₹}1 a day (0.1% a day, about 25% a year: a strong momentum edge): γ=2/400=0.005\gamma=2/400=0.005, p=(1−e0.2)/(e−0.4−e0.2)=0.4018p=(1-e^{0.2})/(e^{-0.4}-e^{0.2})=0.4018; Eτ=8.21\mathbb E\tau=8.21 days; expectancy μEτ=₹8.21\mu\mathbb E\tau=\text{₹}8.21 per share =0.205R=0.205R.
  • Drift μ=−₹1\mu=-\text{₹}1 a day: p=0.2693p=0.2693; Eτ=7.68\mathbb E\tau=7.68 days; expectancy −₹7.68=−0.192R-\text{₹}7.68=-0.192R.

A large edge moves the win rate of a 2:1 bracket from 33% to 40%. Over the 7–8 days of a typical trade, Indian delivery costs of about 24 bp round trip (M01: ₹237.82 on ₹1 lakh) are ₹2.4 per share here, a third of the expectancy. Win rates in the high 30s with average winners near 2R, the profile of the swing traders in M04 · 4.2.5, are what a real but modest drift looks like through a bracket.

4A.6.3Stop-outs over a horizon#

Proposition 4A.10probability of being stopped out over a horizon

For a stop at −b-b and no target,

P(min⁡t≤TXt≤−b)=Φ ⁣(−b−μTσT)+e−2μb/σ2 Φ ⁣(−b+μTσT).(4A.9)P\Big(\min_{t\le T}X_t\le-b\Big)=\Phi\!\Big(\frac{-b-\mu T}{\sigma\sqrt T}\Big)+e^{-2\mu b/\sigma^2}\,\Phi\!\Big(\frac{-b+\mu T}{\sigma\sqrt T}\Big). \tag{4A.9}

For μ=0\mu=0 this is 2Φ(−b/(σT))2\Phi(-b/(\sigma\sqrt T)). For μ>0\mu>0 and T→∞T\to\infty it tends to e−2μb/σ2<1e^{-2\mu b/\sigma^2}<1; for μ≤0\mu\le0 it tends to 1.

Proof

For μ=0\mu=0 this is the reflection principle. For μ≠0\mu\ne0, change measure with Girsanov's theorem: under Q\mathbb Q with dQ/dP∣FT=exp⁡(−(μ/σ)WT−12(μ/σ)2T)d\mathbb Q/d\mathbb P|_{\mathcal F_T}=\exp(-(\mu/\sigma)W_T-\tfrac12(\mu/\sigma)^2T), X/σX/\sigma is a standard Brownian motion, and the joint density of (min⁡t≤TXt,XT)(\min_{t\le T}X_t, X_T) under Q\mathbb Q follows from reflection. Multiplying by the likelihood ratio exp⁡(μXT/σ2−μ2T/(2σ2))\exp(\mu X_T/\sigma^2-\mu^2T/(2\sigma^2)) and integrating over {min⁡≤−b}\{\min\le-b\} gives (4A.9); the computation is in Karlin and Taylor (1975), ch. 7, and Shreve, Stochastic Calculus for Finance II, 7.2. The limits follow from Φ(±∞)\Phi(\pm\infty).∎

Table 4A.1 (driftless stop-out probabilities) Stop distance in multiples kk of the daily standard deviation, horizon nn trading days; entries 2Φ(−k/n)2\Phi(-k/\sqrt n).

kk \ nn 1 5 10 20 60
0.5 0.617 0.823 0.874 0.911 0.949
1 0.317 0.655 0.752 0.823 0.897
1.5 0.134 0.502 0.635 0.737 0.846
2 0.046 0.371 0.527 0.655 0.796
3 0.003 0.180 0.343 0.502 0.699

A stop one daily standard deviation away is hit within a month (20 days) 82% of the time on pure noise. "My stops keep getting hit" is usually this table, not stop-hunting. The table also shows the trade-off: a tighter stop allows a larger position for the same rupee risk (M03 · 3.9), but buys a much higher probability of being shaken out before the thesis has time to work.

4A.6.4Closing-basis stops#

Discrete monitoring A closing-basis stop (exit if the day closes below the level) or any stop checked on a grid of step Δt\Delta t misses intraday touches. Broadie, Glasserman and Kou ("A continuity correction for discrete barrier options", Mathematical Finance 7(4), 1997, 325–349) showed that a barrier monitored every Δt\Delta t is approximated, to o(Δt)o(\sqrt{\Delta t}), by a continuously monitored barrier moved away from the start by

β σΔt,β=−ζ(1/2)2π≈0.5826.(4A.10)\beta\,\sigma\sqrt{\Delta t},\qquad \beta=-\frac{\zeta(1/2)}{\sqrt{2\pi}}\approx0.5826. \tag{4A.10}

A closing-basis stop with daily volatility σ\sigma therefore behaves like an intraday stop placed 0.58σ0.58\sigma further away. The same constant gives the expected overshoot: a discretely monitored barrier is crossed, on average, about 0.58σΔt0.58\sigma\sqrt{\Delta t} beyond the level. That is the expected gap-through slippage of a closing-basis stop. The code (m04a_barriers) checks the corrected formulas against simulation; with Δt=1/400\Delta t=1/400 the corrected two-barrier probability matches the simulated one within Monte Carlo error.

Practitioner notes

  • Choose the stop where the trade idea is wrong, then set position size from it (M03 · 3.9). Do not choose the stop from the position size you would like.
  • Targets are optional. By (4A.8) a target only shortens Eτ\mathbb E\tau and so cuts expectancy when μ>0\mu>0; its use is to lock in the payoff distribution you want (for example, a fixed 2R to keep variance bounded) and to free capital.
  • Intraday stops on NSE: the pre-open does not accept stop-loss orders (M01 · 1.2), so a stop entered overnight becomes active only in the continuous session, after the open has printed.

Create a free account

Reading is open to everyone. An account keeps your progress, answers, notes and code drafts, and gives you the study plan, the journals and the simulator. Running code needs an account approved for it.