Stock return prediction using LSTM methods
Huhtamo, Pekka (2021-08-27)
Stock return prediction using LSTM methods
Huhtamo, Pekka
(27.08.2021)
Julkaisu on tekijänoikeussäännösten alainen. Teosta voi lukea ja tulostaa henkilökohtaista käyttöä varten. Käyttö kaupallisiin tarkoituksiin on kielletty.
suljettu
Julkaisun pysyvä osoite on:
https://urn.fi/URN:NBN:fi-fe2021100649552
https://urn.fi/URN:NBN:fi-fe2021100649552
Tiivistelmä
State-of-the-art machine learning methods have outperformed several benchmark models across various applications in recent years, such as speech recognition. Additionally, early evidence in their application to financial market prediction tasks has been promising.
In this thesis, a long short-term memory (LSTM) network is applied to a Finnish equity market prediction task. The sample contains daily returns of a subset of 17 stocks from the OMX Helsinki 25 index. The period considered is from January 2nd, 2000 to December 29th, 2020, with an out-of-sample trading period from the beginning of 2003 to the end of 2020. The statistical models considered predict whether or not a specific stock will outperform the cross-sectional median return in the next day.
The model predictions are used in two distinct equity trading strategies with varying portfolio sizes. The trading strategies considered are pure long-only portfolios and long-short portfolios.
The LSTM neural network model was observed to recognize profitable patterns in selected Finnish equity time-series data. The best LSTM neural network portfolio generated an annualized out-of-sample Sharpe ratio of 1.15.
Overall, both machine learning models — LSTM and random forest (RF) — outperformed the simple logistic regression classifier in terms of prediction accuracy and risk-adjusted returns. Additionally, a statistically significant difference in prediction accuracies was found both between the LSTM and logistic regression models’ accuracies and the RF and logistic regression models’ prediction accuracies. Furthermore, the probability that any model achieved its prediction accuracy by pure chance was found to be practically zero.
In this thesis, a long short-term memory (LSTM) network is applied to a Finnish equity market prediction task. The sample contains daily returns of a subset of 17 stocks from the OMX Helsinki 25 index. The period considered is from January 2nd, 2000 to December 29th, 2020, with an out-of-sample trading period from the beginning of 2003 to the end of 2020. The statistical models considered predict whether or not a specific stock will outperform the cross-sectional median return in the next day.
The model predictions are used in two distinct equity trading strategies with varying portfolio sizes. The trading strategies considered are pure long-only portfolios and long-short portfolios.
The LSTM neural network model was observed to recognize profitable patterns in selected Finnish equity time-series data. The best LSTM neural network portfolio generated an annualized out-of-sample Sharpe ratio of 1.15.
Overall, both machine learning models — LSTM and random forest (RF) — outperformed the simple logistic regression classifier in terms of prediction accuracy and risk-adjusted returns. Additionally, a statistically significant difference in prediction accuracies was found both between the LSTM and logistic regression models’ accuracies and the RF and logistic regression models’ prediction accuracies. Furthermore, the probability that any model achieved its prediction accuracy by pure chance was found to be practically zero.