sector_analysis
Sector rotation by participation: a sector ETF + its holdings on one timeframe.
Returns the ETF's own state (scenario, color, last 3 bars, signals in force), the most-2s
split of the holdings (1 / 2u / 2d / 3, 2u red, 2d green), simultaneous breaks and
simultaneous setups across ETF + holdings with majority flags, and a `text` summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| etf | Yes | The sector ETF ticker, e.g. XLE. Include its bars in the basket. | |
| now | No | Current time, ISO 8601. Decides if the last bar is still open. Default: the server clock. | |
| as_of | No | Optional ISO time. Use only bars that start at or before this time (replay a past bar). | |
| basket | Yes | Bars per symbol on ONE timeframe, oldest first: {"XLE": [...], "XOM": [...], ...}. Same bar format as find_signals. Limits: 60 symbols, 500 bars per symbol (10 to 50 are enough). Swing: a sector ETF + its holdings on W. Intraday: SPY QQQ DIA IWM on 30 or 60. | |
| timeframe | No | Timeframe of the bars: 5, 15, 30, 60, D, W, M, Q or Y. | W |