DQN Trading System with limited API calls for Stocks with Large Trading Volume Per Second: Design and Real Market Implementation

Hyochan Kim, Jong Hwan Ko

Research output: Contribution to journalArticlepeer-review

Abstract

This research presents an advanced trading system using Deep Q-Network (DQN) agents to achieve consistent returns in high-volume stock trading within an application programming interface (API) call-limited environment. Major stock markets like South Korea, the United States, and Japan impose API call limits to prevent computational overload and market crashes. Our approach overcomes the limitations of simulation-based backtesting by incorporating real-time API call restrictions specific to each country's stock market. Existing algorithmic backtesting techniques often neglect the finite network resources of actual markets and focus on algorithms trained on a single stock or index, lacking alternatives when strategies fail in real-world conditions. Our work addresses the complexities of modern trading, including API call limitations, intricate tax and fee structures, and varying global regulatory environments. Uniquely applied in real time to the Korean stock market, our system employs DQN agents to effectively execute profitable trades. DQN agents are integrated into a practical trading framework that emphasizes rapid decision-making, from data collection to deployment. Testing of the DQN-based strategy within API call limits on the Korean stock market yielded an average daily return of 1.57% over a seven-week period with randomly selected stocks. During this time, the KOSPI and KOSDAQ indices experienced minimal fluctuations of 0.01% and 0.04%, respectively, demonstrating the system's real-world effectiveness and adaptability to market conditions.

Original languageEnglish
Pages (from-to)1167-1186
Number of pages20
JournalKSII Transactions on Internet and Information Systems
Volume19
Issue number4
DOIs
StatePublished - Apr 2025

Keywords

  • deep learning
  • execution agent
  • real-time system
  • reinforcement learning
  • stock trading

Fingerprint

Dive into the research topics of 'DQN Trading System with limited API calls for Stocks with Large Trading Volume Per Second: Design and Real Market Implementation'. Together they form a unique fingerprint.

Cite this