AI FUNDAMENTALS AND EDUCATION · KOV AI KNOWLEDGE

Time-series forecasting for learners: how the underlying process works

Time-series forecasting estimates what may happen next by studying observations recorded over time. The observations might represent daily sales, hourly energy use, weekly website

Discuss your project ↗

Time-series forecasting: how the underlying process works

Time-series forecasting estimates what may happen next by studying observations recorded over time. The observations might represent daily sales, hourly energy use, weekly website visits, monthly demand or annual operating costs. The aim is not to predict the future with certainty. It is to produce a reasoned estimate, understand its uncertainty and use it to support a decision.

This guide explains the process from the first question through data preparation, model selection, evaluation and ongoing use. It is written for learners who want to understand the workflow rather than memorise a list of algorithms.

1. Begin with a decision, not an algorithm

A forecasting project should start with the decision that the forecast will inform. For example:

  • A retailer may need to decide how much stock to order for the next four weeks.
  • A facilities team may need to estimate electricity demand for tomorrow.
  • A finance team may need a cash-flow outlook for the next quarter.
  • A service operation may need to plan staffing for expected contact volumes.

These are different problems. They have different time horizons, costs of error and data requirements.

Write down the target variable, the unit of measurement, the entity being forecast and the time interval. A useful problem statement might be: “Estimate daily unit sales for each store for the next 28 days so the replenishment team can plan orders.”

Also decide how frequently the forecast will be refreshed and who is responsible for acting on it. A technically accurate forecast has limited value if it arrives after the relevant decision has been made.

2. Understand what makes data a time series

A time series is a sequence of observations arranged in time order. Each record should have a timestamp and a measured value. Depending on the problem, it may also include identifiers such as product, location, customer segment or machine.

The time interval matters. Hourly observations should not be treated as though they were daily observations. Check whether timestamps use a consistent time zone, whether daylight-saving changes apply and whether the intervals are regular.

A simple example is daily demand:

DateUnits sold
Monday42
Tuesday47
Wednesday45
Thursday53
Friday61

The sequence may contain useful structure, but five observations are not enough to establish a reliable weekly pattern. A learner should resist drawing strong conclusions from a short sample.

3. Explore the main patterns

Before fitting a forecasting model, inspect the history. Several kinds of behaviour may appear.

Level

The level is the typical magnitude around which observations vary. A series with daily demand near 50 units has a different level from one near 5,000 units.

Trend

A trend is a persistent upward or downward movement over time. Growth may reflect expanding demand, while a decline may reflect a shrinking customer base or a product reaching the end of its lifecycle.

Seasonality

Seasonality is a pattern that repeats at a known calendar frequency. Examples include higher retail activity in certain months, weekday-versus-weekend differences or recurring daily electricity peaks.

Cycles

Cycles are longer-term rises and falls that do not necessarily repeat at a fixed interval. Economic and industry cycles are examples. Their timing and duration may be difficult to estimate.

Irregular variation and structural changes

Noise is short-term variation that the model may not be able to explain. A structural change is different: it occurs when the process generating the data changes, perhaps because of a new pricing policy, a supply disruption, a system migration or a major market event.

Plot the series and, where useful, compare it with calendar variables and known business events. A visual inspection is a starting point, not a substitute for statistical testing or domain knowledge.

4. Prepare the data carefully

Data preparation often determines whether a forecasting exercise is useful. Check the following before modelling:

  1. Missing timestamps: identify gaps and determine whether they represent outages, closures or collection failures.
  2. Duplicate records: establish the correct aggregation rule instead of deleting duplicates blindly.
  3. Missing values: investigate why values are absent. Imputation may be appropriate in some cases, but it can also hide meaningful events.
  4. Outliers: distinguish data errors from genuine spikes, promotions, emergencies or unusual demand.
  5. Changing definitions: confirm that the meaning of the measured variable has remained consistent.
  6. Granularity: choose an interval that matches the decision. Extremely detailed data can add noise without improving the decision.
  7. Data leakage: ensure that every feature used for a forecast would actually have been available at the time the forecast is made.

For example, a model predicting next week's sales must not use a sales total that is only calculated after that week has ended. This would make historical test results look better than real-world performance.

