# STGAT: Spatial-Temporal Graph Attention Neural Network for Stock Prediction
## 2 Related Works
### Time Series Analysis Research on Stock Price Prediction  
* Statistics-based forecasting models. The methods based on statistical analysis and machine learning models mainly treat asset indicators as time series data. For example, time series models based on statistical analysis include the Autoregressive Integrated Moving Average model (ARIMA) [3,18,19], Vector Autoregressive model (VAR) [4,20], Autoregressive Conditional Heteroskedasticity Model (ARCH), Generative Autoregressive Conditional Heteroskedasticity Model (GARCH) [5,21,22], etc. Even though these traditional methods are simple and convenient for use, they still face some restrictions when applied to financial market analysis. ARIMA and VAR rely on the assumption of linearity, which prevents them from capturing nonlinear and complex dynamics inherent in stock market data. ARCH and GARCH address some of the limitations of linear assumptions by introducing a dynamic structure for conditional variance, but their applicability remains limited in capturing higher-dimensional and complex nonlinear interactions in stock market data. Moreover, these models also impose strict stationarity requirements, necessitating transformations that can result in the loss of critical information. * Machine learning models. Machine learning-based methods, such as Support Vector Machines (SVMs) [7; 23; 24], Decision Trees, random forests (RFs) [9], and artificial neural networks (ANNs) [25], are highly effective in capturing nonlinear patterns and have gained widespread use in financial market analysis. [PERSON] and [PERSON] [9] employed artificial neural networks (ANNs) and random forests (RFs) to predict the next-day closing prices of five companies from various sectors, achieving satisfactory performance as measured using the RMSE and MAPE. [PERSON] and [PERSON] [25] compared the performance of VAR and an ANN in predicting the exchange rate of USD/TRY, gold prices, and BIST 100 index, while the results indicated that the ANN approach has superior performance in prediction capability than the VAR method. However, these models are also prone to overfitting, particularly due to the inherent randomness and uncertainty of market conditions, which can compromise their predictive performance. Additionally, traditional machine learning methods often find it difficult to automatically discover implicit features and rely on manual feature engineering to extract them [26]. * Deep Learning Models. In recent years, deep learning algorithms became a promising solution replacing mathematical models, especially convolutional neural networks (CNNs) [27; 28; 29], Recurrent Neural Networks (RNNs) [30; 31]), Long Short-Term Memory (LSTM) networks [32], temporal convolution networks (TCNs) [11], and Gated Recurrent Units (GRUs) [31]. Deep neural networks can be considered nonlinear function approximators that are capable of mapping nonlinear functions [33]. [PERSON] and [PERSON] [27] proposed the CNNpred framework based on a convolutional neural network (CNN) to improve the accuracy of stock market prediction. [PERSON] and [PERSON] [34] proposed an effective Time Series Recurrent Neural Network (TRNN) for stock price prediction. [PERSON] [33] compared the predict results of a CNN, an RNN, and LSTM, and the CNN outperformed the RNN and LSTM on stock price data of three representative companies. [PERSON] et al. [32] proposed an optimized ensemble model that combines an LSTM-based attention mechanism and a cyclic multidimensional gray model, utilizing multi-source heterogeneous data, yielding a smaller mean absolute error, Mean Absolute Percentage Error, and root mean squared error than other models. [PERSON] and [PERSON] [31] utilized an RNN, LSTM, and GRU for predicting the stock prices of the two most popular and strongest commercial banks listed on the Nepal Stock Exchange (NEPSE). [PERSON] et al.