4 Strategies for Multi-Step Time Series Forecasting

Time series forecasting is typically discussed where only a one-step prediction is required.

What about when you need to predict multiple time steps into the future?

Predicting multiple time steps into the future is called multi-step time series forecasting. There are four main strategies that you can use for multi-step forecasting.

In this post, you will discover the four main strategies for multi-step time series forecasting.

After reading this post, you will know:

  • The difference between one-step and multiple-step time series forecasts.
  • The traditional direct and recursive strategies for multi-step forecasting.
  • The newer direct-recursive hybrid and multiple output strategies for multi-step forecasting.

Let’s get started.

Strategies for Multi-Step Time Series Forecasting

Strategies for Multi-Step Time Series Forecasting
Photo by debs-eye, some rights reserved.

Multi-Step Forecasting

Generally, time series forecasting describes predicting the observation at the next time step.

This is called a one-step forecast, as only one time step is to be predicted.

There are some time series problems where multiple time steps must be predicted. Contrasted to the one-step forecast, these are called multiple-step or multi-step time series forecasting problems.

For example, given the observed temperature over the last 7 days:

A single-step forecast would require a forecast at time step 8 only.

A multi-step may require a forecast for the next two days, as follows:

There are at least four commonly used strategies for making multi-step forecasts.

They are:

  1. Direct Multi-step Forecast Strategy.
  2. Recursive Multi-step Forecast Strategy.
  3. Direct-Recursive Hybrid Multi-step Forecast Strategies.
  4. Multiple Output Forecast Strategy.

Let’s take a closer look at each method in turn.

Stop learning Time Series Forecasting the slow way!

Take my free 7-day email course and discover data prep, modeling and more (with sample code).

Click to sign-up and also get a free PDF Ebook version of the course.

Start Your FREE Mini-Course Now!

1. Direct Multi-step Forecast Strategy

The direct method involves developing a separate model for each forecast time step.

In the case of predicting the temperature for the next two days, we would develop a model for predicting the temperature on day 1 and a separate model for predicting the temperature on day 2.

For example:

Having one model for each time step is an added computational and maintenance burden, especially as the number of time steps to be forecasted increases beyond the trivial.

Because separate models are used, it means that there is no opportunity to model the dependencies between the predictions, such as the prediction on day 2 being dependent on the prediction in day 1, as is often the case in time series.

2. Recursive Multi-step Forecast

The recursive strategy involves using a one-step model multiple times where the prediction for the prior time step is used as an input for making a prediction on the following time step.

In the case of predicting the temperature for the next two days, we would develop a one-step forecasting model. This model would then be used to predict day 1, then this prediction would be used as an observation input in order to predict day 2.

For example:

Because predictions are used in place of observations, the recursive strategy allows prediction errors to accumulate such that performance can quickly degrade as the prediction time horizon increases.

3. Direct-Recursive Hybrid Strategies

The direct and recursive strategies can be combined to offer the benefits of both methods.

For example, a separate model can be constructed for each time step to be predicted, but each model may use the predictions made by models at prior time steps as input values.

We can see how this might work for predicting the temperature for the next two days, where two models are used, but the output from the first model is used as an input for the second model.

For example:

Combining the recursive and direct strategies can help to overcome the limitations of each.

4. Multiple Output Strategy

The multiple output strategy involves developing one model that is capable of predicting the entire forecast sequence in a one-shot manner.

In the case of predicting the temperature for the next two days, we would develop one model and use it to predict the next two days as one operation.

For example:

Multiple output models are more complex as they can learn the dependence structure between inputs and outputs as well as between outputs.

Being more complex may mean that they are slower to train and require more data to avoid overfitting the problem.

Further Reading

See the resources below for further reading on multi-step forecasts.

Summary

In this post, you discovered strategies that you can use to make multiple-step time series forecasts.

Specifically, you learned:

  • How to train multiple parallel models in the direct strategy or reuse a one-step model in the recursive strategy.
  • How to combine the best parts of the direct and recursive strategies in the hybrid strategy.
  • How to predict the entire forecast sequence in a one-shot manner using the multiple output strategy.

