The Barometer's Proof
The RSI formula, derived step by step — and why the 50 equilibrium is algebra, not magic.
Galley / Chronometers / The Barometer's Proof Advanced
Prerequisites: The Barometer's Secret · Episode 21 — The Captain's Temper · 16 min read
They do not understand its logarithmic nature. They do not read it across timeframes. They do not know that the 50 level is the true equilibrium. The edge is not in the indicator. It is in the depth of understanding.
THE MEASUREMENT
The Relative Strength Index (RSI) was introduced by J. Welles Wilder Jr. in 1978. It is one of the most widely used technical indicators in the world — and one of the most widely misunderstood. Traders call it logarithmic, mystical, and mean-reverting. The Barometer's Proof strips away the folklore and derives the formula from first principles. We show the smoothing, prove the bounds, explain why 50 is mathematically significant but not magical, and build an interactive calculator that reveals the RSI's actual arithmetic — one price at a time.
THE DERIVATION
Step 1: Gains and Losses
RSI begins with price changes. For each day, calculate the change from the previous close. If the price rose, the gain equals the change and the loss is zero. If the price fell, the loss equals the absolute change and the gain is zero.
Sign Convention
Wilder separated up-days from down-days explicitly. A flat day (zero change) contributes zero to both gain and loss. There are no negative gains and no negative losses in this framework.
Step 2: The Smoothed Average
Wilder did not use a simple moving average. He used an exponentially smoothed average that weights recent data more heavily — similar to an EMA, but with a specific smoothing factor of 1/N where N is the lookback period (typically 14).
Why This Smoothing Matters
With N=14, each new day replaces 1/14th of the old average. This gives the RSI memory — it does not jump wildly when a single outlier day enters the window. But it also means the RSI never fully forgets. A crash from three months ago still whispers in today's reading.
Step 3: Relative Strength and the RSI
Once we have smoothed averages of gains and losses, we compute Relative Strength (RS) — a ratio, not the index itself. The RSI compresses this ratio into a 0–100 scale.
Bounded Proof [0, 100]
Since AvgGain and AvgLoss are non-negative, RS ≥ 0. As RS → 0, RSI → 0. As RS → ∞, 100/(1+RS) → 0, so RSI → 100. Therefore 0 ≤ RSI ≤ 100 for all possible price histories. The bounds are mathematical certainties, not conventions.
Step 4: Is 50 the Equilibrium?
When AvgGain exactly equals AvgLoss, RS = 1. Substituting into the RSI formula: RSI = 100 − 100/(1+1) = 100 − 50 = 50. So 50 is indeed the point where buying pressure and selling pressure are balanced over the lookback period. But it is not a mystical fulcrum. It is the algebraic consequence of a ratio equaling one.
Step 5: Is RSI Logarithmic?
No. The RSI formula is a rational function — a ratio of polynomials. A logarithmic function would involve log(x) or ln(x). Wilder's smoothing is exponential (geometric decay), but the RSI output itself is not logarithmic. It is sigmoid-like: bounded, smooth, and non-linear, but not logarithmic. Calling it logarithmic is like calling a sextant a chronometer — both are navigation tools, but they measure different things.
WORKED EXAMPLE
We calculate the 14-day RSI for a 15-day price sequence. Watch how the smoothed average evolves and how the first RSI reading appears on day 14.
Day 2: 102 − 100 = Gain 2
Day 3: 101 − 102 = Loss 1
Day 4: 103 − 101 = Gain 2
Day 5: 105 − 103 = Gain 2
Day 6: 104 − 105 = Loss 1
Day 7: 106 − 104 = Gain 2
Day 8: 108 − 106 = Gain 2
Day 9: 107 − 108 = Loss 1
Day 10: 109 − 107 = Gain 2
Day 11: 110 − 109 = Gain 1
Day 12: 108 − 110 = Loss 2
Day 13: 111 − 108 = Gain 3
Day 14: 112 − 111 = Gain 1
Day 14 — First Averages:
Sum of 13 gains = 2+0+2+2+0+2+2+0+2+1+0+3+1 = 17. AvgGain = 17/14 = 1.214
Sum of 13 losses = 0+1+0+0+1+0+0+1+0+0+2+0+0 = 5. AvgLoss = 5/14 = 0.357
RS = 1.214 / 0.357 = 3.40
RSI = 100 − 100/(1+3.40) = 100 − 22.73 = 77.27
Day 15 — Smoothed Update: Price drops to 110 (Loss 2)
AvgGain = (1.214 × 13 + 0) / 14 = 1.128
AvgLoss = (0.357 × 13 + 2) / 14 = 0.474
RS = 1.128 / 0.474 = 2.38
RSI = 100 − 100/(1+2.38) = 100 − 29.58 = 70.42
The RSI fell from 77.27 to 70.42 — still elevated, but declining as the loss enters the smoothed average.
THE INTERACTIVE CHRONOMETER
Enter a comma-separated price sequence and select your period. The Proof calculates gains, losses, smoothed averages, RS, and RSI for every valid day. Watch the algebra unfold.
| Day | Price | Gain | Loss | Avg Gain | Avg Loss | RS | RSI |
|---|---|---|---|---|---|---|---|
| Click Calculate to see step-by-step derivation | |||||||
INTERPRETATION
The Barometer's Proof does not tell you when to buy or sell. It tells you what the RSI actually measures, so you can use it with clarity instead of superstition.
Overbought RSI > 70 (default): Gains have dominated the lookback period. The instrument is statistically extended to the upside. This is not a sell signal. It is a condition.
Oversold RSI < 30 (default): Losses have dominated. Statistical extension to the downside. Not a buy signal — a condition.
Neutral RSI 30–70: No statistical dominance. The smoothed gains and losses are in relative balance. Most days live here.
The 50 truth: When RSI = 50, AvgGain = AvgLoss. This is mathematically true. But it does not mean the market is at fair value. It means that, over the last N days, up-moves and down-moves have been equal in their smoothed magnitude. A trending stock can sit at RSI = 50 for weeks if gains and losses alternate evenly. Do not treat 50 as a target. Treat it as a description.
The logarithm myth: If someone tells you the RSI is logarithmic, show them the formula: RSI = 100 − 100/(1+RS). There is no log, no ln, no e^x. The non-linearity comes from the rational (fractional) form, not from exponential growth. Precision in language is precision in trading.
From the Logs
In Episode 21 — The Captain's Temper, Elias was told the RSI has a logarithmic nature and a 50-level fulcrum. The Barometer's Proof derives the actual formula and asks: is 50 truly equilibrium, or just the midpoint between 0 and 100? The answer is both — and neither. It is algebra. And algebra, unlike mythology, can be tested.
Related Guides
The Barometer's Secret
RSI mechanics, divergences, and the edge that depth creates
The Astrolabe
Expectancy, profit factor, and statistical validity of any edge
The Helm Response
Rolling Beta, R², and correlation — measuring what moves together
The Mariner's Retracement
The tactical framework for applying deep RSI knowledge across timeframes