Bayes in Trading (2/3)
This newsletter is a direct continuation of the previous one.
Last week, we discussed a very common problem in trading and machine learning: predicting a rare event.
We saw that even models with high reported accuracy can be misleading when the event itself occurs infrequently.
Now, we will go through the computation explicitly and show how Bayes quantifies this effect.
1. Restating the problem and identifying the quantities
We consider a binary classification problem applied to trading. A model attempts to detect a specific market pattern that occurs rarely.
We define two events:
E: the pattern is truly present in the market
S: the model triggers a signal
The available information is the following:
When the pattern truly occurs, the model detects it with a 90% reliability.
\(P(S\mid E) = 0.90\)The pattern occurs 2% of the time.
The model still produces signals even when the pattern is not present with a probability of 12%.
Our goal is not to evaluate the model conditionally,
but to answer the trading-relevant question:
When the model triggers a signal, what is the probability that the pattern is actually real?
This corresponds to computing a posterior probability. In other words, with a prior probability (2% that it can occur), how knowing that the model predict a signal will impact the posterior probability.
2. What information is required and why
At this point, it is important to pause and clarify something.
With only:
the base rate of the event,
and the model’s detection rate when the event occurs,
the problem is not solvable.
To compute the probability that a signal is actually correct, we need three distinct pieces of information:
How often the event occurs in general.
How often the model detects the event when it is truly present.
How often the model produces a signal when the event is not present.
The last quantity is usually overlooked.
Yet it is the one that dominates the result when events are rare.
This is why reported accuracy alone is insufficient in trading applications.
3. Bayes formula
Bayes’ theorem provides a direct relationship between these quantities.
It allows us to invert the question from “how good is the model when the event happens?” to “how likely is the event when the model fires?”
Formally, Bayes’ rule gives:
4. Applying the formula
We now substitute the values from the problem:
The result is simple to interpret. Even with a high detection rate when the pattern is real, and a seemingly reasonable false positive rate, only about 1 signal out of 7 corresponds to a true pattern.
This outcome is not caused by a bad model. It is caused by the combination of:
a low base rate,
and non-negligible false positives.
In the next newsletter, we will stop computing and start reasoning. We will vary the base rate, the false positive rate, and the detection rate, to understand which quantities truly matter, and which ones are often overemphasized.
This is where Bayes becomes a practical trading reflex rather than a formula.
👉 If you want to go deeper into each step of the strategy building process, with real-life projects, ready-to-use templates, and 1:1 mentoring, that’s exactly what the Alpha Quant Program is for.



The base rate trap shows up everywhere in ML trading systems but rarely gets the attention it deserves. I've seen stratgies with 85% accuracy in backtests completely fall apart live because nobody bothered checking how often the target condition actualy occurs. The false positive rate becomes the entire game when your signal fires 1000 times but the real event only happens 20.