detect_seasonality
Identifies seasonal patterns in monthly revenue, quantity, or gross profit, optionally by customer/item. Outputs peak months, cycle length, and forecast model recommendation for demand planning.
Instructions
Analyse a historical monthly time series for seasonal patterns. Runs full additive decomposition (trend + seasonal + residual), computes ACF up to lag 24, seasonal strength score (Fs), peak/trough months, dominant cycle period, and recommends which forecast model to use. Works on revenue, quantity, or gross profit — optionally filtered by customer or item.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| measure | No | revenue | quantity | gp (default: revenue) | |
| cardCode | No | Filter by customer card code (optional) | |
| itemCode | No | Filter by item code (optional) | |
| historyMonths | No | Months of history to analyse (default 36, max 60) |