Forecasting Notebook · SCHM 6224 companion
Interactive scrollytelling course

Forecasting Is Not One Formula

Level, trend, and seasonality are different demand structures. This course keeps them separate, compares them only when useful, and builds the complete workflow from forecast definition to holdout evaluation, Excel implementation, and SAS Studio code.

Teaching schematicCalculated from included dataEditable and user-generatedRepresentative software output

Keyboard: Space play/pause, step, R reset. The shortcuts are ignored while typing in a field.

Stable level

Variation around a roughly constant mean.

Trend

A persistent direction of change over time.

Seasonality

A recurring pattern tied to the calendar interval.

1 · Frame the problem before calculating

Forecast Object and Information Set

A method cannot be judged until the forecast object, users, horizon, aggregation level, data availability, and decision context are explicit.

Teaching schematic

Forecast object

Event outcome: timing known, outcome uncertain.
Event timing: outcome known, timing uncertain.
Time series: historical observations projected into future periods.

Teaching schematic

Information set

Univariate: only the series’ own history.
Multivariate: adds predictors such as price, promotion, weather, or economic variables.

Teaching schematic

Forecast statement

Point: one number.
Range: an interval.
Density: a probability distribution. More information can support richer decisions, but is harder to communicate.

Define this course’s forecast

2 · Identify the time-series structure

Three Patterns, Three Forecasting Problems

Moving averages and simple exponential smoothing are level methods. A trend requires an explicit trend component. Recurring calendar behavior requires a seasonal component. Treating all three as interchangeable creates systematic lag or repeated seasonal error.

Stable level: begin with a baseline

A naïve forecast is the minimum benchmark: next period equals the latest observed demand. A more complex process must beat a reasonable baseline to demonstrate value.

Level: average recent noise

A short moving average reacts quickly but remains noisy. A longer window is smoother but slower. Neither is designed to extrapolate a persistent trend.

Trend: watch a level model lag

Simple exponential smoothing can respond to change, especially with high alpha, but its multi-step forecast remains flat. A rising series therefore exposes the method’s structural mismatch.

Trend: estimate the slope explicitly

Time-series regression models demand as an intercept plus change per period. The slope extends the direction into the holdout horizon.

Seasonality: identify the repeating clock

Multiplicative seasonal indices measure demand relative to an estimated trend. Each month receives a factor above or below 1.0.

Level + trend + seasonality

Holt-Winters updates level, trend, and seasonal factors each period. It is not “better” by definition; it is appropriate only when those components are present and stable enough to extrapolate.

Calculated from included data

Stable level · Naïve baseline

Training actualHoldout actual (dashed)Fixed-origin forecastForecast origin
3 · Data workspace

Editable Monthly Demand Dataset

The included workbook has 60 monthly observations per series: 48 training periods and a 12-period holdout. Edit any observation or upload a CSV; all methods, metrics, charts, and exercises recalculate immediately.

Accepted: date,demand or date,level,trend,seasonality. At least 24 rows; the last 20% becomes holdout.
4 · Calculate, animate, and compare

Forecasting Method Laboratory

Select a method, adjust its parameters, move the forecast origin, and reveal calculations period by period. The holdout evaluation always fits only the training data.

Calculated from included data

Calculated from included data

Formula and numerical substitution

Calculated from included data

Training residuals

Residual = actual − one-step forecast. Persistent same-sign errors indicate bias; patterns indicate structure the model has not captured.

Calculated from included data

Holdout metrics

Editable and user-generated

Spreadsheet-style calculation grid

Cells reveal in sequence as the origin moves. Excel formulas use the visible worksheet convention: column A = period, B = actual, C = forecast.

5 · Translate the same operation across tools

Excel–SAS Equivalence

The mathematics is the method. Excel and SAS are implementations. This panel shows the selected operation, a copy-ready Excel expression, copy-ready SAS Studio code, and the value calculated in the browser.

Representative software output

Excel implementation notes

Representative software output

SAS Studio examples


      

Instructional example only. The browser does not execute SAS. The values in the SAS-style output below are calculated by this page from the included or edited dataset.

Representative software output

SAS-style performance summary

6 · Evaluate honestly

Train, Holdout, Bias, Accuracy, and Error Structure

A low fitted error is not proof of future accuracy. All model rankings below use a fixed-origin forecast created from training observations only and compared with the separated holdout.

Formula notebook

Error and performance formulas

Here, n is the number of evaluated periods. Error follows the course convention: actual minus forecast.

Forecast error

Positive: underforecast. Negative: overforecast.

Cumulative forecast error

Running signed error; persistent drift signals bias.

Mean forecast error

Average signed error; a bias measure, not an accuracy measure.

Mean absolute deviation

Average error magnitude in the original demand units.

Mean squared error

Squares errors, so large misses receive more weight.

Root mean squared error

Returns squared-error performance to the original demand units.

Mean absolute percentage error

Undefined at zero actual demand and unstable when actual demand is near zero.

Tracking signal

Monitors cumulative signed error relative to typical absolute error.

MAD-based forecast value added

Positive: the new process step reduced error. Negative: it made the forecast worse.

Calculated from included data

Error-contribution heatmap

Teaching schematic

Why fitting and evaluation must be separated

Data leakage: using holdout observations to choose parameters or compute seasonal factors gives the model information that was unavailable at the forecast origin.

The workflow is: fit on training data → freeze the model → forecast the holdout → compare forecast with actual → select the method → refit the selected method on all known data for a future forecast.

Calculated from included data

Method-comparison scorecard

No universal winner is declared. Each column ranks a different objective. Rank 1 is best within that criterion and current dataset. Accuracy uses holdout RMSE; bias uses absolute holdout MFE; responsiveness compares forecast changes with actual holdout changes; stability uses the standard deviation of forecast changes; interpretability is an explicit teaching rubric rather than a statistical estimate.

7 · Parameter sensitivity

Responsiveness Versus Stability

A high alpha puts more weight on the newest observation. A longer moving-average window spreads weight over more periods. Both choices alter how quickly forecasts move and how much noise they transmit.

Alpha experiment

Moving-average window experiment

8 · Compare each process step with doing less

Forecast Value Added Ladder

Forecast Value Added asks whether a step improves performance relative to a prior baseline. Here, positive FVA means a reduction in holdout MAD relative to the previous step.

Calculated from included data

Naïve → statistical → judgmental adjustment

A judgmental override is not automatically value-adding. It must be evaluated against the unadjusted statistical forecast and the naïve baseline.

9 · Select by structure and decision need

Model-Selection Decision Tree

This is a teaching guide, not an automated guarantee. Data quality, structural breaks, intermittent demand, causal information, and business loss still require judgment.

10 · Failure modes

Eight Common Forecasting Errors

Each error can invalidate a technically correct formula.

1. Data leakage

Using holdout values, future promotions, or future seasonal ratios while fitting the model.

2. Incorrect time order

Sorting by demand instead of date, or reversing the series before applying lags.

3. Inconsistent intervals

Mixing daily, weekly, and monthly observations without aggregation rules.

4. Missing observations

Silently compressing the calendar so a two-month gap appears to be one period.

5. Inappropriate seasonality

Using season length 12 because the data are monthly without confirming a repeated annual pattern.

6. Overfitting

Selecting parameters on the same observations used to report performance.

7. Unexamined bias

Reporting MAD or RMSE while ignoring persistent underforecasting or overforecasting.

8. Metrics without context

Choosing a model by the smallest error without considering loss, horizon, responsiveness, stability, and operating consequences.

11 · Practice

Short Graded Exercises

Use the hints only after attempting the question. Worked solutions are concise and tied to the course conventions.