tf_deep_rl_trader  by miroblog

RL agent for crypto trading

created 7 years ago
254 stars

Top 99.3% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a deep reinforcement learning trading agent, specifically a Proximal Policy Optimization (PPO) agent implemented with Tensorforce, designed to maximize profit in a simulated trading environment. It's targeted at quantitative traders and researchers interested in applying RL to financial markets, offering a flexible framework for developing and testing trading strategies.

How It Works

The core of the project is a trading environment compatible with OpenAI Gym, which wraps financial OHLCV (Open, High, Low, Close, Volume) data. The PPO agent observes features derived from these candles (configurable window size) and decides to buy, sell, or hold. It supports single long or short positions per trade, with invalid sequences like consecutive buys being treated as holds. A sparse reward is given upon position closure or episode completion, encouraging learning long-term dependencies.

Quick Start & Requirements

  • Install via pip: pip install -r requirements.txt
  • Prerequisites: TensorFlow, Keras-RL, NumPy.
  • Data: Requires sample 5-minute OHLCV candle data for training and testing (paths specified in PATH_TRAIN and PATH_TEST).
  • Official Docs: Tensorforce

Highlighted Details

  • Implements PPO algorithm using the Tensorforce library.
  • Trading environment supports configurable window sizes and features derived from OHLCV data.
  • Allows customization of agent network architecture and baseline networks.
  • Includes example data and training/testing scripts.

Maintenance & Community

  • Initial work by Lee Hankyol.
  • No explicit community links (Discord, Slack) or roadmap are provided in the README.

Licensing & Compatibility

  • MIT License.
  • Permissive license suitable for commercial use and integration with closed-source projects.

Limitations & Caveats

The provided sample data and agent configuration may lead to overfitting; more extensive training data and larger network architectures are suggested for improved performance. The initial results show potential but require further tuning and validation.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.