forecast_sales
Forecast future sales revenue, quantity, or gross profit. Auto-backtests nine statistical models, ranks them by MAPE, and returns per-period forecasts with an accuracy table.
Instructions
Predict future sales revenue, quantity, or gross profit using 9 statistical models: SMA, WMA, EWMA, LinearTrend, Drift, Holt Double-Smoothing, Holt-Winters Triple-Smoothing (seasonal), SeasonalNaive, and Median. Auto-backtests all models and recommends the best one by MAPE. Returns per-period forecasts for every model plus model accuracy table.
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 train on (default 24, max 36) | |
| horizonMonths | No | Number of months to forecast ahead (default 3, max 12) |