Keep reading
The main breadth measures
All of these start from the same daily counts across a universe (for example, all NYSE common stocks or the S&P 500 members): how many stocks advanced, declined or were unchanged, the volume in each group, and how many made new 52-week highs or lows.
Advance/Decline line. Each day, take advancers minus decliners (net advances) and add it to a running total. The level itself is arbitrary; the direction is what matters. A rising index with a falling A/D line is a negative divergence.
McClellan Oscillator. Take net advances, compute a 19-day and a 39-day exponential moving average, and subtract the slow one from the fast one. It swings around zero and shows short-term breadth momentum. Its running total is the McClellan Summation Index, a slower trend measure.
New highs minus new lows. Count stocks at a 52-week high and subtract those at a 52-week low. Healthy uptrends keep producing new highs. When an index makes a new high with fewer stocks doing the same, participation is narrowing.
TRIN (Arms Index). (advancers / decliners) / (advancing volume / declining volume). Readings below 1 mean volume is flowing into advancing stocks; above 1, into decliners. It is mostly used intraday.
Worked example (illustrative numbers)
Suppose on one day 1,800 stocks advance, 1,200 decline, advancing volume is 2.0 billion shares and declining volume 2.4 billion.
- Net advances: 1,800 - 1,200 = +600, added to the A/D line.
- TRIN: (1,800 / 1,200) / (2.0 / 2.4) = 1.5 / 0.833 = 1.8.
More stocks went up, but more volume went into the ones going down. That TRIN of 1.8 says the selling had more weight behind it than the advance count suggests.
Keep reading
Compute breadth in pandas
Our breadth data uses these fields: date, advancers, decliners, unchanged, advancing_volume, declining_volume, new_highs_52w, new_lows_52w, percent_above_50d_ma, percent_above_200d_ma, tick and trin.
"""Example: A/D line, McClellan Oscillator and Summation Index."""
import pandas as pd
b = pd.read_csv("nyse_breadth_daily.csv", parse_dates=["date"]).set_index("date")
b["net_adv"] = b["advancers"] - b["decliners"]
b["ad_line"] = b["net_adv"].cumsum()
ema19 = b["net_adv"].ewm(alpha=0.10, adjust=False).mean()
ema39 = b["net_adv"].ewm(alpha=0.05, adjust=False).mean()
b["mcclellan"] = ema19 - ema39
b["summation"] = b["mcclellan"].cumsum()
b["hl_net"] = b["new_highs_52w"] - b["new_lows_52w"]
b["trin"] = ((b["advancers"] / b["decliners"])
/ (b["advancing_volume"] / b["declining_volume"]))
print(b[["ad_line", "mcclellan", "summation", "hl_net", "trin"]].tail(10))
The McClellan EMAs use smoothing constants of 0.10 and 0.05, which is the traditional form of the 19- and 39-day averages. To spot divergences, compare the 20-day change in ad_line with the 20-day change in the index: index up and A/D line down over the same window is the warning sign.
Watch out
Common mistakes
Mixing universes. NYSE breadth includes many preferred shares, closed-end funds and other non-common-stock issues. That makes it lean toward interest-rate sensitivity. Pick a universe that matches what you trade, and don't splice two together.
Reading the A/D line level. The starting value is arbitrary, so the level says nothing. Use direction and divergence.
Calling tops on the first divergence. Breadth can diverge from price for months before anything happens. Treat it as a condition that raises risk, not as a timing signal.
Survivorship in homemade breadth. If you compute breadth from today's index members only, you drop the stocks that fell out of the index. Your history will look healthier than it was.
Details
Get the data
Daily and intraday breadth, computed from full-market bars. What you'll get: advancers, decliners, up and down volume, 52-week highs and lows, percent above the 50- and 200-day averages, TICK and TRIN.
- Market breadth data, available in early access. Daily breadth is planned for Starter ($29/mo), 1-minute TICK and TRIN for Pro ($79/mo).
- A free breadth sample is available on request.
FAQ
Frequently asked questions
What are market breadth indicators?
They measure how many stocks take part in a market move, rather than how far the index moved. Common ones are the advance/decline line, the McClellan Oscillator, new highs minus new lows, and TRIN. They help you judge whether a rally or selloff is broad or narrow.
How is the McClellan Oscillator calculated?
It is the 19-day exponential moving average of net advances minus the 39-day exponential moving average. Net advances is advancers minus decliners for the day. Some versions use a ratio-adjusted form to make readings comparable across universes of different size.
What does a TRIN above 1 mean?
It means more volume is going into declining stocks than the count of decliners alone would suggest. A reading well above 1 often appears on heavy selling days. Readings below 1 point the other way.
Is breadth useful for trading single stocks?
Indirectly. Breadth tells you about the market backdrop, which affects most stocks. Many traders reduce long exposure when breadth weakens, even if their own stocks still look strong.
Keep reading