Title: The McClellan Oscillator — What it is, how to calculate it, and how to use it
Key takeaways
– The McClellan Oscillator (MO) is a market-breadth momentum indicator based on the difference between advancing and declining issues on an exchange (e.g., NYSE, NASDAQ).
– It is the difference between a 19-day EMA and a 39-day EMA of the advances-minus-declines series (or, on an adjusted basis, the advances-minus-declines as a fraction of total issues).
– Positive/rising values suggest accumulation (broad-based buying); negative/falling values suggest distribution (broad-based selling). Large moves (often ~100 points or more) from negative to positive are called breadth thrusts.
– The McClellan Summation Index (MSI) is the cumulative sum of daily McClellan Oscillator values and is used as a longer-term breadth measure.
– The indicator can be choppy and produce false signals; use it with price action and other technical tools and test it across markets and timeframes before trading from it.
What is the McClellan Oscillator?
The McClellan Oscillator, developed by Sherman and Marian McClellan, is a breadth-based momentum indicator that measures the short-term trend in the difference between the number of advancing stocks and declining stocks on a given exchange. Because it is derived from the entire universe of listed issues (or the exchange’s issues), it provides a breadth view that complements price or index-based indicators.
The core idea: compute the net advances (advances − declines) each day, smooth that series with two exponential moving averages (EMAs) of different lengths, and take their difference. The result oscillates above and below zero, where:
– Positive MO: the short-term EMA is above the long-term EMA (more breadth toward advances).
– Negative MO: the short-term EMA is below the long-term EMA (more breadth toward declines).
The formula for the McClellan Oscillator
Unadjusted (original):
– MO = (19-day EMA of (Advances − Declines)) − (39-day EMA of (Advances − Declines))
The EMAs are conventionally computed with smoothing constants:
– 19-day EMA smoothing constant = 2/(19+1) = 0.10
– 39-day EMA smoothing constant = 2/(39+1) = 0.05
So:
– 19-day EMA_t = (NetAdv_t × 0.10) + (19-day EMA_{t−1} × 0.90)
– 39-day EMA_t = (NetAdv_t × 0.05) + (39-day EMA_{t−1} × 0.95)
– MO_t = 19-day EMA_t − 39-day EMA_t
Adjusted version (controls for changes in number of listed issues)
To compare values across long periods when the number of listed stocks varies:
– Adjusted Net Advances (ANA) = (Advances − Declines) / (Advances + Declines)
– Compute 19- and 39-day EMAs on ANA using the same smoothing constants, then:
– Adjusted MO = 19-day EMA of ANA − 39-day EMA of ANA
How to calculate the McClellan Oscillator — step-by-step (practical)
1. Choose the universe: select the exchange or index you’ll use (NYSE, NASDAQ, etc.). Obtain daily Advances and Declines (number of stocks up vs. down from previous close).
2. Compute Net Advances (NetAdv) daily:
– NetAdv = Advances − Declines
– Or compute ANA for the adjusted MO: ANA = (Advances − Declines) / (Advances + Declines)
3. Seed the EMAs:
– Common options: set the first-day EMA equal to the first NetAdv (or ANA), or compute an initial SMA over the first 19 (or 39) days and use that as the initial EMA seed. Consistency matters.
4. Iterate EMAs:
– 19-day EMA_t = (NetAdv_t × 0.10) + (19-day EMA_{t−1} × 0.90)
– 39-day EMA_t = (NetAdv_t × 0.05) + (39-day EMA_{t−1} × 0.95)
– For ANA-based, replace NetAdv with ANA and use the same formulas.
5. Compute MO:
– MO_t = 19-day EMA_t − 39-day EMA_t
6. Optional: compute McClellan Summation Index (MSI):
– MSI_t = MSI_{t−1} + MO_t (MSI is cumulative; pick a starting MSI value, commonly 0)
Simple numeric example (illustrative)
Assume on day t:
– Advances = 1,800; Declines = 1,200 → NetAdv = 600
– Prior-day 19-day EMA = 350; prior-day 39-day EMA = 300
Compute:
– New 19-day EMA = (600 × 0.10) + (350 × 0.90) = 60 + 315 = 375
– New 39-day EMA = (600 × 0.05) + (300 × 0.95) = 30 + 285 = 315
– MO = 375 − 315 = 60
Interpretation: MO > 0 (short-term breadth improving), and a rising MO suggests accumulation broadening; a falling MO suggests deteriorating breadth.
What the McClellan Oscillator tells you (interpretation and signals)
– Sign/level:
– MO > 0: short-term breadth favors advancing issues (bullish breadth).
– MO < 0: breadth favors declining issues (bearish breadth).
– Direction:
– Rising MO indicates increasing breadth momentum (accumulation).
– Falling MO indicates decreasing breadth momentum (distribution).
– Crossovers:
– MO crossing from negative to positive — potential bullish signal (trend change or strength improving).
– MO crossing from positive to negative — potential bearish signal (weakening breadth).
– Breadth thrust:
– A large move of the MO, often cited as ~100 points or more, from negative territory into positive territory is called a breadth thrust — historically an indication of a strong reversal or the start of a durable rally.
– Divergence vs. confirmation:
– Bullish divergence: MO rising while index price falls — breadth improving despite price weakness → possible upcoming price strength.
– Bearish divergence: MO falling while index price rises — fewer stocks are participating in the rally → potential topping risk.
McClellan Oscillator vs. McClellan Summation Index
– McClellan Oscillator (MO): a short-term momentum/breadth oscillator — difference between two EMAs of daily net advances. Useful for spotting shorter-term breadth changes, crossovers, and breadth thrusts.
– McClellan Summation Index (MSI): cumulative sum of daily MO values. MSI = previous MSI + current MO. It provides a longer-term breadth trend measure and smooths the daily whipsaws that can occur with the MO. Use MO for short-term signals and MSI for confirming longer-term market breadth direction.
Limitations and cautions
– False signals and choppiness: the MO can generate many signals and can be prone to whipsaws, especially in sideways markets; breadth thrusts and crossovers do not always translate to sustained price moves.
– Exchange dependence: MO reflects breadth on the chosen exchange; comparing MO from one exchange to an index dominated by another universe can be misleading.
– Data quality and changes in listings: changes in number of listed issues can skew raw net-advances values over long periods — use the adjusted (ANA) version to compensate.
– Not a standalone tool: always confirm MO signals with price action, volume, other breadth measures (e.g., advance-decline line), and risk management rules.
– Parameter choice and seeding: initial EMA seeding and the decision to use adjusted vs. raw MO affect values; be consistent and backtest.
Practical trading/analysis steps and checklist
1. Data setup
– Get daily Advances and Declines for the exchange you want to analyze. Use a reliable data feed.
2. Decide unadjusted vs adjusted
– Use ANA (adjusted) to control for changing listed-issues counts over decades; use raw NetAdv for short-term consistency if the exchange size is stable for your sample.
3. Compute MO and optional MSI
– Use the 19- and 39-day EMA constants (0.10 and 0.05).
4. Define your signals and rules
– Examples:
– Enter long when MO crosses from negative to positive and price confirms by holding support or breaking a short-term resistance.
– Consider a breadth thrust (MO gap of ~100+ points negative → positive) as a strong bullish signal, but require price confirmation (index close above short-term MA).
– Use divergence between MO and index to anticipate possible price reversals; require candlestick or trendline confirmation.
5. Confirm with other indicators
– Use price trend, volume, volatility, and other breadth indicators (advance-decline line, % of stocks above a moving average, etc.) to reduce false signals.
6. Risk management
– Use stops, position sizing, and backtested entry/exit rules. Paper trade first.
7. Backtest and forward-test
– Test your MO-based rules across multiple market regimes (bull, bear, range) and on your chosen universe. Adjust and refine.
Spreadsheet / coding notes
– Spreadsheet: columns for Date, Advances, Declines, NetAdv (or ANA), 19EMA, 39EMA, MO, MSI. Initialize first EMA as the first NetAdv or as a SMA of the first 19/39 rows.
– Python (pandas) approach: compute NetAdv, then use pandas’ ewm(span=19, adjust=False).mean() and ewm(span=39, adjust=False).mean() (note: pandas .ewm uses alpha = 2/(span+1) by default).
– Example: ema19 = NetAdv.ewm(span=19, adjust=False).mean(); ema39 = NetAdv.ewm(span=39, adjust=False).mean(); MO = ema19 – ema39
Further reading and sources
– Investopedia — “McClellan Oscillator” (source URL provided)
– McClellan, Sherman. Patterns for Profit: The McClellan Oscillator and Summation Index. Marian Publishing.
– Devcic, J. “Understanding McClellan's Oscillator & Summation Index.” Technical Analysis of Stocks and Commodities, 2004.
– McClellan Financial Publications — biographical and methodology notes on Sherman McClellan.
If you’d like, I can:
– produce a ready-to-run spreadsheet template (Excel) with formulas and example data, or
– generate a short Python script that fetches advances/declines (if you provide a data source) and computes MO and MSI, or
– backtest a simple MO-based entry/exit rule on a historical index sample.