5. Establish a baseline

A baseline is a simple forecasting method used as a reference point. It helps answer an important question: does a more complex model improve on a reasonable simple approach?

Common baselines include:

  • Last-value forecast: use the most recent observation as the next forecast.
  • Seasonal naïve forecast: use the value from the corresponding period in the previous season, such as the same weekday last week.
  • Historical average: use an average calculated from an appropriate historical window.
  • Moving average: use the average of a recent set of observations.

The right baseline depends on the data and decision. A seasonal naïve method can be surprisingly difficult to beat when the series has a stable repeating pattern. Record baseline performance before testing more sophisticated methods.

6. Select an approach that matches the problem

There is no universally best forecasting algorithm. Selection depends on the amount and quality of history, seasonality, explanatory variables, forecast horizon, update frequency and operational constraints.

Statistical methods

Methods such as exponential smoothing and ARIMA-family models can be useful for structured time series. They offer established ways to represent trends, seasonal patterns and autocorrelation. Their assumptions and limitations still need to be checked.

Machine-learning methods

Tree-based models and other machine-learning approaches can use calendar features, historical lags and external variables. They may be helpful when multiple explanatory factors interact, but feature engineering and time-aware validation are essential.

Deep-learning methods

Neural forecasting methods can be useful for some large-scale or complex problems, particularly when many related series and substantial data are available. They generally require careful training, monitoring and infrastructure. More complexity does not automatically mean better forecasts.

Human and hybrid approaches

Domain experts may know about planned closures, promotions, policy changes or supply constraints that are not present in historical data. A hybrid process can combine a statistical forecast with documented human adjustments. Adjustments should be recorded so their impact can be evaluated later.

7. Create features without looking into the future

A feature is an input used by a forecasting model. Common time-series features include:

  • Lag values, such as demand one day or one week earlier.
  • Rolling statistics, such as a trailing seven-day average.
  • Calendar variables, such as weekday, month or public-holiday indicators.
  • Known future events, such as a scheduled promotion or planned maintenance.
  • External variables, such as weather forecasts, when they are relevant and available at prediction time.

Every feature must respect the forecast origin: the moment when the forecast is produced. A rolling average for a forecast issued on Tuesday must only use information available by Tuesday. Future-known calendar dates can be valid inputs, but future observed sales cannot.

8. Train and test in chronological order

Randomly splitting time-series rows into training and test sets can cause information from the future to leak into the past. Instead, preserve chronological order.

A simple approach is:

  1. Train on an earlier period.
  2. Validate on a later period to compare candidate methods.
  3. Hold out a final period for an unbiased evaluation.
  4. Where appropriate, use rolling-origin or walk-forward evaluation, repeatedly training on past data and testing on the next period.

The evaluation design should resemble the way forecasts will be produced in operation. If the production system is retrained every month, the test process should reflect that schedule where practical.

9. Measure errors in a way that reflects the decision

No single metric explains every forecasting problem.

  • MAE (mean absolute error) reports the average absolute difference between forecasts and actual values. It is relatively easy to interpret in the original unit.
  • RMSE (root mean squared error) gives greater weight to large errors.
  • MAPE (mean absolute percentage error) expresses error as a percentage, but can behave badly when actual values are zero or close to zero.
  • WAPE (weighted absolute percentage error) can be useful for aggregated demand, though its interpretation depends on the total actual volume.
  • Bias indicates whether forecasts tend to be systematically too high or too low.

Compare metrics with the baseline and examine errors by product, location, season and forecast horizon. An average score can conceal a serious weakness in a particular segment.

The cost of errors is also important. Over-forecasting may create excess inventory; under-forecasting may cause lost sales. A decision-focused evaluation should consider these consequences, not just mathematical error.

10. Produce a forecast with uncertainty

A point forecast is one estimated value. It should not be presented as a guaranteed outcome. Where the method supports it, provide prediction intervals or other uncertainty estimates.

For example, a forecast might estimate demand at 500 units while showing a range that reflects plausible variation. The range is not a promise that the actual value must fall inside it. Its reliability depends on the method, assumptions and whether the underlying process remains reasonably similar to the historical data.

