LSTM-based Directional Stock Price Forecasting for Intraday Quantitative Trading

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: Deep learning techniques have exhibited remarkable capabilities in capturing nonlinear patterns and dependencies in time series data. Therefore, this study investigates the application of the Long-Short-Term-Memory (LSTM) algorithm for stock price prediction in intraday quantitative trading using Swedish stocks in the OMXS30 index from February 28, 2013, to March 1, 2023. Contrary to previous research [12, 32] suggesting that past movements or trends in stock prices cannot predict future movements, our analysis finds limited evidence supporting this claim during periods of high volatility. We discover that incorporating stock-specific technical indicators does not significantly enhance the predictive capacity of the model. Instead, we observe a trade-off: by removing the seasonal component and leveraging feature engineering and hyperparameter tuning, the LSTM model becomes proficient at predicting stock price movements. Consequently, the model consistently demonstrates high accuracy in determining price direction due to consistent seasonality. Additionally, training the model on predicted return differences, rather than the magnitude of prices, further improves accuracy. By incorporating a novel long-only and long-short trading strategy using the one-day-ahead predictive price, our model effectively captures stock price movements and exploits market inefficiencies, ultimately maximizing portfolio returns. Consistent with prior research [14, 15, 31, 32], our LSTM model outperforms the ARIMA model in accurately predicting one-day-ahead stock prices. Portfolio returns consistently outperforms the stock market index, generating profits over the entire time period. The optimal portfolio achieves an average daily return of 1.2%, surpassing the 0.1% average daily return of the OMXS30 Index. The algorithmic trading model demonstrates exceptional precision with a 0.996 accuracy rate in executing trades, leveraging predicted directional stock movements. The algorithmic trading model demonstrates an impressive 0.996 accuracy when executing trades based on predicted directional stock movements. This remarkable performance leads to cumulative and annualized excessive returns that surpass the index return for the same period by a staggering factor of 800.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)