RL agent for stock trading
Top 28.3% on sourcepulse
This project aims to develop a reinforcement learning (RL) agent capable of learning stock market trading strategies, specifically focusing on "reading the tape." It's targeted at individuals interested in applying RL to financial markets, offering a practical exploration of RL concepts in a real-world, albeit simulated, trading environment.
How It Works
The project utilizes Deep Q-Networks (DQN) and Policy Gradients (PG) for trading. The agent learns by making decisions (hold, buy, short) based on historical stock data. Training is episodic, with rewards calculated based on the final portfolio value at the end of each episode, simplifying reward calculation compared to step-by-step rewards. The architecture starts with simple feed-forward networks, with potential for convolutional networks, using ReLU activations in hidden layers and sigmoid output for action probabilities.
Quick Start & Requirements
tensor-reinforcement
directory and run python dqn_model.py
or python pg_model.py
.tensor-reinforcement
directory. A saved_networks
directory must be created.Highlighted Details
Maintenance & Community
The project's author states they are no longer able to answer questions due to running a company on RL trading. No active community channels or recent development activity are indicated.
Licensing & Compatibility
The README does not explicitly state a license. The project's code is available on GitHub, implying a permissive license, but this should be verified.
Limitations & Caveats
The project is presented as a personal development journal with the author no longer available for support. The data sources are from 2016, and the code may not be compatible with current TensorFlow versions or market conditions.
7 years ago
1 week