Multivariate forecasting on financial time series with transformer model
The stock market provides an open platform for companies to raise capital for funding necessary operations and expanding their business, which is essential in driving world economic growth. Given its importance for making profitable trading decisions, stock price prediction has always been an acti...
Saved in:
Main Author: | |
---|---|
Other Authors: | |
Format: | Final Year Project |
Language: | English |
Published: |
Nanyang Technological University
2023
|
Subjects: | |
Online Access: | https://hdl.handle.net/10356/166431 |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Nanyang Technological University |
Language: | English |
id |
sg-ntu-dr.10356-166431 |
---|---|
record_format |
dspace |
spelling |
sg-ntu-dr.10356-1664312023-05-01T15:36:14Z Multivariate forecasting on financial time series with transformer model Poh, Jeanette Wen Jun Patrick Pun Chi Seng School of Physical and Mathematical Sciences cspun@ntu.edu.sg Science::Mathematics The stock market provides an open platform for companies to raise capital for funding necessary operations and expanding their business, which is essential in driving world economic growth. Given its importance for making profitable trading decisions, stock price prediction has always been an active area of interest among investors and quantitative researchers. Although various machine learning models have been used extensively for stock prediction, these techniques suffer from several drawbacks which make them unsuitable for modelling financial time series. Another limitation of existing studies is that they focus primarily on single-stock prediction and did not consider the information of other stocks during forecasting. As the prices of multiple assets are often correlated, this approach is insufficient because it disregards the underlying relations between stocks. To address such challenges, this thesis proposes the use of a Transformer for stock price forecasting. Given its impressive performance in Natural Language Processing tasks, the Transformer is adapted for processing similarly sequential elements in time series. At the core of the Transformer are attention mechanisms, which learn the dependencies in a sequence and rank the importance of related elements. Attention eliminates the need for sequential computation, which allows for much shorter training time and more effective handling of extremely long sequences. Furthermore, this paper builds upon prior works by implementing single-output and multi-output prediction scenarios with or without external stock predictors. For every stock, technical indicators were extracted and used as model input together with basic stock information. The proposed Transformer was evaluated on S&P 500 stocks from various sectors and compared with several baseline models, namely the Long Short-Term Memory (LSTM), Support Vector Regression (SVR), Random Forest and Categorical Boosting (CatBoost). Based on the experimental results, using external stock predictors and multi-output prediction do not necessarily guarantee an improvement in performance. However, it is clear that the Transformer achieves superior performance over the baselines, and demonstrates great potential for time series forecasting. Bachelor of Science in Mathematical Sciences 2023-04-28T06:52:09Z 2023-04-28T06:52:09Z 2023 Final Year Project (FYP) Poh, J. W. J. (2023). Multivariate forecasting on financial time series with transformer model. Final Year Project (FYP), Nanyang Technological University, Singapore. https://hdl.handle.net/10356/166431 https://hdl.handle.net/10356/166431 en application/pdf Nanyang Technological University |
institution |
Nanyang Technological University |
building |
NTU Library |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
NTU Library |
collection |
DR-NTU |
language |
English |
topic |
Science::Mathematics |
spellingShingle |
Science::Mathematics Poh, Jeanette Wen Jun Multivariate forecasting on financial time series with transformer model |
description |
The stock market provides an open platform for companies to raise capital for funding necessary operations
and expanding their business, which is essential in driving world economic growth. Given its importance for
making profitable trading decisions, stock price prediction has always been an active area of interest among
investors and quantitative researchers. Although various machine learning models have been used extensively
for stock prediction, these techniques suffer from several drawbacks which make them unsuitable for modelling
financial time series. Another limitation of existing studies is that they focus primarily on single-stock prediction
and did not consider the information of other stocks during forecasting. As the prices of multiple assets are
often correlated, this approach is insufficient because it disregards the underlying relations between stocks.
To address such challenges, this thesis proposes the use of a Transformer for stock price forecasting. Given
its impressive performance in Natural Language Processing tasks, the Transformer is adapted for processing
similarly sequential elements in time series. At the core of the Transformer are attention mechanisms, which
learn the dependencies in a sequence and rank the importance of related elements. Attention eliminates the
need for sequential computation, which allows for much shorter training time and more effective handling of
extremely long sequences. Furthermore, this paper builds upon prior works by implementing single-output and
multi-output prediction scenarios with or without external stock predictors. For every stock, technical indicators
were extracted and used as model input together with basic stock information.
The proposed Transformer was evaluated on S&P 500 stocks from various sectors and compared with several
baseline models, namely the Long Short-Term Memory (LSTM), Support Vector Regression (SVR), Random
Forest and Categorical Boosting (CatBoost). Based on the experimental results, using external stock predictors
and multi-output prediction do not necessarily guarantee an improvement in performance. However, it is clear
that the Transformer achieves superior performance over the baselines, and demonstrates great potential for
time series forecasting. |
author2 |
Patrick Pun Chi Seng |
author_facet |
Patrick Pun Chi Seng Poh, Jeanette Wen Jun |
format |
Final Year Project |
author |
Poh, Jeanette Wen Jun |
author_sort |
Poh, Jeanette Wen Jun |
title |
Multivariate forecasting on financial time series with transformer model |
title_short |
Multivariate forecasting on financial time series with transformer model |
title_full |
Multivariate forecasting on financial time series with transformer model |
title_fullStr |
Multivariate forecasting on financial time series with transformer model |
title_full_unstemmed |
Multivariate forecasting on financial time series with transformer model |
title_sort |
multivariate forecasting on financial time series with transformer model |
publisher |
Nanyang Technological University |
publishDate |
2023 |
url |
https://hdl.handle.net/10356/166431 |
_version_ |
1765213864542076928 |