Why train a forecasting model on one-step-ahead errors when you care about 10-step-ahead accuracy? This is the core motivation behind multistep losses in dynamic models. This has connection with the so-called “direct forecasting strategy”. And here what it is and how to work with it in Python.
Conventional maximum likelihood estimation minimises one-step-ahead errors. It works well in many standard situations and produces quite robust models. But in practice, you are rarely interested in just the next observation. Supply chains operate on lead times. Budgets are planned quarterly. The model you trained on one-step-ahed forecast is not the model that minimises your actual decision-relevant error.
Multistep losses address this directly. Instead of minimising \(\mathrm{MSE}_1\), they minimise errors computed \(h\) steps ahead from every in-sample point. The key theoretical result (Svetunkov et al., 2023) is that this implies *shrinkage* of smoothing parameters towards zero — the model becomes less stochastic, less reactive to noise, and more stable across longer horizons. Shrinkage strength grows with \(h\) and weakens as sample size increases.
ADAM supports several multistep losses, each with a different trade-off:
- MSEh — minimises the \(h\)-step-ahead variance only; strongest shrinkage, simplest interpretation;
- TMSE — sums \(\mathrm{MSE}_j\) for \(j=1,…,h\), i.e. sum of the MSEs between 1 and h steps ahead; balances all horizons but is dominated by longer-horizon errors;
- GTMSE — takes the log of each \(\mathrm{MSE}_j\) before summing; equalises the influence of short and long horizons, milder shrinkage;
- MSCE — minimises cumulative forecast error; directly relevant for inventory decisions with lead time \(h\);
- GPL — the full General Predictive Likelihood; accounts for the entire covariance structure of multistep errors and encompasses all the above.
All of these are accessible in the Python smooth package with a single parameter change. Here is an example of the code with GTMSE:
from fcompdata import AirPassengers from smooth import ADAM model = ADAM(model="AAA", lags=12, loss="GTMSE", h=12) model.fit(AirPassengers.y) model.predict(h=10)
The h parameter sets the horizon over which multistep errors are evaluated during estimation. This allows connecting the loss with the specific decision horizon better. The image in the post shows the ETS model fit and forecasts, when estimated with several different losses, including the conventional one.
One practical note: on small samples, MSEh and MSCE can produce noticeably biased parameter estimates (closer to zero) due to strong shrinkage. GTMSE tends to be a safer default for small samples.
Read more about these and other losses in the ADAM monograph or in the wiki of the package.