I am currently working on a multivariate LSTM model to forecast stock prices and am getting confused about how this model works.

For univariate, it is straight forward. I have a dataset with only one feature (e.g Closing price) and feed it into the model and it will output one result. To forecast beyond available data, I then perform a loop to forecast $n$ days - assuming time-step is 30 days, I will take the last 30 days to forecast for the first day closing price. To forecast the second day, I will take the last 29 days + 1 forecast value (from first day) to forecast and this repeats for n iteration.

My confusion comes in at multivariate. For multivariate, assuming I have a dataset with 5 features.

  1. I feed 5 features into the model, and the output should be 5 features?
  2. If point 1 is holds, then when I perform forecast beyond available data, will it be the same exact strategy as the univariate?
  3. If my end goal is to forecast Closing price in multivariate, then how should I approach to do this? Is it still right for me to perform point 2 and only get the Closing price element in the result array?

Thank you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.