Classification-based market structure

How market structure makes your application or agent better informed

Before your strategy, application, or agent acts, it can ask whether the market around the idea supports it or contradicts it. Is participation broad or narrow? Is it new or established? Is relative strength confirmed by the sector around it? Is structure improving or eroding?

Stock Trends answers those questions by classifying instruments the same way every week and aggregating the classifications into market structure. The rules have been applied consistently across a classification record that begins in 1980, so a reading today can be compared with readings from earlier market cycles.

Step 1 · Classify

How each instrument is classified

Every week, each instrument is placed in one of six trend states based on the relationship between its price, its 13-week moving average, and its 40-week moving average. The states group into a bullish and a bearish major trend category.

SymbolStateMajor categoryWhat it describes
^+BullishBullish13-week moving average above the 40-week; the close is above the lower limit of the 13-week envelope (13-week average minus 3%).
^-Weak BullishBullish13-week average still above the 40-week, but the close has fallen below that lower envelope limit.
v^Bullish CrossoverBullishThe 13-week average crossed above the 40-week this week: the first week of a new bullish trend.
v-BearishBearish13-week average below the 40-week; the close is below the upper limit of the 13-week envelope (13-week average plus 3%).
v+Weak BearishBearish13-week average still below the 40-week, but the close has risen above that upper envelope limit.
^vBearish CrossoverBearishThe 13-week average crossed below the 40-week this week: the first week of a new bearish trend.

Each classification carries further fields that describe its age and relative performance:

  • trend_cnt: persistence Consecutive weeks in the current specific trend state.
  • mt_cnt: maturity Weeks in the current major trend category, bullish or bearish.
  • rsi: Stock Trends RSI 13-week performance relative to the S&P 500, baseline 100. Above 100 means outperformance. It is not Wilder RSI.
  • rsi_updn and vol_tag Weekly direction of relative strength, and unusual-volume context.

Field definitions: GET /v1/ai/context and GET /v1/meta/indicators (both free). Human-oriented guides to the trend states are published at stocktrends.com.

Step 2 · Aggregate

From classifications to breadth

Counting classified states across a population gives breadth: how widely participation is distributed, overall and by sector, industry group, and industry. GET /v1/breadth/sector/latest and GET /v1/breadth/sector/history return, for each group:

FieldDefinitionWhat it adds
bullish_count, bearish_count, neutral_countInstruments in each major category; neutral states are counted separatelyDirection of participation
bullish_pctbullish ÷ (bullish + bearish); neutral excluded from the denominatorBullish share of classified instruments
net_breadthbullish − bearishNet participation
avg_trend_cnt, avg_mt_cnt (overall, bullish, bearish)Average weeks in state and in major trendHow established the trends are
young_bullish_pctBullish instruments with trend_cnt ≤ 4, as a share of classifiedNew participation
mature_bullish_pctBullish instruments with trend_cnt ≥ 20, as a share of classifiedEstablished participation
avg_rsi, rsi_ge_110_pct, rsi_ge_120_pctRelative strength inside the groupWhether the group is outperforming
Population and denominator. By default, market aggregates use common stocks and units (CS+UN) on the NYSE, NASDAQ, AMEX, and TSX reporting exchanges. Parameters such as population and include_unknown change the scope. Breadth figures are only comparable when they share a population, so always read a number together with its population and denominator.
Step 3 · Lead

Relative-strength leadership is not the same as trend confirmation

Relative-strength leadership

GET /v1/leadership/summary/latest lists instruments by Stock Trends RSI (default min_rsi=110) with a minimum number of weeks in their current major trend (default min_mt_cnt=4), ranked by RSI and then mt_cnt, overall and by sector and industry group. Each row reports its trend.

Membership does not require a bullish state. An instrument can outperform the benchmark while classified bearish, which can itself be informative, for example relative resilience during a downtrend. Read trend to separate those cases.

Bullish trend confirmation

An instrument is trend-confirmed when its state is in the bullish category (^+, ^-, or v^). Combining the two answers a sharper question: which relative-strength leaders are also in established bullish trends?

Sector leadership over time

GET /v1/leadership/rotation/history ranks sectors weekly by leadership_score, which combines average relative strength, bullish participation, and average trend maturity, for sectors with at least 25 constituents.

Leadership tables are context for where relative strength sits and whether it is moving. They are not a list of recommendations.

Step 4 · Frame

Regime, breadth, and Market Epoch answer different questions

