charlescao2019 / capstone_stock_trading_policy_optimization-master Goto Github PK
View Code? Open in Web Editor NEWStock investment can be one of the ways to manage one’s asset. Technical analysis is sometimes used in financial markets to assist traders make buying and selling decisions [1]. Many technical analysis trading rules are deterministic trading policies. [2] uses genetic algorithm to find technical trading rule. [3] studies evolutionary algorithms in optimization of technical rules for automated stock trading. [4] proposed a stock trading system based on optimized technical analysis parameters for creating buy-sell points using genetic algorithms. [5] studies the selection of the optimal trading model for stock investment in different industries. [6] describes the optimization of trading strategies. The optimization of trading rule using genetic algorithm or evolutionary algorithms belongs to policy-based method, which is a branch of Machine Learning. Policy-based methods try to directly optimize for the optimal policy which is an important branch for domains with continuous action spaces [7]. There are studies focus on how to find a trading strategy via Reinforcement Learning (RL) [8] or using Deep-Q learning for automatic trading algorithm [9]. But in this study we will focus on the policy-based method using Generic Algorithm that directly search for the optimal parameters of a deterministic policy. Yahoo Finance’s stock history data [10] will be used in this study. The reason to choose Yahoo Finance data is because it is free and available for public to assess. The performance of algorithm will be evaluated using different stocks. The purpose of the study is to see the difference between using an agent with optimized policy to manage one’s asset with buy-and-hold strategy, or manage one’s asset with an agent with unoptimized policy.