Multi-Step Forecasting
One-step models answer tomorrow, while multi-step plans answer the next seven days, and the way you stretch the model decides where errors grow.
Why Does This Exist?
Nobody staffs a warehouse on tomorrow alone. Planners need the next seven days of demand, the grid needs the next 24 hours of load, and a single next-step model cannot answer either. Call the number of future steps the horizon , which means the count of values through you must emit.
Stretching a one-step model across a horizon is a design decision with real costs. Reuse one model and early mistakes become later inputs. Train one model per step and the steps stop agreeing with each other. Emit the whole vector at once and training gets harder as grows.
This page compares the three standard plans on one fixture so you can pick deliberately. For the recurrent model that often produces the vector, see LSTM for forecasting. When each step should carry its uncertainty, continue to probabilistic forecasting.
Think of It Like This
Directing a relay team versus cloning it
You must field runners for three legs. The recursive coach sends one runner, asks where they finished leg one, then starts leg two from that reported spot. A wrong report moves every later leg. The direct coach hires three separate runners who never meet, so each leg starts clean but the baton never actually passes. The joint coach trains one squad to run all three legs as a single rehearsed routine.
The reported spot is the fed-back forecast. The never-meeting runners are the separate models. The rehearsed routine is the multi-output vector. Pick the coach whose failure you can afford.
Where it stops: runners get tired and forecasts do not, while forecasts compound statistical error and runners do not. The analogy covers the error flow, not the training cost.
How It Actually Works
Fix a horizon of and a history of . Assume the one-step rule adds to the last value. All three plans start from the same history and the same rule, and they diverge only in how the three outputs relate.
Recursive trains one model for and iterates. It predicts , feeds back, predicts , feeds that back, predicts . One model, three calls, and a miss at step one shifts every step after it.
Direct trains three models, one per step, all reading the same history. Model one predicts , model two predicts , model three predicts . No forecast becomes an input, so errors never compound, but the three answers can contradict each other because the models never coordinate.
Multi-output trains one model that emits the vector in a single pass. The steps stay consistent because one set of weights produces all of them, at the price of fitting an -dimensional output.
Worked example
Take history with step and horizon . The recursive path is , then , then . Now suppose the true first value turns out to be while the model said . The recursive second step starts from instead of , so the one-unit miss is baked into and carried into . Direct avoids this entirely because its second model never sees the . That single carried unit is the compounding the diagram traces.
Code
This recursive rollout replays the fixture with only the standard library:
def recursive(history: list[float], step: float, horizon: int) -> list[float]: path = list(history) for _ in range(horizon): path.append(path[-1] + step) return path[-horizon:]
print(recursive([10.0, 12.0, 15.0], 2.0, 3)) # -> [17.0, 19.0, 21.0]The output matches the hand trace: 17.0, then 19.0, then 21.0. Pass a history ending in 16.0 instead and the whole vector shifts down by one, which is compounding made visible.
Watch Out For
Judging a 7-day plan by its first-day error
The symptom is a recursive model that looks best on day one and worst on day seven. One-step error rewards the plan that feeds its own outputs back, because step one never sees feedback yet. Score every step separately out to and compare the full curve. If step-one error picks the winner while step-seven error disagrees, trust the horizon average, not the first point.
Leaking the future into direct model features
The symptom is a direct model for step five that is suspiciously accurate. Its training row for accidentally includes an aggregate, such as a weekly mean, computed over days past . Audit every feature timestamp so nothing in comes after . If removing one rolling feature collapses the gap between steps, that feature was the leak.
The Quick Version
- Multi-step forecasting emits through , where is the horizon the planner actually needs.
- Recursive reuses one model and feeds each forecast back, so a one-unit miss at step one shifts every later step.
- Direct trains one model per step with no feedback, so steps never compound but can contradict each other.
- Multi-output emits the whole vector in one pass, keeping steps consistent at the cost of harder training.
- A history of 10, 12, 15 with step 2 gives 17, 19, 21, and the recursive path carries any early miss forward.
- Score the full horizon curve, and audit direct features so nothing past leaks into .