product_forecast
Forecast a business metric from its historical series, generating per-period point forecasts with confidence intervals to support data-driven planning.
Instructions
Forecast a business metric horizon periods ahead from its historical series and return per-period point forecasts with confidence intervals. The trend comes from the last up-to-6 history values, volatility from the mean absolute period change, and a 5000-scenario simulation quantifies uncertainty; seasonality=true applies an alternating +/-5% seasonal factor. Use query_data to build the history from a connected dataset first. Synchronous deterministic compute; nothing is persisted. Returns baseline (most recent value), forecast_mean (final period), total_change_pct, and one {period, forecast, lower_bound, upper_bound, trend} item per period with trend up, down, or stable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | Yes | Name of what you are forecasting, e.g. monthly_revenue. | |
| history | Yes | Historical values in chronological order, most recent last; 3-1000 points. | |
| horizon | No | How many periods ahead to forecast, 1-120; defaults to 12. | |
| seasonality | No | Account for seasonal patterns; defaults to true. | |
| confidence_level | No | Confidence interval width, 0.5-0.99; defaults to 0.90. The z-value comes from the nearest of 0.90, 0.95, 0.99. |