Methods and accuracy
This page explains VidiStock’s forecasting and planning calculations with their formulas. The rules here are the ones used in the application itself.
1. Demand series
Section titled “1. Demand series”For every product and warehouse a period-by-period (month or week) net demand series is built:
- Net demand = sales − returns (never below zero). If a return rate is entered on the product card: sales × (1 − return rate).
- The series starts at the product’s first sales period; empty periods before it mean “the product did not exist yet”.
- The current period is incomplete, so it is not part of the series; the forecast starts from it.
- History window: the last 5 years for monthly periods, 3 years for weekly.
- Every product is also forecast as the total of all warehouses (company-wide).
2. Demand pattern
Section titled “2. Demand pattern”The series is classified with two measures (Syntetos–Boylan):
ADI = number of periods / number of periods with demandCV² = (standard deviation / mean of periods with demand)²| Pattern | Condition |
|---|---|
| No demand | No period with demand; forecast 0 |
| Smooth | ADI < 1.32 and CV² < 0.49 |
| Erratic | ADI < 1.32 and CV² ≥ 0.49 |
| Intermittent | ADI ≥ 1.32 and CV² < 0.49 |
| Lumpy | ADI ≥ 1.32 and CV² ≥ 0.49 |
3. Candidate methods
Section titled “3. Candidate methods”| Pattern | Methods tried |
|---|---|
| Smooth, erratic | Last period (Naive), 3 / 6 / 12-period moving average, simple exponential smoothing (SES), Holt (trend), seasonal Naive; with enough history in monthly periods also Holt-Winters and AutoETS |
| Intermittent, lumpy | Croston, SBA (Syntetos–Boylan corrected Croston), TSB |
For intermittent demand, methods such as “repeat the last period” or a short moving average often forecast zero and break the stock plan; that is why only the Croston family, which estimates long-run average demand, is used for this pattern.
History length requirements: at least 6 periods for the 6-period average, 12 for the 12-period one, 8 for Holt; more than one full season for seasonal Naive, at least two full seasons (24 months) for Holt-Winters and AutoETS. With weekly periods the season is 52 weeks, so Holt-Winters and AutoETS are not used.
Short history: if the series has fewer than 6 periods no method comparison is done; the forecast is the series average.
4. Method selection: backtesting
Section titled “4. Method selection: backtesting”Every candidate is tested by holding out the last periods of history (rolling origin):
test length = at least 1, at most (forecast horizon, number of periods ÷ 6)number of folds = at least 1, at most (4, (number of periods ÷ 3) ÷ test length)In each fold the method is trained on the data up to the cut-off and forecasts the following periods; the cut-off moves from fold to fold. The errors of all folds are evaluated together.
| Pattern | Selection criterion |
|---|---|
| Smooth, erratic | Lowest WAPE; on a tie, lowest MASE |
| Intermittent, lumpy | Lowest RMSE (squared error); on a tie, smallest bias |
On an intermittent series WAPE rewards a method that always forecasts zero, while the stock plan needs the average demand. The squared error rewards the average, so it is used for this pattern.
The chosen method is retrained on the full history and forecasts over the horizon.
5. Error measures
Section titled “5. Error measures”Error = forecast − actual.
| Measure | Formula | Reading |
|---|---|---|
| WAPE | Σ |error| ÷ Σ actual | How wrong we were relative to total demand |
| Bias | Σ error ÷ Σ actual | + : forecast systematically high; − : low |
| MASE | mean |error| ÷ mean error of “repeat the previous period” in the training data | Below 1: better than the naive method |
| RMSE | √(mean error²) | Size of a single-period error; used for safety stock and prediction intervals |
Why not MAPE?
Section titled “Why not MAPE?”MAPE divides each period’s error by that period’s demand. When demand is zero the division is undefined; when it is very small the error looks enormous. Example: actual 100, 0, 50; forecast 90, 10, 60.
WAPE = (10 + 10 + 10) / (100 + 0 + 50) = 20%bias = (−10 + 10 + 10) / 150 = +6.7%MAPE = 10 / 0 in the second period → undefinedWAPE on the dashboard
Section titled “WAPE on the dashboard”The dashboard WAPE is the daily-demand-weighted average of the WAPE of product-warehouse rows: Σ (WAPE × daily demand) ÷ Σ daily demand. That way the high percentage error of slow sellers does not distort the overall figure.
6. Prediction interval
Section titled “6. Prediction interval”80% interval = forecast ± 1.2816 × RMSE95% interval = forecast ± 1.9600 × RMSEThe lower bound never goes below zero.
7. Safety stock and ordering
Section titled “7. Safety stock and ordering”The forecast is spread over days: each period’s daily rate is the period forecast ÷ days in the period. The calculation starts from the run date.
lead time demand (LTD) = forecast demand from today to the end of the lead timedaily demand (d) = LTD / lead timedaily error (σd) = RMSE / √(average days per period) (month: 30.4375; week: 7)uncertainty (σLT) = √( L × σd² + d² × σL² )safety stock = z × σLTreorder point = LTD + safety stockz is the standard normal value of the service level (95% → 1.6449). Service level priority: product card → warehouse → Settings. The lead time is at least 1 day.
Ordering details: Order suggestions.
Example
Section titled “Example”Forecast 300 units/month (30-day month), RMSE 60 units/month, lead time 14 days, its deviation 3 days, service level 95%:
d = 300 / 30 = 10 units/dayLTD = 10 × 14 = 140σd = 60 / √30.4375 = 10.875σLT = √(14 × 10.875² + 10² × 3²) = 50.56SS = 1.6449 × 50.56 = 83.2ROP = 140 + 83.2 = 223.2Try this with your own figures in the safety stock calculator.
8. Limitations
Section titled “8. Limitations”- In periods of stock-out, sales fall below demand; the application does not correct lost sales automatically. Such periods pull the forecast down.
- Events such as promotions, price changes and product launches are not modelled separately; if they recurred in the past, seasonal methods capture them partly.
- The prediction interval does not widen from period to period; uncertainty of distant periods may look narrower than it is.
- The safety stock formula assumes normally distributed errors; for very slow-moving products the actual service level may deviate from the target.

