Automated Stock Trading with Q-Learning Algorithm
摘要
Stock is a sustainable type of security that can bring benefits to holders. In today’s world, computer programs can be utilized to take and execute automated trading decisions in the stock market. In such programs, strategies play a vital role in finding beneficial decisions to take, minimizing the risks from sources like market, natural disaster and more. Most trading strategies are not profitable if used on different stocks, therefore creating an optimal dynamic strategy is a solution to the problem. Reinforcement Learning can find the optimal dynamic strategy by interacting with the stock market. This paper proposes a way to represent discrete states of the environment for a Q-learning agent to interact with, using K-means clustering method. Experiments are implemented on Vietnamese stock market using historical data, and results show that it outperforms the Buy-and-Hold trading strategy and Decision Tree algorithm in profitability.