6
$\begingroup$

How to calculate probability of touching a take-profit without touching a stop-loss (no-dividend stock, infinite time)?

$\endgroup$
2
  • $\begingroup$ Um, simple stock price movements are totally random, at least for the question here. Also, please take a look at some of the other posts on this site for how questions are worded and formatted. $\endgroup$ Oct 5, 2012 at 21:08
  • $\begingroup$ There is an article on forexop where maximal curves and a random walk are used to calculate the different probabilities hitting the stop loss, the take profit or being still open. There is also an excel file to download, where the formulas can be found. $\endgroup$ Jun 25, 2016 at 18:07

4 Answers 4

7
$\begingroup$

a) you can run a Monte Carlo simulation in which you model stock price movements and then you can look at the future pay off as a function of path dependency into which you incorporate your stop losses and take profits. Done this over many iterations you will be able to derive your probabilities. Caveat here is your result will be strongly dependent on your model assumption of how you derive stock price movements.

b) you could run back tests over actual pricing data. You generate trading signals, associated stops and take-profit targets and you derive your probabilities through simple counting processes of how often your stop loss was hit vs take profit targets.

I would strongly prefer the latter approach, this is by the way a very common way to also calculate the quality of entry and exit signals (not using stop loss and target levels but by keeping track of how prices performed after the entry/after the exit).

P.S. I find the question correctly worded and I think it actually makes sense.

$\endgroup$
6
$\begingroup$

First, let us formulate the problem mathematically:

A symmetric random walk starts at 0 and moves up or down one unit (with equal probability) every 1 second. The are two absorbing barriers located at H and -L, with $H,L>0$. Given infinite time, what is the probability $p_H$ that H will be hit before -L is hit and what is the probability $p_L$ that -L will be hit before H?

Since we have infinite time, one or the other barrier will be hit eventually. In the special case where $H=L$ it is clear from symmetry that $p_H=p_L=\frac{1}{2}$. In the general case, the probabilities are $p_H=\frac{L}{H+L}$ and $p_L=\frac{H}{H+L}$. [Source: S. E. Alm: Simple Random Walk, 2002].

For a stock it is not the price of the stock which follows a random walk, but its logarithm, which starts at initial value $\ln S_0$ So in the above formulas we would replace H and L with the logs of the position of the barriers compared to the starting point. The final result is:

$p_H = \frac{\ln (L/S_0)}{\ln (H/S_0)+\ln (L/S_0)}$ and similarly $p_L= \frac{\ln (H/S_0)}{\ln (H/S_0)+\ln (L/S_0)}$

Edit: on 2019/11/11 I corrected a typo pointed out by @ANdrea

$\endgroup$
4
$\begingroup$

If $H > L$, I can't believe $p_H$ is greater than $p_L$. If we put it in terms of TakeProfit (TP) and StopLoss (SL) concerning the FOREX market, if TP is 20 pips and SL is 10 pips, it will be more likely to hit the ST first than the TP. This is why I suspect the correct equations are $p_H = L/(L+H)$ and $p_L = H/(L+H)$. And now it's time to dive into "S. E. Alm: Simple Random Walk, 2002". Br

$\endgroup$
2
  • $\begingroup$ You are right! Thank you. $\endgroup$
    – Alex C
    Nov 12, 2019 at 2:19
  • 1
    $\begingroup$ By the way, if we also decide to consider the broker's spread (which is always different from zero!) in our discussion, and since such a spread always places our trader into an initial disadvantageous position, we can eventually rewrite our equations as: pH = (L - spread)/(L + H) , and pL = (H + spread)/(L + H) Br $\endgroup$
    – ANdrea
    Nov 26, 2019 at 21:14
1
$\begingroup$

Google "MIT a bug's life gambler's ruin" for an exact model for this, albeit in a binomial world. The bug flips a coin every iteration to move left or right; and it might then end up falling off the left cliff or the right one. Which is a perfect metaphor for this challenge.

https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/readings/MIT6_042JF10_chap20.pdf

But when you turn up the frequency to infinity, the binomial becomes normal... So take the paper above; and flip twice/a trillion times as many coins for half/a trillionth a step move.

So the probability of hitting the stop = (e(2*mu/sigma^2 * target)-1) / (e(2*mu/sigma^2 * (stop + target)-1)

Which means that the probability the target = (e(-2*mu/sigma^2 * stop)-1) / (e(-2*mu/sigma^2 * (stop + target)-1)

Simple verification will show you that the two sum to 1. Both stops and targets are expressed as positives. IE if I'm risking a 2% move one way, looking for a 5% move the other way; "stop" is 2% and "target" is 5%. The probabilistic asymmetry is generated by the symmetrical difference in the sign on the returns (mu) between the two.

The practical problem with this approach is that it is not time-limited. Your model calls a directional bias; but this may not come to pass. The model will continue to believe in the directional bias continuing to hold until a barrier is hit, no matter how long that takes. The "optimal" risk it will then take, often involves taking liberties around the probability that a particular adverse drawdown will NEVER take place if the preferred trend is perpetual ;-(

But as a quick and dirty win-loss probability versus magnitude reality check, it's a useful piece of kit in the proverbial toolbox.

$\endgroup$
1
  • $\begingroup$ very useful reference link!! Thank you! $\endgroup$ Aug 21, 2021 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.