A Comparative Study of LSTM Variants in Prediction for Tesla’s Stock Price

Long short-term memory (LSTM) is widely used in the stock market to train the prediction model and forecast future stock prices. Applying the LSTM method to research may incur some problems and facilitate the improvement of the method. Therefore, many LSTM variants are put forward under different circumstances. This paper surveys four LSTM variants, including Vanilla, Stacked, Bi-directional, and CNN LSTM on two different data sets regarding Tesla's stock price. Two data sets mentioned in this paper represent different stock types. To be more specific, data set 1 refers to stocks with a single long-term trend, while data set 2 can be seen as an example of stocks with more complexity. The result shows that the Vanilla LSTM reaches the highest prediction accuracy on the data set without any irregular shift in the long-term trend. CNN LSTM also provides decent predictions for the stock price. Otherwise, the Stacked LSTM performs the best for stock prediction. Bi-LSTM and CNN LSTM are also suitable for stock forecasting in more complicated situations. The change in preference for model selection proves that a company's operation situation and market circumstances also influence the prediction performance of LSTM variants.