Can AI Predict the Stock Market? How StockGPT is Changing the Investing Game
"Discover how a new AI model, StockGPT, is revolutionizing stock prediction and trading, offering insights beyond traditional methods."
The world of finance is constantly evolving, with new technologies emerging to help investors make smarter decisions. Generative artificial intelligence (GenAI) is one such technology, rapidly transforming industries by creating texts, images, videos, and code from simple instructions. Now, it's making waves in the investment sector. Since the introduction of ChatGPT in November 2022, large language models have found their way into investment, offering trading recommendations based on news and corporate communications.
One approach involves using pre-trained language models like BERT and OPT to generate sentiment scores for companies, which then inform trading decisions. For instance, studies have shown that stock portfolios built on these sentiment scores can yield impressive results. However, a new method is emerging that applies GenAI directly to numeric stock data.
This is where StockGPT comes in. StockGPT is a generative pre-trained transformer (GPT) model trained from scratch on numeric stock data. Unlike previous finance-specific language models trained on financial texts, StockGPT is pre-trained directly on numeric stock return data. This approach offers several advantages for trading, learning price patterns directly from price data, providing predictions for each stock at any time, and predicting the entire distribution of future returns rather than just a single estimate.
How Does StockGPT Predict Stock Returns?

StockGPT operates by predicting the most likely future token (or return) given previous returns. This is similar to how language models predict the next word in a sentence. To achieve this, stock return data is discretized into intervals, transforming continuous numbers into discrete tokens that the model can process. The model is built using a lightweight version of the GPT architecture, consisting of four attention blocks with approximately one million parameters.
- Direct Learning: Learns price patterns directly from price data.
- Continuous Availability: Provides predictions for each stock at any time.
- Distribution Prediction: Predicts the whole distribution of future returns.
The Future of AI in Stock Market Prediction
StockGPT represents a significant advancement in applying generative AI to stock market prediction. Its ability to learn directly from numeric data and generate strong investment performance highlights the potential for AI to enhance trading strategies. By encompassing common price-based strategies and leading stock factors, StockGPT demonstrates a new AI-driven approach to asset pricing.