← Back to AIQ Genesis

The Bayesian RSI: Asking Who's Winning, as a Probability

Indicators · 6 min

The classic RSI gives you a number between 0 and 100 and leaves you to decide what it means. Is 35 oversold enough? Is 70 a warning or a strong trend? The number itself doesn't say how confident it is, or how much evidence is behind it.

The AIQ Genesis Bayesian RSI asks the same underlying question, who is in control, buyers or sellers, but answers it as a probability. The line reads 0.50 when it's a coin toss, below 0.50 when sellers have the edge, and above 0.50 when buyers do. It is the same Bayesian way of thinking about evidence that sits behind the AIQ Expert Rating, applied to a single, familiar question.

Keeping score, with a fading memory

Think of the indicator as a scorekeeper. Every bar that closes higher than the one before is a point for the buyers. Every bar that closes lower is a point for the sellers. Unchanged closes don't score. Old points slowly fade, so last week counts for more than last quarter. With the default half-life of 14 bars, a point loses half its weight every 14 bars, which works out to a memory of roughly the last 20 bars.

For readers who want the math: the two running scores feed a Beta-binomial model that starts from a neutral, uniform prior. The plotted line is the posterior mean, the up score divided by the total. In plain terms, it is the indicator's best estimate of the chance that buyers are winning right now.

Illustration of the Bayesian RSI signal: the line falls through 0.48 for a long entry, holds through a second dip, and exits after rising through 0.52 0.52 0.50 0.48 Long entry Exit to flat second dip: still long, no new arrow Buying-pressure probability (illustration, not real data)
How the signal behaves. The line drops through 0.48 and the indicator goes long. It holds through a second dip without a new arrow, then exits once the line rises through 0.52. Shaded areas show the line beyond each threshold.

Reading the signal

The Bayesian RSI is a mean-reversion tool. It looks for a long entry when sellers have had the upper hand long enough that the market looks stretched to the downside, and it steps aside once buyers are back in control.

Because the 0.48 to 0.52 band is narrow, a raw version of this signal can flip back and forth. Three whipsaw filters are on by default: a short smoothing of the line, two confirmation bars before the signal changes, and a minimum hold of three bars after an entry. Setting them to 1, 1 and 0 gives you the original, unfiltered signal.

Long or flat, never short

The red triangle means "step aside", not "go short". The thresholds were researched as entries and exits for long trades only. A reading of 0.52 means buyers have a slight edge, not that the market is overextended, and stocks have a long-run upward drift that works against short trades. A short side would need its own, much higher threshold and its own testing.

The margin of error, honestly

A Bayesian model can tell you how uncertain its own estimate is, and the indicator can draw that as a 90% band around the line. We turned it off by default, and it's worth explaining why.

Because the indicator only remembers roughly the last 20 bars, it can never be very sure. The band stays about plus or minus 0.17 around the line almost all the time, and it barely changes with market conditions. That is useful to know once: the 0.48 to 0.52 trigger zone sits well inside that margin of error, so a single cross is an early lean, not a certainty. But a band that is nearly constant adds little to the chart, and it squeezes the pane so the thresholds are harder to see. Turn it on under Display if you want to see it. Raising the half-life is the only thing that narrows it. The band is for context only and is never used by the signals.

Context and protection

Mean reversion works better in some markets than others, so the indicator carries the same regime flag used in our other scripts: Bull when price is above its 200-bar average, Bear when below, and Choppy when volatility is running well above normal. The status table shows the current regime, and you can block new entries in any regime you choose.

There is also an optional ATR trailing stop. By default it sits 3 ATRs below the highest close since entry and only ever moves up. You can use it in place of the threshold exit, or alongside it so the trade closes on whichever comes first. The stop is drawn on the price chart in orange while you're long, a stop exit is marked with a red X, and after a stop-out the line must leave the oversold zone before a new entry is allowed. For a mean-reversion entry, pairing the threshold exit with a stop is the natural combination: the threshold takes the bounce, and the stop limits the damage if a dip turns into a real downtrend.

The settings worth knowing

The 0.48 and 0.52 levels came from a grid search on daily data for S&P 100 stocks from 1989 to 2026, using the original unfiltered signal. In that research the signal compared best with buy-and-hold in choppy markets and lagged it in steady bull markets. The whipsaw filters and the ATR stop have not been through the same testing yet, and all of it was on daily bars. Those are historical results, not a forecast, so test it on your own markets and timeframe before relying on it.

The Bayesian RSI is free on TradingView. Search for "AIQ Genesis Bayesian RSI" in the indicators panel, or see all AIQGENESIS scripts. For the full Bayesian evidence picture, add the free AIQ Essential indicator.

One question, who's winning, answered as a probability. Enter on the lean, respect the margin of error.

This material is being provided for informational purposes only and nothing herein constitutes investment, legal, accounting or tax advice, or a recommendation to buy, sell or hold a security. No recommendation or advice is being given as to whether any investment is suitable for a particular investor. It should not be assumed that any investments in securities, companies, sectors or markets identified and described were or will be profitable. All information is current as of the date hereof and is subject to change without notice.

← Back to all research