Do you have any questions about multi-step time series forecasts, or about this post? Ask your questions in the comments below and I will do my best to answer.

Want to Develop Time Series Forecasts with Python?

Introduction to Time Series Forecasting With Python

Develop Your Own Forecasts in Minutes

...with just a few lines of python code

Discover how in my new Ebook:
Introduction to Time Series Forecasting With Python

It covers self-study tutorials and end-to-end projects on topics like:
Loading data, visualization, modeling, algorithm tuning, and much more...

Finally Bring Time Series Forecasting to
Your Own Projects

Skip the Academics. Just Results.

Click to learn more.

32 Responses to 4 Strategies for Multi-Step Time Series Forecasting

  1. anthony March 8, 2017 at 10:05 pm #

    Thanks Jason for a wonderful post. Why does your model skips the value at “t”?

    • Jason Brownlee March 9, 2017 at 9:54 am #

      Just a choice of terminology, think of t+1 as t.

      I could have made it clearer, thanks for the note.

  2. Dylan March 14, 2017 at 2:31 am #

    Hi Jason, it is always helpful to read your post. I have some confusion related to Time Series Forecasting.
    There is traffic data (1440 pieces in total, and 288 pieces each day) I collected to predict traffic flow. The data is collected every 5 min in five consecutive working days. I am going to use the traffic data of the first four day to train the prediction model, while the traffic data of the fifth day is used to test the model.
    Here is my question, if I want to predict the traffic flow of the fifth day, do I only need to treat my prediction as one-step forecast or do I have to predict 288-step?
    Look forward to your advice.
    Thanks for your post again.

    • Jason Brownlee March 14, 2017 at 8:25 am #

      Hi Dylan,

      If you want to predict an entire day in advance (288 observations), this sounds like a multi-step forecast.

      You could use a recursive one-step strategy or something like a neural net to predict the entire sequence one a one-shot manner.

      Predicting so many steps in advance is hard work (a hard problem) and results may be poor. You will do better if you can use data as it comes in to continually refine your forecast.

      Does that help?

      • Dylan March 15, 2017 at 1:54 am #

        Yes, your response is very helpful. Thank you very much. Now I realize my prediction is a multi-step forecast.
        Could you recommend me some more detailed materials related to the multi-step forecast, like the recursive one-step strategy or the neural net?
        Now I am reading your post, it is great.
        Thank you for your advice.
        Best regards

        • Jason Brownlee March 15, 2017 at 8:10 am #

          I am working on this type of material at the moment, it should be on the blog in coming weeks/months.

          You can use an ARIMA recursively by taking forecasts as inputs to make the next prediction.

          You can use a neural network to make a multi-step forecast by setting the output sequence length as the number of neurons in the output layer.

          I hope that helps as a start.

      • Patricia July 11, 2017 at 8:18 am #

        Hi Jason,
        Thank you for great posts! they’re awesome!

        I have the same problem as Dylan and decided to use statsmodel’s SARIMAX. It takes some time to do the prediction for the entire next day (288 steps), and have been wondering if I’m doing this wrong or should I use a different approach.
        Currently, I’m looking into LSTM RNN as a possible approach, but not sure.
        The thing is, with my data, I have to predict the entire 288 steps in one shot and detect an anomaly if there’s any, then predict the type of anomaly that occured….

        My question is, am I going in the right direction by looking into LSTM RNN?

        I’m really looking forward into reading your posts on this topic!

        Thanks Jason 🙂

  3. Kunpeng Zhang March 17, 2017 at 12:45 am #

    Yes, I will. Discussing with you is always helpful. Look forward to reading your new post on Time Series Forecast.

  4. Abhishek March 18, 2017 at 4:18 pm #

    Hi Jason, just another brilliant post. Can you show up a working example for first or second method like you have always shown in other tutorials. It would be immense help to a novice like me. Thanks…

    • Jason Brownlee March 19, 2017 at 6:09 am #

      I do hope to have many examples on the blog in the coming weeks.

  5. mary March 31, 2017 at 4:57 am #

    Thank you Jason for your wonderful articles ! you are a life saver!
    But I suppose you did a mistake in the example for number2 and 3. both has the same value as
    prediction(t+1) = model1(obs(t-1), obs(t-2), …, obs(t-n))
    prediction(t+2) = model2(prediction(t-1), obs(t-2), …, obs(t-n))

    I believe that one of them should be
    prediction(t+2) = model2(prediction(t+1), obs(t-1), …, obs(t-n-1))

    • Jason Brownlee March 31, 2017 at 5:59 am #

      Hmmm, I guess you’re right. I was thinking from the frame of the second prediction rather than the frame of both predictions.

      Fixed.

  6. Fatima Abu Salem April 7, 2017 at 3:29 pm #

    Hello Jason,

    What kind of Multiple output models would you recommend if we are opting for the fourth strategy?

  7. Masum May 13, 2017 at 8:20 pm #

    Sir,

    Would you please come up with a blog where we would love to see all these strategies have been applied to an example (dataset) and their result comparisons.

    Would you please?

    • Jason Brownlee May 14, 2017 at 7:26 am #

      Perhaps in the future, thanks for the suggestion.

      • masum May 22, 2017 at 10:12 pm #

        sir,
        would you be kind enough to post soon?

        I am stuck with my theoretical knowledge need to apply on my data to see the result and their comparative analysis.

  8. Hans June 12, 2017 at 12:40 am #

    What is a decent one-step prediction of unseen data? How would it looks like?

    Let’s say I have 100 rows in a data set and do the following in R:

    I write ‘=’ instead of the arrows because of the forum parser:

    1. I split the 100 rows of raw data in 99 training rows and 1 testing row:

    inTrain=createDataPartition(y=dataset$n12,p=1,list = FALSE)

    training=dataset[inTrain-1,];
    testing=dataset[-inTrain+1,]

    2. I train the model:

    modFit=train(n12~., data=training, method = ‘xxx’)

    3. I get the final model of Caret

    finMod<-modFit$finalModel

    4. I predict one step with the final model of the training and the one row of testing.

    newx=testing[,1:11]
    unseenPredict=predict(finMod, newx)

    Now, do I have a decent prediction of one step unseen data in point 4 ???

    And why there are libraries like forecast for R, if everything can have been coded to a one-step forecast by default?

    https://github.com/robjhyndman/forecast/

    • Jason Brownlee June 12, 2017 at 7:09 am #

      Sorry, I don’t have examples of time series forecasting in R, I cannot offer good advice.

  9. Hans June 12, 2017 at 6:18 pm #

    I know there is also the option to use the time series object(s) in R.
    But could you answer my question in general?

  10. Hans June 14, 2017 at 1:57 am #

    I don’t understand the difference between regression forecast and time series forecast.
    Or what are the benefits from each over the other.

    • Jason Brownlee June 14, 2017 at 8:47 am #

      A time series forecast can predict a real value (regression) or a class value (classification).

  11. Leonildo June 16, 2017 at 10:35 am #

    Hello Jason,

    How to prepare dataset for train models using with Direct Multi-step Forecast Strategy ?

    For the serie: 1,2,3,4,5,6,7,8,9

    Model 1 will forecast t+1 using window of size 3 , then the dataset would be:
    1,2,3->4
    2,3,4->5
    3,4,5->6
    4,5,6->7
    5,6,7->8
    6,7,8->9

    Model 2 will forecast t+2 using window of size 3 , then the dataset would be:
    1,2,3->5
    2,3,4->6
    3,4,5->7
    4,5,6->8
    5,6,7->9

    Model 3 will forecast t+3 using window of size 3 , then the dataset would be:
    1,2,3->6
    2,3,4->7
    3,4,5->8
    4,5,6->9

    and so on. Is it right ? Thanks

    • Jason Brownlee June 17, 2017 at 7:18 am #

      Great question.

      For the direct approach, the input will be the available lag vars and the output will be a vector of the prediction.

      I can see that you want to use different models for each step in the prediction.

      You could structure it as follows:

      Try many approaches and see what works best on your problem.

      I hope that helps.

      • Leonildo June 17, 2017 at 10:17 am #

        thank you so much! This answers my question.

Leave a Reply