Lighthouse Forecasting
Menu

Synthetic example · version 1

Compare the evidence, not an accuracy badge

One example product, weekly units and a four-week planning horizon. Every observation is invented; the forecasts and errors are computed from the downloadable data.

Three methods. The same held-out weeks.

Training history through 2026-08-31
Forecast origin 2026-09-07

Synthetic weekly demand and four-week forecastsA seasonal baseline, trend and seasonality, and a model using a known promotion are compared with actual synthetic demand. The shaded range uses past forecast errors. Forecasts start on 2026-09-07. All values and error measures are in the tables below.80100120140160units / weekForecast starts07-1308-3109-28
  • Actual
  • Seasonal baseline
  • Trend + seasonality
  • With known promotion
The last four actual observations were excluded from fitting. Green shading is a historical-error band for the context model, explained below.
Final four-week holdout · errors in units per week
MethodMean absolute errorBias (forecast − actual)
Same week last year18.8-18.8
Trend + seasonality5.4+5.3
Trend + seasonality + known promotion4.4+3.2

Lower absolute error means a smaller average miss. Positive bias means overforecasting; negative means underforecasting. Four weeks are too few to establish a reliable winner. This invented series deliberately contains trend, seasonality and a known promotion effect; it is not evidence of likely customer improvement.

All chart values and rolling-test results
Weekly synthetic data and final forecasts
WeekActualBaselineTrend + seasonalWith contextBand
2026-07-13111Historical context; before forecast origin
2026-07-20122Historical context; before forecast origin
2026-07-27118Historical context; before forecast origin
2026-08-03112Historical context; before forecast origin
2026-08-10153Historical context; before forecast origin
2026-08-17129Historical context; before forecast origin
2026-08-24129Historical context; before forecast origin
2026-08-31144Historical context; before forecast origin
2026-09-07136113.0139.1136.9128.3–145.5
2026-09-14132114.0142.0139.8131.2–148.3
2026-09-21145128.0144.8142.6134.0–151.2
2026-09-28139122.0147.5145.3136.8–153.9

Eight earlier non-overlapping four-week rolling tests, refitting at each origin using only prior records (32 predictions):

  • Same week last year: mean absolute error 18.3 units; bias -18.3 units.
  • Trend + seasonality: mean absolute error 7.2 units; bias -0.8 units.
  • Trend + seasonality + known promotion: mean absolute error 5.1 units; bias -0.4 units.

What the example does and does not establish

Inputs and assumptions

The dataset has 104 complete weekly observations and no missing records. Actuals are generated from a deterministic trend, annual seasonal pattern, scheduled promotion indicator and oscillating noise. All future promotion flags are assumed known at each forecast origin. No sales were censored by stockouts.

Methods and evaluation

The baseline repeats the same week 52 weeks earlier. Candidate A fits a linear trend plus annual sine/cosine terms. Candidate B adds the known promotion indicator. Both use ordinary least squares, refit only on the history available at each origin. The last four weeks are held out from fitting and from band calibration; no parameters were tuned on that period.

Uncertainty, not a guarantee

The shaded band is the context forecast plus or minus 8.6 units: the empirical 80th percentile of absolute errors from the 32 earlier rolling predictions. It is a small-sample, pooled historical-error illustration, not a calibrated statistical prediction interval. 4 of the 4 final actuals fall inside it. A real project would check coverage by horizon and use a suitable uncertainty method; an 80% target is not a promise.

Context is separate from a scenario

The model uses promotions scheduled in advance, not events learned from the holdout. A hypothetical future promotion would instead be a scenario assumption. Neither approach guarantees an improvement. Different data can favour the baseline.

Inspect and reproduce

Download synthetic data (CSV) · Computed values (JSON) · Reproduction script (Node.js)

Run the downloaded script with Node.js 20 or later in a new folder. It uses only Node’s standard library and writes synthetic files under public/example. No customer files or network access are required.

Discuss your own planning question