RL agent for stock trading
Top 14.9% on sourcepulse
This project provides a deep reinforcement learning (DRL) framework for automated stock trading, targeting individuals interested in applying DRL to financial markets. It aims to develop trading agents that learn optimal buy, sell, and hold strategies to maximize profits, offering an alternative to traditional predictive models.
How It Works
The system models stock trading as a sequential decision-making problem within an OpenAI Gym-like environment. Agents observe normalized stock market data (open, high, low, close prices, volume, etc.) and output actions: buy, sell, or hold, along with a percentage. The reward function is designed to directly reflect current profit, with significant penalties for losses to encourage faster learning of profitable strategies. Policy gradient methods, specifically PPO, are employed for optimizing the agent's strategy due to the continuous nature of action outputs.
Quick Start & Requirements
pip install -r requirements.txt
baostock
: pip install baostock
then run python get_stock_data.py
Highlighted Details
Maintenance & Community
The project appears to be a personal endeavor with no explicit mention of maintainers, community channels (like Discord/Slack), or a roadmap. The author welcomes feedback and corrections.
Licensing & Compatibility
The repository does not specify a license. The absence of a license implies all rights are reserved, potentially restricting commercial use or integration into closed-source projects.
Limitations & Caveats
The project is presented as a "Just For Fun" experiment by a self-proclaimed novice. The data and methods are sourced from the internet, and the author cannot guarantee their effectiveness or accuracy. The environment is a modified version of an existing stock trading environment.
2 years ago
1 week