STGAT: Spatial–Temporal Graph Attention Neural Network for Stock Prediction

Stock price prediction and portfolio optimization are critical research areas in financial markets, as they directly impact investment strategies and risk management. Traditional statistical methods and machine learning approaches have been widely applied to these tasks, but they often fail to fully...

Full description

Saved in:
Bibliographic Details
Main Authors: Ruizhe Feng, Shanshan Jiang, Xingyu Liang, Min Xia
Format: Article
Language:English
Published: MDPI AG 2025-04-01
Series:Applied Sciences
Subjects:
Online Access:https://www.mdpi.com/2076-3417/15/8/4315
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850183783488159744
author Ruizhe Feng
Shanshan Jiang
Xingyu Liang
Min Xia
author_facet Ruizhe Feng
Shanshan Jiang
Xingyu Liang
Min Xia
author_sort Ruizhe Feng
collection DOAJ
description Stock price prediction and portfolio optimization are critical research areas in financial markets, as they directly impact investment strategies and risk management. Traditional statistical methods and machine learning approaches have been widely applied to these tasks, but they often fail to fully capture the complex dynamics of financial markets. Traditional statistical methods typically rely on unrealistic assumptions or oversimplified models, neglecting the nonlinear and high-dimensional characteristics of market data. Additionally, deep learning methods, especially temporal convolution networks and graph attention networks, have been introduced in this area and have achieved significant improvements in both stock price prediction and portfolio optimization. Therefore, this study proposes a Spatial–Temporal Graph Attention Network (STGAT) that integrates STL decomposition components and graph structures to model both temporal patterns and asset correlations. By combining graph attention mechanisms with temporal convolutional modules, STGAT effectively processes spatiotemporal data, enhancing the accuracy of stock price predictions. Empirical experiments on the CSI 500 and S&P 500 datasets demonstrate that STGAT outperforms other deep learning models in both prediction accuracy and portfolio performance. The investment portfolios constructed based on STGAT’s predictions achieve higher returns in real market scenarios, which validates the feasibility of spatiotemporal feature fusion for stock price prediction and highlights the advantages of graph attention networks in capturing complex market characteristics. This study not only provides a robust tool for portfolio optimization but also offers valuable insights for future research in intelligent financial systems.
format Article
id doaj-art-34a60cd3b00a46049f7a9f0aa1fcb40c
institution OA Journals
issn 2076-3417
language English
publishDate 2025-04-01
publisher MDPI AG
record_format Article
series Applied Sciences
spelling doaj-art-34a60cd3b00a46049f7a9f0aa1fcb40c2025-08-20T02:17:14ZengMDPI AGApplied Sciences2076-34172025-04-01158431510.3390/app15084315STGAT: Spatial–Temporal Graph Attention Neural Network for Stock PredictionRuizhe Feng0Shanshan Jiang1Xingyu Liang2Min Xia3School of Future Technology, Nanjing University of Information Science and Technology, Nanjing 210044, ChinaSchool of Management Science and Engineering, Nanjing University of Information Science and Technology, Nanjing 210044, ChinaJiangsu Key Laboratory of Big Data Analysis Technology, Nanjing University of Information Science and Technology, Nanjing 210044, ChinaJiangsu Key Laboratory of Big Data Analysis Technology, Nanjing University of Information Science and Technology, Nanjing 210044, ChinaStock price prediction and portfolio optimization are critical research areas in financial markets, as they directly impact investment strategies and risk management. Traditional statistical methods and machine learning approaches have been widely applied to these tasks, but they often fail to fully capture the complex dynamics of financial markets. Traditional statistical methods typically rely on unrealistic assumptions or oversimplified models, neglecting the nonlinear and high-dimensional characteristics of market data. Additionally, deep learning methods, especially temporal convolution networks and graph attention networks, have been introduced in this area and have achieved significant improvements in both stock price prediction and portfolio optimization. Therefore, this study proposes a Spatial–Temporal Graph Attention Network (STGAT) that integrates STL decomposition components and graph structures to model both temporal patterns and asset correlations. By combining graph attention mechanisms with temporal convolutional modules, STGAT effectively processes spatiotemporal data, enhancing the accuracy of stock price predictions. Empirical experiments on the CSI 500 and S&P 500 datasets demonstrate that STGAT outperforms other deep learning models in both prediction accuracy and portfolio performance. The investment portfolios constructed based on STGAT’s predictions achieve higher returns in real market scenarios, which validates the feasibility of spatiotemporal feature fusion for stock price prediction and highlights the advantages of graph attention networks in capturing complex market characteristics. This study not only provides a robust tool for portfolio optimization but also offers valuable insights for future research in intelligent financial systems.https://www.mdpi.com/2076-3417/15/8/4315portfolio managementstock price predictiongraph attention networktime series analysis
spellingShingle Ruizhe Feng
Shanshan Jiang
Xingyu Liang
Min Xia
STGAT: Spatial–Temporal Graph Attention Neural Network for Stock Prediction
Applied Sciences
portfolio management
stock price prediction
graph attention network
time series analysis
title STGAT: Spatial–Temporal Graph Attention Neural Network for Stock Prediction
title_full STGAT: Spatial–Temporal Graph Attention Neural Network for Stock Prediction
title_fullStr STGAT: Spatial–Temporal Graph Attention Neural Network for Stock Prediction
title_full_unstemmed STGAT: Spatial–Temporal Graph Attention Neural Network for Stock Prediction
title_short STGAT: Spatial–Temporal Graph Attention Neural Network for Stock Prediction
title_sort stgat spatial temporal graph attention neural network for stock prediction
topic portfolio management
stock price prediction
graph attention network
time series analysis
url https://www.mdpi.com/2076-3417/15/8/4315
work_keys_str_mv AT ruizhefeng stgatspatialtemporalgraphattentionneuralnetworkforstockprediction
AT shanshanjiang stgatspatialtemporalgraphattentionneuralnetworkforstockprediction
AT xingyuliang stgatspatialtemporalgraphattentionneuralnetworkforstockprediction
AT minxia stgatspatialtemporalgraphattentionneuralnetworkforstockprediction