FinRL  by AI4Finance-Foundation

FinRL: Financial RL framework for automated trading

created 5 years ago
12,292 stars

Top 4.1% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

FinRL is an open-source framework for financial reinforcement learning, designed to automate trading strategies in quantitative finance. It provides a comprehensive ecosystem for researchers and practitioners to develop, test, and deploy AI-driven trading agents, aiming to revolutionize FinTech through accessible and advanced RL tools.

How It Works

FinRL employs a three-layer architecture: market environments, agents, and applications. Market environments simulate financial scenarios, agents implement various reinforcement learning algorithms (e.g., ElegantRL, Stable-Baselines3, RLlib), and applications provide end-to-end pipelines for tasks like stock trading, cryptocurrency trading, and portfolio allocation. This modular design facilitates experimentation and integration of different RL algorithms with diverse financial datasets.

Quick Start & Requirements

  • Installation: pip install -e . (from the cloned repository)
  • Prerequisites: Python 3.7+, PyTorch, Stable-Baselines3, RLlib, ElegantRL. Specific data sources may require API keys or accounts (e.g., Alpaca, Binance, YahooFinance).
  • Resources: Requires data download and processing, potentially significant computational resources for training RL agents.
  • Documentation: Document website
  • Tutorials: Towardsdatascience

Highlighted Details

  • Supports a wide array of data sources including Alpaca, Binance, YahooFinance, and Chinese market data providers.
  • Integrates with popular RL libraries like Stable-Baselines3 and RLlib, offering flexibility in agent implementation.
  • Features a train-test-trade pipeline with dedicated scripts (train.py, test.py, trade.py) for streamlined workflow.
  • Includes multiple application examples for various financial tasks such as stock trading, cryptocurrency trading, and portfolio allocation.

Maintenance & Community

  • Active development with multiple publications and a clear roadmap.
  • Community engagement encouraged via contribution guidelines.
  • Links to AI4Finance Youtube Channel and various news outlets covering FinRL.

Licensing & Compatibility

  • License: MIT License.
  • Trademark: FinRL® is a registered trademark; use of the name/logo requires prior written consent.
  • Commercial Use: MIT license generally permits commercial use and linking with closed-source projects.

Limitations & Caveats

The project is primarily for academic and educational purposes, explicitly stating it is not financial advice. While it supports multiple RL libraries, users may need to adapt code for specific algorithm implementations or custom environments.

Health Check
Last commit

4 days ago

Responsiveness

1 week

Pull Requests (30d)
3
Issues (30d)
9
Star History
753 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.