market_stretch
Measure US market breadth by calculating the share of symbols above their 200-day moving average and comparing it to historical readings to reveal whether the market is broadly extended or depressed.
Instructions
How stretched the US market is: the share of tracked symbols closing above their own 200-day moving average, plus where that reading ranks against its own recorded history.
This is a breadth (participation) measure, not an index level: a cap-weighted index can sit above its 200-day average while most of its members sit below theirs. Use it to answer "is the market broadly extended or broadly depressed right now", never as a forecast.
Args: days: How many trading sessions of history to return, newest last. Capped at 1000 server-side. Use a small number if you only need the current reading.
Returns: current: the latest session — snapshot_date, total, above_ma200, pct_above (0..1), median, p10, p90. percentile: where current.pct_above ranks in the full stored history, 0..1, where 1.0 means the broadest participation on record. history: the daily series, oldest first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |