breadth
Calculate market-wide technical indicators—such as McClellan Oscillator, Advance/Decline Line, TRIN, OBV, and new highs/lows—from ticker price data without fetching prices first.
Instructions
Market breadth technical indicators (McClellan Oscillator, OBV, Advance/Decline Line, Chaikin, TRIN, new highs and lows). Applied to price data automatically — no need to fetch prices first. TRIN treats the given tickers as one market, so every column holds the same value; pass the market's constituents for a meaningful figure. Each indicator needs its window of history before it produces values, so the first periods after start_date can be empty and quarterly or yearly periods with long windows can be empty on short histories; start earlier to warm up. Requires tickers='AAPL' — use comma-separated values for multiple tickers. get_market_breadth measures the breadth of all tickers together (advancers and decliners, the advance-decline line, the McClellan oscillator and summation index, the share above the 50 and 200-period averages and new highs and lows), meant for many tickers such as an index's constituents (discovery get_index_constituents). For the predictive power of these indicators across tickers (factor analysis), use the momentum tool with indicator='get_factor_analysis' and metrics='breadth'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"indicator": "<indicator>"
},
"name": "breadth"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lag | No | Number of periods to lag when computing growth rates. | |
| rank | No | true ranks the tickers (or countries) within every period, from the highest value (rank 1) to the lowest, and compares each with its neighbour toward the middle of the ranking: the Difference (in points for returns) and the Multiple (only when both have the same sign), so the first and last rank show how far the best and the worst stand apart, e.g. a fall more than twice as large as the next one. Needs a value per period and ticker; pick one field with show_columns where there are more. | |
| limit | No | The rows to return, like head and tail: 5 for the first five, -5 for the last five (the most recent of a time series). A table with its periods as columns (financial statements, ratios) keeps its first or last periods instead, and rows per ticker (an earnings calendar) are selected per ticker. For ETF holdings the largest (or, negative, the smallest) by weight, and for a list (e.g. news or a screener) its length. 0 returns every row. | |
| growth | No | Return period-over-period growth rates instead of absolute values. | |
| period | No | Observation frequency, e.g. 'daily', 'weekly', 'monthly', 'quarterly', or 'annual' (supported values differ per method). | daily |
| window | No | The number of periods the indicator looks back over, e.g. 14 or 20. Leave unset to use the default of the indicator you selected. Defaults are 14 for get_ease_of_movement; 20 for get_chaikin_money_flow; 252 for get_new_highs_new_lows. | |
| tickers | No | Comma-separated ticker symbols, e.g. 'AAPL,MSFT,GOOGL'. | |
| end_date | No | End of the date range in YYYY-MM-DD format; left empty, today (or the indicator's own window). | |
| indicator | Yes | Name of the specific metric to calculate, one of the listed values. Required — search_metrics finds the indicator (and its tool) for a metric by name. | |
| quarterly | No | Return quarterly data instead of annual when True. | |
| start_date | No | Start of the date range in YYYY-MM-DD format; left empty, five years before today (or the indicator's own window). | |
| long_window | No | For get_chaikin_oscillator: Number of periods for the long-term moving average. For get_market_breadth: The long moving average window. Leave unset to use the default of the indicator you selected. Defaults are 10 for get_chaikin_oscillator; 200 for get_market_breadth. | |
| standardize | No | Return the Z-Score (standard score) instead of the raw values, i.e. how many standard deviations each value is from the mean of its own series. When combined with growth=True, the growth values are standardized instead of the raw values. | |
| start_value | No | The index value to start the series at. | |
| close_column | No | For get_mcclellan_oscillator, get_advancers_decliners, get_trin, get_new_highs_new_lows, get_market_breadth: The name of the column containing the close prices. For get_on_balance_volume, get_accumulation_distribution_line, get_chaikin_oscillator, get_chaikin_money_flow, get_ease_of_movement, get_negative_volume_index, get_positive_volume_index: The column name for closing prices in the historical data. | Adj Close |
| short_window | No | For get_chaikin_oscillator: Number of periods for the short-term moving average. For get_market_breadth: The short moving average window. Leave unset to use the default of the indicator you selected. Defaults are 3 for get_chaikin_oscillator; 50 for get_market_breadth. | |
| show_columns | No | Comma-separated names to filter the output. For historical data use the key names visible in any response record (e.g. 'Close,Volume,Return'). For financial statements use the 'metric' field values from the response (e.g. 'Revenue,Net Income,EBITDA'). Call the tool once without this parameter to see all available names, then repeat with show_columns to reduce response size and token usage. | |
| volume_divisor | No | Scaling constant applied to volume so that the Box Ratio (and therefore EMV) stays in a readable range regardless of an asset's typical share volume. | |
| high_low_window | No | The number of periods, including the current one, of the new highs and lows. | |
| long_ema_window | No | The window size for the long-term EMA. | |
| benchmark_ticker | No | Ticker used as the market benchmark, e.g. 'SPY' or '^GSPC'; 'None' for no benchmark. | SPY |
| short_ema_window | No | The window size for the short-term EMA. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |