There is a great blog post about how to use keras stateful LSTM in R to forecast sunspots. I applied it to financial ts data sets, and the problem I am encountering is that some of the forecasting numbers are way off to a degree that are unreasonable.

Therefore, I am wondering if there is an R tutorial of using LSTM for multivariate times series forecasting? I'd like to include variables like opening and closing price because I think that will "normalize" the forecasting values. I found a few tutorials in Python but I have limited experience with it. Maybe it's a time to pick up Python? Any advice or suggestions will be appreciated!


2 Answers 2


I like the Jena data example. In multivariate settings, you only need to generate lookbacks over all X.



I'm dealing with the same issue. I know this post is pretty old but I have found some recent posts that may help: there is a 3-part series on this subject in R studio AI blogs.


It's not perfect, but it answered enough for me to make forward progress on the multivariate complexities.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.