get_price_performance_windows
Identify the top outperformance and underperformance periods of a stock relative to a benchmark. This tool computes rolling returns and returns the largest non-overlapping windows, avoiding raw historical price parsing.
Instructions
Get compact benchmark-relative price-performance windows.
Use this for historical-coincidence evidence when a workflow needs 3-5 outperformance/underperformance periods. It fetches adjusted historical prices for the stock and benchmark, aligns common trading dates, computes rolling returns, and returns only the largest non-overlapping windows. This avoids raw historical-price CSV parsing for ordinary stock-move analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock symbol to analyze. | |
| to_date | No | Optional end date (YYYY-MM-DD). Defaults to today. | |
| direction | No | both, outperformance, or underperformance. | both |
| from_date | No | Optional start date (YYYY-MM-DD). Defaults to lookback_years ago. | |
| use_cache | No | Whether to use cached FMP data. | |
| max_windows | No | Maximum windows to return (1-10). | |
| window_days | No | Common-trading-day window length for each return slice. | |
| lookback_years | No | Default lookback when from_date is omitted. | |
| benchmark_symbol | No | Benchmark symbol for relative returns (default SPY). | SPY |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||