Global Stock Market Prediction Based on Stock Chart Images Using Deep Q-Network

Jinho Lee, Raehyun Kim, Yookyung Koh, Jaewoo Kang

Introduction

The Efficient Market Hypothesis (EMH) posits that stock prices reflect all available information, rendering them unpredictable. Conversely, technical analysts argue that repeatable patterns emerge from human psychology. A significant challenge in applying Deep Learning to this domain is data scarcity in emerging markets and the risk of overfitting to specific market quirks. This research explores whether a model can learn "universal" trading features from a data-rich market like the United States and successfully apply them to diverse global markets.

Methodology: Trading on Pictures

The researchers developed a Deep Q-Network (DQN) that treats stock charts as images rather than raw numerical sequences. This approach forces the model to identify spatial patterns, effectively automating the role of a technical chart reader.

DQN architecture and input image generation process.

As illustrated in Figure 1, the input consists of a 32x32 binary image. The top half represents relative closing prices over a specific window, while the bottom half represents volume. A 6-layer Convolutional Neural Network (CNN) serves as the function approximator, mapping these images to three possible actions: Long (Buy), Neutral, or Short (Sell). To ensure realistic behavior, the reward function incorporates a transaction penalty (P), discouraging excessive trading and ensuring the AI only acts when predicted profits significantly outweigh costs.

Experimental Setup

The model was trained exclusively on the US Russell 3000 index data from 2001 to 2005. It was then tested, without further training, on a massive 12-year evaluation period (2006–2018) covering 31 different countries. This test set included both developed markets (e.g., UK, Germany, Japan) and emerging markets (e.g., Brazil, Turkey, Qatar).

Key Results

The model demonstrated remarkable cross-border generalizability. Despite being trained only on US data, it achieved consistent profitability across all 31 test countries.

Average returns per transaction and annual returns across 31 countries.

As shown in the results table, the model yielded between 0.1% and 1.0% return per transaction. When employing a high-confidence strategy (selecting only the top 5% of trades), annual returns in certain periods exceeded 100% before transaction costs. Statistical simulations confirmed these results were not due to luck, with performance often exceeding 30 standard deviations from random chance.

Discussion and Insights

The primary insight is the existence of a "universal trading psychology." The model's success across culturally and economically diverse regions suggests that the collective reaction of market participants to price and volume trends is globally consistent. By using low-resolution images, the researchers effectively regularized the model, filtering out noise and forcing it to focus on fundamental "big picture" shapes. Furthermore, the Reinforcement Learning framework proved superior to traditional supervised learning by optimizing for cumulative rewards and trend-following rather than point-in-time price predictions.

Limitations

While promising, real-world application faces hurdles. The reported returns are gross of transaction costs; in high-frequency scenarios, taxes and fees could significantly erode the 0.1% per-trade gains. Additionally, the study assumes "price-taker" status, which may not hold in less liquid emerging markets where large trades could move the market against the model. Finally, the "black box" nature of CNNs makes it difficult to pinpoint exactly which classical technical patterns the model is identifying.

Conclusion

This research provides a compelling case that the "language" of the stock market is global. By leveraging Reinforcement Learning and image-based inputs, AI can learn to navigate complex financial landscapes worldwide by simply "looking" at the charts.

Summary updated

BibTeX
@article{lee2019global,
  author = {Jinho Lee and Raehyun Kim and Yookyung Koh and Jaewoo Kang},
  title = {{Global Stock Market Prediction Based on Stock Chart Images Using Deep Q-Network}},
  journal = {IEEE Access},
  year = {2019},
  doi = {10.1109/access.2019.2953542},
}
Figure