AI4Finance-Foundation/FinRL

FinRL®: Financial Reinforcement Learning. 🔥

What it solves

FinRL provides an open-source framework for automating quantitative trading using deep reinforcement learning (DRL). It simplifies the process of developing, training, and testing trading agents that can make sequential decision-making policies in financial markets.

How it works

The framework is organized into three core layers:

  1. Market Environments: Simulates the financial market for the agent to interact with.
  2. DRL Agents: Implements various algorithms (such as A2C, DDPG, PPO, TD3, and SAC) to learn optimal trading strategies.
  3. Financial Applications: Applies the learned policies to specific tasks like stock trading, cryptocurrency trading, and portfolio allocation.

It follows a train-test-trade pipeline: downloading and preprocessing data (including technical indicators like MACD and RSI), training agents using libraries like Stable Baselines 3, and backtesting performance against baselines like the DJIA index.

Who it’s for

This repository is primarily intended for learners, developers, and researchers who want to experiment with financial reinforcement learning and create research prototypes.

Highlights

  • Broad Data Support: Integrates with numerous data sources including Yahoo Finance, Alpaca, Binance, and WRDS.
  • Coded Pipeline: Provides a complete end-to-end workflow from data acquisition to backtesting.
  • Algorithm Variety: Supports multiple DRL agents via Stable Baselines 3, ElegantRL, and RLlib.
  • Educational Focus: Includes tutorials and examples for stock trading workflows.

Related

  • Project
  • Dispatch
  • Project
  • Project
  • Project