Transformer-based deep learning model for stock return forecasting : Empirical evidence from US markets in 2012–2021
Year: 2022
Type: dissertation
Abstract: A growing number of studies in recent years have deployed various machine learning methods for financial time series analysis. The ability of machine learning methods to deal with complex and nonlinear data sets, as well as the increasing amount of available data and computational capacity, has pushed research further in this direction. While machine learning methods are nowadays widely used for forecasting financial time series, the results have been mixed. The rapid increase in machine learning research has also meant that new and more advanced models are being developed all the time. In many areas where machine learning methods are employed, designs based on the Transformer deep learning model often represent the state-of-the-art. However, the applications of the Transformer model for financial tasks are still in their infancy as only a few studies have been published on the matter. This study aims to investigate the feasibility of a Transformer-based deep learning model for stock return prediction. The feasibility is tested by predicting the daily directional movements of four different US stock indices on an out-of-sample period from the start of 2012 until the end of 2021. Only historical price data is utilized to predict the directional returns with two sets of explanatory variables. The model performance is tested against benchmarks and evaluated using various performance criteria such as prediction accuracy. Moreover, a trading strategy is carried out to reveal possible profitable attributes of the Transformer-based model. The reported classification accuracy over the whole empirical sample for the better Transformer model is 52.52% while LSTM, another deep learning model used as a benchmark, achieves an accuracy of 53.87%. However, the Transformer model manages to defeat all the benchmark models in every other performance metric. When the performances are tested using the trading strategy, the best Transformer model is able to generate an annualized return of 15.7% before transaction costs. The best performing benchmark, a simple buy-and-hold strategy, yields a return of 14.2%. The two tested Transformer models also have the highest Sharpe ratios out of the tested models at 1.063 and 1.061. Nevertheless, after transaction costs are taken into account, none of the tested models beat a simple buy-and-hold strategy in terms of profitability. Although the Transformer model was not able to perform superiorly throughout the sample period, it nevertheless exhibited increased predictive performance over shorter periods. For example, the model seemed to exploit periods of higher volatility as seen during the start of the COVID-19 pandemic. Overall, although the predictive performance of the Transformer model in this study might leave more to be desired, the model undoubtedly has predictive properties which should encourage further research to be executed.
Source: UTUPub (University of Turku)
Author: Päivärinta, Markus
Institution: University of Turku
Language: English
Field: Decision Sciences
Domain: Social Sciences
Open Access status: green
OpenAlex ID: W7062651677