QuestionHow it is measuredRead it as
Market regime
/v1/market/regime/*
What is the directional participation environment? (bullish − bearish) ÷ classified. At or above 0.10 is bullish, at or below −0.10 is bearish, otherwise mixed. The confidence label reflects the size of the score, not statistical confidence. Current direction. The separate forecast endpoint extends the recent average weekly change in the score.
Breadth
/v1/breadth/sector/*
Where is participation, and how old is it? Classified counts, shares, persistence, maturity, and relative strength by group. Breadth and quality of participation.
Market Epoch
/v1/market/epoch/*
Which recurring structural state is the market in? A frozen classifier over six aggregate features of the same classifications. Persistent structural context, not a forecast. See Market Epochs.

These readings can agree or diverge, and a divergence is often the informative part.

Complementary, not a replacement

What classification-based breadth adds

Conventional breadth measures, such as advance/decline lines, new highs and lows, and the share of stocks above a moving average, are fast, widely available, and useful, especially for short-horizon timing. Stock Trends breadth measures where each stock sits in its trend, how long it has been there, and how it performs against the benchmark. That adds information for a different set of questions.

QuestionAdvance/decline and new highsStock Trends classification breadth
What moved this week or today?Direct and fasterIndirect (weekly cadence)
Is a rise happening inside established downtrends?Not from the count aloneYes: trend state with trend_cnt and mt_cnt
How mature is participation?Not from the count aloneYes: young_bullish_pct, mature_bullish_pct, avg_mt_cnt
Is relative-strength leadership supported by its sector?Not from the count aloneYes: sector breadth, RSI leadership, and rotation score
Comparable across decades under fixed rules?Depends on the sourceYes: classification record from 1980
Speed at turning pointsFasterSlower: 13- and 40-week moving averages lag by design

Limitations

  • Weekly cadence and moving-average construction lag turning points. Use it for context, not timing.
  • Counts are equal-weighted. Breadth can diverge from capitalization-weighted indexes and does not measure index risk.
  • Population scope matters: default aggregates combine U.S. and Canadian listings, neutral states are excluded from bullish_pct, and sector results depend on industry mapping.
  • Thresholds such as RSI 110 or four weeks of maturity are conventions, not optimised parameters.
  • Classification describes structure. Probabilistic forward-return estimates are a separate step, handled by ST-IM.
Examples

What market structure has shown

Historical · published

The indexes confirmed; the market beneath them did not

A Stock Trends analysis of the September 18, 2026 dataset compared the common-stock universe with April 2026. Over five months, the share of stocks in the bullish trend family barely moved, from 45.7% to 46.6%. Fully Bullish (^+) stocks fell from 31.6% to 29.7%, while both Weak Bullish and Weak Bearish states expanded. Over the same period, the major indexes strengthened into 25-week bullish trends.

The article's percentages are shares of all classified observations, including neutral states. This is a different denominator from the API's bullish_pct.

Week ended 2026-10-30 · Intelligence Agent breadth evidence

Bearish classifications outnumbered bullish ones

The Stock Trends Intelligence Agent's breadth evidence for the week ended October 30, 2026 counted 2,663 bullish and 3,172 bearish classifications, with 311 neutral. That is a bullish share of 45.6% and net breadth of −509, down from −248 over the preceding four weeks.

Denominator: the 5,835 bullish plus bearish classifications in the Agent's breadth evidence (2,663 ÷ 5,835 = 45.6%); the 311 neutral classifications are excluded. These figures are the Intelligence Agent's breadth evidence, not the API's default CS+UN market aggregate. The two populations have not been reconciled, so do not compare these numbers directly with regime or Market Epoch figures. Source: the free GET /v1/intelligence/editorial/latest/preview for that week.

Illustrative · not current data

A rally inside downtrends

In a week when most stocks rise, an advance/decline line improves. If most of the stocks that rose are still in Bearish or Weak Bearish states with long mt_cnt, classification breadth reads the move as a rally inside established downtrends. It reads a new advance only when Bullish Crossovers (v^) and young bullish trends (trend_cnt ≤ 4) begin to expand.

Step 5 · Apply

Using market structure in your agent

An investment agent has shortlisted several technology and healthcare stocks using its own valuation model. Before it recommends exposure, it checks the structure around the idea:

  1. ParticipationGET /v1/breadth/sector/latest: is participation in those sectors broad, and is it young or mature?
  2. LeadershipGET /v1/leadership/summary/latest: are the shortlisted stocks relative-strength leaders, and what trend state is each in?
  3. EnvironmentGET /v1/market/epoch/latest and GET /v1/market/regime/latest: which structural state and directional environment surround the idea?
  4. InterpretationGET /v1/intelligence/guidance/latest (optional): the Intelligence Agent's current reading and the conditions that would change it
What Stock Trends adds Whether market structure supports or contradicts the idea, sector by sector.
What stays with the agent Security selection, valuation, sizing, risk limits, execution, and suitability.
What cannot be inferred Future returns, timing, or that current conditions will persist.

Access: Subscription · x402 · MPP over the REST API. Latest sector breadth, the leadership summary, regime, and Epoch are also available as x402-paid tools on the Remote MCP. Check GET /v1/pricing/catalog for current prices, and use GET /v1/cost-estimate to price a workflow before running it.