Skip to content
ML Academy

Time series and forecasting · insight-1248

Add a change-of-slope regressor when the growth rate shifts but the level does not jump

Evidence type
documented fact
Difficulty
medium
Roles
Data scientist
Industries
aviation, telecom, retail

Summary: situation, action, reason, boundary

  1. Situation

    A competitor opens a route on a known date in 2024 and market volume does not drop at once; the growth rate slows from that date.

  2. Action

    Add a hinge term that is zero before the known date and counts periods after it, keep the number of knots small and tied to documented events, forecast with the last segment, and compare against step-only and post-break-only models on origins after the break.

  3. Reason

    A piecewise linear trend lets the slope change at a knot, with the hinge coefficient giving the change in slope; FPP3 warns that freely chosen knots overfit.

  4. Boundary

    Policy, capacity or competitor changes that alter growth rather than level.

Symptom or risk

A step dummy produces a jump that did not happen, and one straight trend averages the old and new slopes, so forecasts after the date are too high.

Exceptions

If the date of the change is unknown or estimated from the same data, any test on that data is optimistic.

Trade-offs

Extrapolating the last segment forever assumes the new slope persists.

Pitfalls

Adding knots until the in-sample fit is smooth.

Lessons and concepts

Claims and their sources

  • FPP3 treats a change of slope with a piecewise linear trend whose knots are the points where the slope can change, and notes that choosing the number and position of knots can be difficult and somewhat arbitrary, and that subjective knot choice can lead to over-fitting.

    Forecasting: Principles and Practice (3rd edition)