RL agent for cryptocurrency trading using OpenAI Gym and Keras-RL
Top 71.2% on sourcepulse
This repository provides a cryptocurrency trading environment compatible with OpenAI Gym, coupled with a Dueling Deep Q-Network (DDQN) agent implemented using Keras-RL. It's designed for researchers and traders interested in applying deep reinforcement learning to automated trading strategies, aiming to maximize profit by learning optimal buy, sell, or hold sequences.
How It Works
The core of the project is a custom OpenAI Gym environment that simulates cryptocurrency trading using OHLCV (Open, High, Low, Close, Volume) candle data. The agent observes a configurable window of this data and learns to execute actions (buy, sell, hold) to maximize profit. It employs a Dueling DQN architecture with a sparse reward system, where rewards are granted only upon closing a position or at the end of an episode, encouraging the learning of long-term dependencies. The implementation allows for flexible model definition using Keras.
Quick Start & Requirements
pip install -r requirements.txt
keras-rl/core.py
to ./modified/core.py
.Highlighted Details
dueling_type
('avg', 'max', 'naive').Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The README mentions a potential for overfitting, and the requirement to modify the keras-rl
library's core files is a significant integration hurdle. The sparse reward system may lead to longer training times.
2 years ago
Inactive