Font Size: a A A

Research And Implementation Of Stock Trading Algorithm Based On Reinforcement Learning

Posted on:2024-05-21Degree:MasterType:Thesis
Country:ChinaCandidate:Y ChenFull Text:PDF
GTID:2568306941989779Subject:Computer technology
Abstract/Summary:
In recent years,reinforcement learning has received widespread attention for its ability to make decisions in complex and dynamic environments.Applying reinforcement learning algorithms to stock trading decision-making problems to optimize the long-term performance of investments has become a promising application direction of artificial intelligence in the finance industry.We thoroughly investigates the current mainstream reinforcement learning stock trading decision-making methods from three levels:problem modeling,network architecture design,and algorithm selection.To address the challenges faced in stock trading decision-making research,such as misaligned stock data in the temporal and spatial dimensions,high levels of data noise,rapidly changing market patterns,and difficulty in choosing decision actions in high-dimensional space,a novel deep reinforcement learning trading decision-making framework is proposed.The focus is on designing the environment module,the feature extraction module of agent,the strategy module of agent and the corresponding reinforcement learning algorithms.The environment module aligns stock data in the temporal and spatial dimensions by padding,and the feature extraction module of agent processes the padded data using an attention mechanism so that it can focus on the real data without considering the populated data when extracting features,effectively addressing the variable temporal and spatial dimensions,reflecting the scalability of our framework.The combination of the data augmentation-enabled environment module and the selfsupervised pre-trained feature extraction module addresses noisy data input,reflecting the noise robustness of our framework.The decision-making agent is divided into a feature extraction module and a strategy module,with the feature extraction module using pre-training in advance for representation learning and the strategy module using a lightweight design,which allows the strategy module to quickly fit the continuously updated market data without affecting the stability of the feature representation,reflecting the rapid adaptability of our framework.The strategy module of agent outputs actions in a hierarchical manner,reducing the complexity of decision action selection in high-dimensional space,and divides complex decision actions into combinations of simple actions,which greatly reduces the difficulty of strategy search,reflecting the decision-making efficiency of our framework.Building on theoretical research,we collect all constituent stocks of three major U.S.stock indices for the last 20 years using an open-source library,cleans and preprocesses the data,and construct a historical stock price dataset.Next,the baseline framework and the novel deep reinforcement learning trading decision-making framework we proposed are compared and analyzed using Log Return and Sharpe Ratio evaluation metrics on the historical stock price dataset.Experimental analysis shows that the proposed framework outperforms the baseline method and indices in both metrics,fully demonstrating our framework’s powerful feature extraction and decision making capabilities.Additionally,ablation experiments were conducted on self-supervised pre-training and hierarchical strategy modules to explore the gains of each module on the overall performance.Overall,this thesis contributes to the field of reinforcement learningbased stock trading algorithms and provides a practical solution for investors interested in maximizing profits using cutting-edge technology.
Keywords/Search Tags:stock trading, portfolio optimization, reinforcement learning, deep learning
Related items