rl-portfolio-management  by wassname

RL environment for financial portfolio management research

created 8 years ago
565 stars

Top 57.8% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides an OpenAI Gym environment for financial portfolio management, aiming to replicate a deep reinforcement learning framework for the problem. It's intended for researchers and practitioners interested in applying RL to trading strategies, offering a simulated environment with historical cryptocurrency data.

How It Works

The project implements a custom OpenAI Gym environment that simulates trading cryptocurrencies. It processes historical price data, allowing RL agents to learn optimal portfolio allocation strategies. The environment offers different observation shapes (CryptoPortfolioEIIE-v0, CryptoPortfolioMLP-v0, CryptoPortfolioAtari-v0) to accommodate various model architectures, from CNNs to MLPs, and includes features like trading costs and time costs.

Quick Start & Requirements

  • Install: pip install -r requirements/requirements.txt
  • Run: jupyter-notebook (then open tensorforce-VPG.ipynb or tensorforce-PPO.ipynb)
  • Prerequisites: Python, Jupyter Notebook, Tensorforce, OpenAI Gym.
  • Data: Includes 47k training steps and 8k test steps of 30-minute interval cryptocurrency data.
  • Docs: OpenAI Gym Environment Documentation

Highlighted Details

  • Replicates the methodology of "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem" by Jiang et al. (2017).
  • Offers three distinct environment configurations tailored for different RL model types (EIIE, MLP, Atari-compatible).
  • Includes unit tests for the environment and example notebooks for VPG and PPO agents.
  • Author notes difficulty in replication, achieving 8% growth on training data but failing to generalize to test data without hyperparameter optimization.

Maintenance & Community

  • The original author (wassname) notes that a fork by vermouth1992 is recommended for improved environments.
  • No active community channels (Discord/Slack) or roadmap are explicitly mentioned.

Licensing & Compatibility

  • License: MIT
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The author reports poor generalization to test data and suggests that hyperparameter sensitivity or subtle bugs might be present. The project is a personal replication attempt, and the author recommends a more actively maintained fork.

Health Check
Last commit

4 months ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.