AComNN: Attention enhanced Compound Neural Network for financial time-series forecasting with cross-regional features
Introduction
Due to the volatile, nonlinear, complicated, and chaotic characteristics of the financial market, accurately forecasting the trend of the financial time-series has always been challenging [1]. In recent years, a series of well-designed machine-learning-based trading systems emerge for assisting investors or speculators in identifying financially rewarding stocks and exercising their ownership [2], [3].
Previous traditional studies mainly adopt some univariate time-series models for the prediction in the financial market, such as AutoRegressive Moving Average model (ARMA) [4], AutoRegressive Integrated Moving Average model (ARIMA) [5], [6], [7] and Generalized AutoRegressive Conditional Heteroskedast (GARCH) [8]. However, only considering the influence of its historical behaviors on future movements of the price, the univariate model structure and their simple market pattern assumptions lead to the low financial forecasting capability in the practical application.
Apart from the traditional time-series models, machine learning models also have been adopted in the financial time-series forecasting for years due to their more substantial capability of learning, ease of interpretability, and absence of the presumption, such as Support Vector Machine (SVM) [9], [10], Support Vector Regression (SVR) [11], Logistic Regression (LR) [12], Random Forest (RF) [13], eXtreme Gradient Boosting (XGBoost) [14], Decision Tree (DT) [15] as well as a series of ensemble models of stacking [16] and bagging [17].
In recent years, deep learning has been widely applied to various research fields such as pattern recognition, image classification, and autopilot, which obtained great success. Because of their robust fitting and nonlinear mapping capability, researchers also have designed various deep learning models to implement the forecasting in the financial market, such as Long Short-Term Memory (LSTM) [2], [18], Convolutional Neural Network (CNN) [19], Artificial Neural Networks (ANN) [20], Graph Convolutional Neural Network (GCNN) [21] and other hybrid neural networks [22], [23], [24], [25].
Nevertheless, two issues suppress the forecasting capability of the above techniques. These are — (1) most of the previous studies of financial market prediction only focus their features on the relationship of inter-markets restricted in one region or even on a single targeting market, obstructing crucial information transmission from the outside market, i.e., information insufficiency. (2) Besides, their models are unable to capture the crucial hidden patterns behind the financial time-series across areas, due to the lack of corresponding adaptation to the multi-regional features, i.e., structural deficiency.
Therefore, in this work, we adopt the Hang Seng Index (HSI) trend prediction task by taking as an example to solve the above two issues. For the information insufficiency, we adopt cross-regional features as the initial input from two perspectives. On the one hand, we collect the technical indicators extracted from the Financial Times Stock Exchange 100 Index (FTSE 100), Standard & Poor’s 500 (S&P 500) and HSI in the area of London, New York, and Hong Kong respectively. On the other hand, we collect other highly associated economic indicators such as macro-economic indicators, commodity indicators, and currency exchange indicators obtained from regions of the U.K., the U.S., and China.
For the structural deficiency issue, we propose a novel Attention enhanced Compound Neural Network (AcomNN) for extracting features from multiple sources, which is constructed of the steps of ANN, LSTM, and self-attention in order. The ANN step is responsible for preliminarily extracting semantics from each region and uniform their feature dimensions. The LSTM step horizontally further transfers the refined semantics among regions according to their time-series relation on time zone. Finally, the self-attention step can dynamically focus on the decisive parts of regions for the weights allocation, thereby progressively capturing the time-zone-dependent context behind the financial time-series across regions with multiple filters.
In the experimental stage, we evaluate the AComNN on the HSI prediction with cross-regional features collected from Apr. 2003 to Dec. 2019. The experimental result demonstrates that the highest average accuracy for the one-day ahead HSI trend prediction can up to 60.81%. Compared with the state-of-the-art baselines, our AComNN outperforms them on average over 13%, simultaneously with a relatively very low standard deviation of 0.0355. Additionally, we also implement the trading simulation based on the trading signal provided by the AComNN. The final accumulative return during the simulation can up to 35.04% on average, showing that the performance of the AComNN based investment advisory system is highly competitive and practical in the real world.
The main contributions of our work are as follows:
- 1.
We mitigate the information insufficiency by integrating the cross-regional features of multiple stock markets and economic entities that constitute the raw features.
- 2.
We propose a fine-designed Attention enhanced Compound Neural Network (AcomNN), which can progressively capture the time-series relation characteristics and dynamically allocate attention for cross-regional features in each time zone.
- 3.
We explore the performance of AComNN under different feature smoothing and forecasting windows configuration. Also, we re-implement three state-of-the-art financial forecasting models [16], [19], [22] to compare with the proposed AComNN, and the experimental results prove that our proposed AComNN achieves an encouraging result among the baselines.
The rest of the paper is organized as follows: Section 2 summarizes the related literature concerning the financial time-series forecasting. Section 3 presents the associated data collection and preparation. Section 4 elaborates on the model construction method. Section 5 demonstrates the experimental design. Section 6 reports the experimental results. Section 7 discusses the whole experiment in forecasting capability and trading simulation. Section 8 discusses the threats to validity of this work. Finally, Section 9 concludes the paper and outlines the future work.
Section snippets
Feature study in financial markets
Since the price variation in the financial market is highly fluctuating and full of unexpected noises, features studies including determinant factors selection and dimension reduction play a critical role in effectively boosting the accuracy for financial market prediction and mitigating overfitting in training.
In [26], Garefalakis et al. study the determinant factors that influence HSI tendency and conclude that S&P 500 in the U.S. stock exchanges, gold, and crude oil prices play a substantial
Data collection and preparation
Regionally, our cross-regional features can be divided into three parts, i.e., from the U.K., the U.S., and China. The data comprises both technical indicators and other economic indicators in each region.
Technical indicators are the same in each region, extracted either from FTSE 100, S&P 500, or HSI. The FTSE 100 is composed of 100 constituent stocks in the London stock exchange. The S&P 500 consists of 500 constituent stocks in the NYSE and NASDAQ exchange, while the HSI consists of 50
Attention enhanced Compound Neural Network
In this section, we introduce the construction of our proposed Attention enhanced Compound Neural Network (AComNN). The whole framework includes three main steps: ANN Step, LSTM Step, and Self-Attention Step. Fig. 1 depicts the general framework of the AComNN.
Evaluation metrics
As we mentioned in Section 3.3, we conduct five consecutive back-testing experiments under each combination of and . To obtain a stable evaluation for the AComNN performance (including the forecasting capability and stability) under each combination of and , we define Average Accuracy (Avg. Acc.) and Standard Deviation (Std. Dev.) respectively as our evaluation metrics. The Avg. Acc and Std. Dev. are defined in Eqs. (20), (21). The represents the accuracy in the th
AComNN performance results
For this part, we discuss the performance of our AComNN with different forecasting windows and smoothing factors. After we finish the first part of the experimental procedure in Fig. 2, we present Table 4 to demonstrate the best model’s accuracy on the test set in each back-testing experiment, and we also list the Avg. Acc. and Std. Dev. among five backtests on the right side of the table. It is obvious that the AComNN predicting for the datasets with and obtains the highest Avg.
Discussion
The above experiments illustrate the predictive and profit capability of our proposed AComNN and the comparison with other baseline models.
For comparing the forecasting capability, our proposed AComNN outperforms the other three baselines because we consider the global major stock markets and economic entities for cross-regional feature extraction. With each of the stock markets opens and closes, their influence transfer from western hemisphere to the eastern hemisphere and finally affect the
Threats to validity
Some of our re-implementation to the original baseline paper for fair comparison may cause threats to the validity, we list below:
For the MFNN, referring to its Section 3.1 in [22], it labels samples with −1, 0, and 1 as Decrease, No change (when the return fluctuation does not exceed a certain threshold) and Increase, in which they account for 10%, 80%, and 10% respectively as the best configuration. In order to avoid class imbalance problem, MFNN stochastically deletes instances in the class
Conclusion and future work
In this paper, we propose a novel Attention enhanced Compound Neural Network (AComNN) as the prediction engine for the financial trading system to fully exploit the time-series interrelation of features across regions. Further, we explore its performance with four different forecasting windows and another four different smoothing factors. In addition, we verify its robustness and performance by five consecutive back-testing experiments under each window size and smoothing factor combination.
The
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgments
This work is supported in part by the General Research Fund of the Research Grants Council of Hong Kong (No. 11208017) and the research funds of City University of Hong Kong (7005028, 7005217), and the Research Support Fund by Intel (9220097), and funding supports from other industry partners (9678149, 9440227, 9440180, 9220103 and 9229029).
References (51)
- et al.
Decision support from financial disclosures with deep neural networks and transfer learning
Decis. Support Syst.
(2017) - et al.
Automatic trading method based on piecewise aggregate approximation and multi-swarm of improved self-adaptive particle swarm optimization with validation
Decis. Support Syst.
(2017) ARMA (P, q) type high order fuzzy time series forecast method based on fuzzy logic relations
Appl. Soft Comput.
(2017)Modelling and forecasting the stock market volatility of SSE composite index using GARCH models
Future Gener. Comput. Syst.
(2018)- et al.
Improving the integration of piece wise linear representation and weighted support vector machine for stock trading signal prediction
Appl. Soft Comput.
(2017) - et al.
Stock price prediction using support vector regression on daily and up to the minute prices
J. Financ. Data Sci.
(2018) - et al.
Predicting the direction of stock market prices using tree-based classifiers
North Amer. J. Econ. Financ.
(2019) - et al.
An improved stacking framework for stock index prediction by leveraging tree-based ensemble models and deep learning algorithms
Physica A
(2020) - et al.
Cnnpred: CNN-based stock market prediction using a diverse set of variables
Expert Syst. Appl.
(2019) - et al.
A deep neural-network based stock trading system based on evolutionary optimized technical analysis parameters
Procedia Comput. Sci.
(2017)
Deep learning-based feature engineering for stock price movement prediction
Knowl.-Based Syst.
Macroeconomic indicators alone can predict the monthly closing price of major U.S. indices: Insights from artificial intelligence, time-series analysis and hybrid models
Appl. Soft Comput.
Predicting direction of stock price index movement using artificial neural networks and support vector machines: The sample of the Istanbul stock exchange
Expert Syst. Appl.
Adaptive use of technical indicators for the prediction of intra-day stock prices
Physica A
Stock market’s response to real output shocks in eastern European frontier markets: A varwal model
Emerg. Mark. Rev
Framewise phoneme classification with bidirectional LSTM and other neural network architectures
Neural Netw.
Introduction to financial forecasting
Appl. Intell.
Comparison of ARIMA and artificial neural networks models for stock price prediction
J. Appl. Math.
Stock price prediction using the ARIMA model
ARIMA Modeling with intervention to forecast and analyze chinese stock prices
Int. J. Eng. Bus. Manag.
An SVM-based approach for stock market trend prediction
Prediction of stock performance in indian stock market using logistic regression
Int. J. Bus. Inf.
Random forest based feature selection of macroeconomic variables for stock market prediction
Am. J. Appl. Sci.
A decision tree- rough set hybrid system for stock market trend prediction
Int. J. Comput. Appl.
Stock return prediction based on bagging-decision tree
Cited by (13)
A multi-agent reinforcement learning framework for optimizing financial trading strategies based on TimesNet
2024, Expert Systems with ApplicationsDiverse title generation for Stack Overflow posts with multiple-sampling-enhanced transforme
2023, Journal of Systems and SoftwareDetecting multi-type self-admitted technical debt with generative adversarial network-based neural networks
2023, Information and Software TechnologyMachine learning techniques for stock price prediction and graphic signal recognition
2023, Engineering Applications of Artificial IntelligenceFinding the best learning to rank algorithms for effort-aware defect prediction
2023, Information and Software Technology