Transformers Versus LSTMs for Electronic Trading

39 Pages Posted: 17 Oct 2023

See all articles by Paul Bilokon

Paul Bilokon

Thalesians; Imperial College London - Department of Mathematics

Yitao Qiu

Imperial College London - Department of Computing

Date Written: September 20, 2023

Abstract

With the rapid development of artificial intelligence, long short term memory (LSTM), one kind of recurrent neural network (RNN), has been widely applied in time series prediction.

Like RNN, Transformer is designed to handle the sequential data. As Transformer achieved great success in Natural Language Processing (NLP), researchers got interested in Transformer's performance on time series prediction, and plenty of Transformer-based solutions on long time series forecasting have come out recently. However, when it comes to financial time series prediction, LSTM is still a dominant architecture. Therefore, the question this study wants to answer is: whether the Transformer-based model can be applied in financial time series prediction and beat LSTM.

To answer this question, various LSTM-based and Transformer-based models are compared on multiple financial prediction tasks based on high-frequency limit order book data. A new LSTM-based model called DLSTM is built and new architecture for the Transformer-based model is designed to adapt for financial prediction. The experiment result reflects that the Transformer-based model only has the limited advantage in absolute price sequence prediction. The LSTM-based models show better and more robust performance on difference sequence prediction, such as price difference and price movement.

Keywords: LSTM, transformer, econometrics, deep econometrics, time series forecasting

Suggested Citation

Bilokon, Paul and Qiu, Yitao, Transformers Versus LSTMs for Electronic Trading (September 20, 2023). Available at SSRN: https://ssrn.com/abstract=4577922 or http://dx.doi.org/10.2139/ssrn.4577922

Paul Bilokon (Contact Author)

Thalesians ( email )

Suite 309
56 Gloucester Road
London, SW7 4UB
United Kingdom
020 796 57587 (Phone)

HOME PAGE: http://www.thalesians.com

Imperial College London - Department of Mathematics ( email )

South Kensington Campus
Imperial College
LONDON, SW7 2AZ
United Kingdom

HOME PAGE: http://profiles.imperial.ac.uk/paul.bilokon01

Yitao Qiu

Imperial College London - Department of Computing ( email )

180 Queen's Gate
London, SW7 2AZ
United Kingdom

Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Downloads
1,128
Abstract Views
3,068
Rank
40,217
PlumX Metrics