🏇🏽

Probabilistic Trading

The aim of trading equities is to find that competitive “edge”. An edge can be found through high probability setups, much of which technical analysis can help with, but through mathematics of algorithmic trading we can use probability density functions to derive the highest probability positions to enter and exit from.

Outline:

  • People develop patterns over time that they gravitate towards
  • People are inherently predictable, especially in masses
  • People are the markets and the market is an echo chamber
  • Therefore we should be able to derive high probability setups to capitalize on
  • The more experience people get in markets, the more they realize that whatever it is that they know is low in relation to the things that you need to know in relation to what’s discounted into markets.
  • If there is some connection between stocks, like those of the same sector, then there is overlap (intersection). When there isn’t, then
P(AB)=0P(A \cap B) = 0
Traders who leverage “probabilistic thinking”, where they assess the entry and exit of their positions based on a carefully chosen set of probability factors, are bound to approach trading in a more favorable manner. Not only will they be inclined to choose less “bets”, but they’ll formulate hypotheses prior to entry they can then validate/invalidate. Which factors to leverage in their bets were never clear, but in this piece I provide a chosen set of factors that produce a confidence level for traders to decide upon entry.

Probabilities Crash Course

  • The past informs the future
  • More data usually produces a more accurate probability
  • We must always update our assumptions from prior data
  • Pure averages aren’t always favorable, you’ll want to observe the data and make an educated guess at when to slice the data
    • Using more data typically gives more reliable predictions, but when the situation changes, past data can be misleading.
  • Probability estimates should be based on the information we have. Whenever we learn new information, our probability estimates should update accordingly.
  • When two events can’t both happen, the probability of either happening
  • When both could happen at once, we have to subtract that overlap region, so
  • When adding the probabilities of two separate events happening, we need to consider whether it is possible for both events to happen at once.
  • When we generate all the various permutations of possible outcomes, this is known as a sample space
  • Regression to the mean → A concept that was first explained by Sir Francis Galton, any series with complex phenomena that are dependent on many variables, where chance is involved, extreme outcomes tend to be followed by more moderate ones.
  • An important distinction in high probability setups is that it does not imply it is more likely to happen than not — it simply means it possesses the highest probability value among all other options.

Types of probabilities

  • Marginal probability → The probability of an event occurring P(A), known as an unconditional probability because it is not conditioned by another event.
  • P(A)\mathbb{P}(A)
  • Union probability → The probability event A will occur , or event B will occur, or both will occur together.
  • P(A  or  B)  =  P(A)  +  P(B)\mathbb{P}(A \; or \; B) \; = \; \mathbb{P}(A) \; + \; \mathbb{P}(B)

    which can also be written as

    P(A    B)=P(A)  +  P(B)P(AB)\mathbb{P}(A \; \cup \; B) = \mathbb{P}(A) \; + \; \mathbb{P}(B) - \mathbb{P}(AB)

    However when both events can happen at once, we have to subtract the overlap region in the hypothetical Venn diagram as follows:

    P(A  or  B)  =  P(A)+P(B)P(A  and  B)\mathbb{P}(A \; or \; B) \; = \; \mathbb{P}(A) + \mathbb{P}(B) - \mathbb{P}(A\; and \; B)
  • Joint probability → The probability event A and event B will both occur together.
  • P(AB)\mathbb{P}(AB)
  • Conditional probability → The probability event A will occur if event B has already occurred.
  • P(AB)\mathbb{P}(A|B)
  • Negation probability → The probability event A will not occur.
  • P(¬A)\mathbb{P}(\neg A)

Based on the probabilities above, we can combine the joint and conditional probability if we wanted to derive the likelihood of events A and B happening at the same time. We would have two approaches to deriving this:

P(AB)=P(A)  P(BA)P(AB)=P(B)  P(AB)\mathbb{P}(AB) = \mathbb{P}(A) \; \mathbb{P}(B|A) \\ \mathbb{P}(AB) = \mathbb{P}(B) \; \mathbb{P}(A|B)

Various sets of events

  • Mutually exclusive → If one event occurs, another event cannot occur.
  • Collectively exhausted → A certain collection of events describes all possible outcomes.
  • Independent → The occurrence of an event does not depend on th occurrence of another event.
  • Union → The events can occur either together or separately.
  • Joint → The events occur together.
  • Conditional → The occurrence of one event depends (or is conditioned) upon the prior occurrence of some other event.

The probability density function relates an event to the probability of that event.

(nk)=n!k!(nk)!\begin{pmatrix} n \\ k \end{pmatrix} = \frac{n!}{k!(n-k)!}

In the case of a simple coin flip, which is known as a Bernoulli trial, if we were to flip the coin 3 times, we take the possible number of combinations (k = 2) and take it to the power of the number of iterations (n = 3) to get

232^{3}

In order for us to understand the probability density of three coin flips, we would plug in our

3!2!(32)!=321211=3\frac{3!}{2!(3-2)!} = \frac{3 * 2 * 1}{2 * 1 * 1} = 3

We then take 3 and divide it by the number of combinations to get

323=38=37.5%\frac{3}{2^{3}} = \frac{3}{8} = 37.5\%

Total volume of trades bet (not the starting amounts) multiplied by the edge.

We need high volume in order for the law of averages to play out — variability is expected along the path