AI Share Trader
Project Showcase

AI Share Trader

By: Mehdi Jaffri , Ruairi Kearns

Supervised by: Deshen Moodley

Categories: CS Honours


About

Abstract

Deep reinforcement learning (DRL) agents can learn to trade shares, but most see the market as a set of independent stocks and ignore the links between them. Spatial-temporal graph neural networks (STGNNs) are designed to model these links and forecast prices well, yet had not been tested as the part of a trading agent that describes the market. This project tests whether they help. Two STGNNs, Graph WaveNet (GWN) and AGCRN, and a plain deep neural network (DNN) were trained to forecast next-day returns and then used as the input to six DRL agents trading JSE Top40 and NYSE Dow Jones stocks over 2022–2025. Mehdi Jaffri compared discrete (DDQN) and continuous (A2C, PPO) agents under walk-forward testing, and Ruairí Kearns compared deterministic (DDPG, TD3) and entropy-based (SAC) agents over ten random seeds. Graph encoders were not automatically better. AGCRN gave Mehdi's best JSE results and GWN significantly reduced drawdowns for Ruairí's agents on the NYSE, but neither helped consistently. Continuous agents outperformed discrete ones, and 9 of Mehdi's 18 configurations beat the market index on return, but none of Ruairí's matched passive buy-and-hold on risk-adjusted return.

Documents 1

Downloadable resources and documentation

Click "View Full" to open documents in a new window

Gallery 1

Explore the visual story of this exhibit