Stop-Loss and Take-Profit Hit Probabilities in a Symmetric Random Walk
Summary
The document explains how to compare the chances that a stop-loss or take-profit level is reached first when prices follow a one-tick random walk with equal odds of moving up or down. For barriers at distances a and b from the starting price, the probability of hitting the take-profit barrier first is the opposite barrier’s distance divided by the sum of both distances. The stop-loss probability is the complementary share, using the take-profit distance in the numerator.
An R simulation illustrates the result for a stop 10 ticks below entry and a target 20 ticks above: the simulated stop-first frequency is close to the theoretical probability. The argument assumes a fair, unbounded random walk and barriers at fixed distances; it does not model market drift, jumps, transaction costs, or real-world execution. The simulation is illustrative and finite, so its observed frequency need not exactly match the formula.
Key ideas
- In a fair random walk, the chance of reaching one barrier first depends on the distance to the opposite barrier.
- The probability of hitting the stop first is the take-profit distance divided by the combined barrier distances.
- A repeated random-walk simulation can illustrate the theoretical hitting probability.
- The result relies on equal up and down probabilities and fixed exit levels.
Tags
Full text
# Probability of trade's exit orders being triggered in random-walk market
# Probability of trade's exit orders being triggered in random-walk market
When placing a trade with Stop Loss and Take Profit orders in a hypothetical random market (i.e. 0.5 probability of up tick and 0.5 probability of down tick), assuming:
x is the distance in ticks of the SL order from the entry price. y is the distance in ticks of the TP order from the entry price.
How do we calculate the probability of x being triggered first?
## Answer by pat (score 2, accepted)
https://quant.stackexchange.com/a/4767
The answer can be found here under 1.3) Random Walk Hitting Probabilities (when events have equal probability of $\frac{1}{2}$ each).
\begin{equation} p(a) = \frac{b}{a+b} \end{equation}
$p(a)$ would be the probability of take-profit hit first. To look at probability of stop-loss being hit first, just take 1 minus the above, resulting with $a$ on the top (where $a$ is take profit and $b$ is hit stop loss level, respectively).
You can run this script I wrote in R, to verify:
```
tw<-0; d<-function() sample(c(-1,1),size=1)
#x=sl; y=tp
walk<-function(x,y){
for(i in 1:1000){
tw<- sum(tw+d())
if(tw== x || tw==y) break()}
return(tw)}
sl<- -10; tp<- 20
res<-replicate(1000,walk(sl,tp))
resx<-length(res[res==sl])
resy<-length(res[res==tp])
resx/(resx+resy)
```
Result for hitting `x` (stop loss first, where `x= -10`) is
```
resx/(resx+resy) = 0.673716
```
while, `tp/(tp+stop) = 20/(20+10)` gives `0.6666667`, in agreement.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.