Effect of Price Volatility on LSTM Lookback Windows in Indonesian Banking Stocks - Joan Christina Bahagiono (Engineering, MAthematics and Computer Science Journal (EMACS), 2026)
This study aims to explore how stock price volatility influences the sequence length or also known as lookback window hyperparameter of LSTM. This study uses a comparative approach to determine the relationship between stock prices volatility and the best lookback window to achieve the lowest error rate of an LSTM model in predicting stock prices. Nine selected stocks in the banking sector of Indonesia Stock Exchange were compared, ranging from relatively stable to volatile. The banking sector was used as it contains multiple stocks under the same sector that varies in price movement volatility. An aggregation was also conducted to produce grouped results. The results of this study highlighted the importance of hyperparameter tuning in LSTM especially in the lookback window hyperparameter. Shorter LSTM lookback window is well suited in low volatility stocks, with the lowest mean squared error rate of 0.030782 observed in this study at the 42 trading days lookback period. In contrast to that, highly volatile stocks exhibit a different pattern, where longer lookback period improves LSTM prediction performance, as demonstrated in this study through a 0.016001 mean squared error at the 252 trading days lookback period. The findings imply that high volatility stocks require longer temporal memory in the LSTM to capture complex and irregular price movements, whereas low volatility stocks are better modelled using shorter and more recent information.