Uncertainty usually increases as the forecast horizon extends. Communicate the horizon, assumptions, data cut-off and known limitations alongside the result.

11. Put the forecast into a controlled workflow

A practical forecasting workflow includes more than model training:

  1. Collect and validate source data.
  2. Generate features using information available at the forecast origin.
  3. Run the approved model and create forecasts.
  4. Check for missing outputs, implausible values and unexpected changes.
  5. Present results with units, dates, horizon and uncertainty.
  6. Route the forecast to the person or system responsible for the decision.
  7. Record the forecast, subsequent actual result and any human adjustment.
  8. Review performance on a defined schedule.

For consequential decisions, define escalation rules. A forecast outside an agreed range, a sudden data-quality failure or a material model-performance decline may require human review before action is taken.

12. Monitor performance after deployment

Forecasting is not a one-time exercise. Data distributions and business processes change. Monitor error and bias over time, compare results with the baseline and investigate sudden deterioration.

Useful monitoring questions include:

  • Is the source data arriving on schedule?
  • Have definitions, systems or measurement processes changed?
  • Are forecast errors increasing for particular segments?
  • Are human adjustments improving or worsening outcomes?
  • Does the model still outperform the baseline?
  • Has the business decision or cost of error changed?

Retraining should follow a documented policy. Retraining too frequently can add operational complexity; retraining too slowly can leave a model using outdated relationships. The right cadence depends on how quickly the underlying process changes.

13. Common mistakes learners should avoid

  • Treating correlation as proof that one variable causes another.
  • Choosing a complex model before understanding the data.
  • Randomly splitting observations and allowing future information into training.
  • Ignoring seasonality or changes in measurement.
  • Reporting only one aggregate metric.
  • Treating a point estimate as certain.
  • Failing to compare against a simple baseline.
  • Deploying a model without an owner, monitoring or an exception process.
  • Assuming historical relationships will continue unchanged.

A good forecasting project makes assumptions visible and tests them. It does not hide uncertainty behind technical terminology.

14. A practical learning exercise

Choose a public or synthetic dataset with regularly spaced observations. Select one target variable and define a forecast horizon. Then:

  1. Plot the historical series.
  2. Identify possible trend, seasonality and unusual events.
  3. Check timestamps, missing values and duplicates.
  4. Build a naïve or seasonal-naïve baseline.
  5. Create a chronological train/test split.
  6. Evaluate with MAE and at least one complementary metric.
  7. Compare a second method with the baseline.
  8. Inspect errors across the forecast horizon.
  9. Write down what could make the model fail in real use.

Keep a record of the data period, transformations, model settings and evaluation method. This makes the exercise reproducible and helps distinguish genuine improvement from accidental results.

15. Questions to ask before using a forecast

  • What decision will this forecast support?
  • What is the target, unit, interval and forecast horizon?
  • Is the historical data sufficiently complete and consistent?
  • What baseline should the model beat?
  • Does the evaluation resemble real forecasting conditions?
  • How costly are over-forecasting and under-forecasting?
  • Who reviews unusual results?
  • How will performance and data quality be monitored?

If these questions cannot be answered, the next step is usually to clarify the problem and data rather than immediately selecting a model.

How KOV can support a forecasting initiative

KOV can help an organisation assess a forecasting use case, map the people, data and systems involved, identify feasible technical options and define a scoped implementation. Where appropriate, the work may include workflow design, approved-tool integration, human review, monitoring and measurement against agreed business objectives.

A responsible assessment should establish feasibility and constraints before recommending a build. It should not assume that every forecasting problem requires AI or that a particular model will deliver a predetermined result.

Further verification and editorial notes

Before publication, an editor should add and verify authoritative references for forecasting concepts, model evaluation, uncertainty estimation and any named software or service capabilities. Product features, prices, API access, regulations and platform policies should be checked against current official documentation, with the verification date recorded.

This article is educational material, not a guarantee of forecast accuracy or a substitute for professional statistical, financial, operational or regulatory advice.

PUT KNOWLEDGE INTO PRACTICE

Need help applying this to your business?

KOV can assess your current process, systems and requirements, then help define a practical AI strategy, integration or implementation plan.

Discuss this with KOV ↗