FinRL: Financial Reinforcement Learning Framework for Automated Trading

FinRL: Financial Reinforcement Learning Framework for Automated Trading

Summary

FinRL is the first open-source framework for financial reinforcement learning, providing an ecosystem for automated trading in quantitative finance. It offers a comprehensive pipeline, various DRL algorithms, and support for multiple market environments and data sources, making it a powerful tool for researchers and practitioners.

Repository Info

Updated on October 12, 2025
View on GitHub

Introduction

FinRL is a pioneering open-source framework dedicated to financial reinforcement learning, offering a robust ecosystem for automated trading in quantitative finance. Developed by the AI4Finance-Foundation, FinRL provides a comprehensive, three-layered architecture encompassing market environments, intelligent agents, and diverse financial applications. With over 12,800 stars and 2,900 forks on GitHub, it serves as a vital resource for researchers and practitioners exploring the intersection of AI and finance.

Installation

Getting started with FinRL is designed to be straightforward. You can install the library via pip:

pip install finrl

For detailed installation instructions across various operating systems, including macOS, Ubuntu, and Windows 10, please refer to the official documentation: FinRL Installation Guide.

Examples

FinRL provides numerous tutorials and examples to help users understand and implement deep reinforcement learning strategies for financial tasks. A quick start can be found in Stock_NeurIPS2018.ipynb, demonstrating a basic stock trading application. Key tutorials include:

Why Use FinRL?

FinRL stands out as a leading platform for several reasons:

  • First Open-Source Framework: It was the first open-source framework for financial reinforcement learning, establishing a benchmark in the field.
  • Comprehensive Ecosystem: FinRL has evolved into a broader ecosystem, including projects like FinRL-Meta for gym-style market environments and ElegantRL for advanced DRL algorithms.
  • Automated Pipeline: It offers an automatic train-test-trade pipeline, simplifying the development and deployment of trading strategies.
  • Extensive Data Support: The framework supports a wide array of data sources, including YahooFinance, Alpaca, Binance, and many more, providing flexibility for diverse financial markets.
  • Robust Algorithms: Integrates popular DRL libraries such as Stable Baselines3 and Ray RLlib, allowing users to leverage state-of-the-art algorithms.
  • Strong Academic Backing: Supported by numerous publications in top-tier conferences and journals, demonstrating its scientific rigor and practical applicability.

Links