FinRL
Open-source Python framework for learning and experimenting with reinforcement-learning trading agents on stock, crypto and portfolio environments.
A hands-on playground for anyone curious about AI trading agents: ready-made market environments, five deep-RL algorithms and a tutorial backtest.
Who it is for
Students, researchers and Python-savvy traders who want to learn how reinforcement learning applies to markets.
Strengths
- Gym-style environments for stock trading, crypto trading and portfolio allocation.
- Five deep-RL algorithms (A2C, DDPG, PPO, SAC, TD3) trained with Stable Baselines 3.
- Around 14 data providers, including Yahoo Finance, Alpaca, Binance and CCXT.
- Tutorial backtest compares trained agents with mean-variance optimization and the DJIA index.
Good to know
- Positioned for education, benchmarking and research, not production trading; the page points to FinRL-X / FinRL-Trading for live work.
- Installation is from source (clone, virtual environment, pip install -e .) and the page badge shows an old Python version: check the docs for compatibility.
- The authors state nothing in the project is financial advice; always test with realistic fees, paper trading and risk limits.
- The FinRL name and logo are trademarks of FinRL LLC; the MIT license does not cover them.
Custom bots are coming soon
We are preparing a service to build bots on tools like this one. Follow our Telegram channel to know when it opens.
Real-life uses
Learn reinforcement-learning trading agents in a research notebook
Train a deep-RL agent on historical daily prices in a ready-made market environment, then compare it with a simple benchmark on data it never saw. This is a learning exercise, so include fees and never read the result as a promise of returns.
Compare it with others
PyPortfolioOpt vs Riskfolio-Lib vs skfolio: which Python portfolio optimization library to start with
Three free, open-source Python libraries for portfolio optimization compared from checked sources: methods, risk models, validation tools, level and who each one suits.
PyBroker vs LumiBot vs bt: free Python frameworks for backtesting strategies
Three free Python frameworks compared: PyBroker for machine-learning strategies with walk-forward tests, LumiBot for going from backtest to paper trading and a broker, and bt for portfolio allocation and rebalancing. Licences, level and who each suits.
QuantConnect vs NautilusTrader vs Zipline Reloaded: which backtesting engine to learn?
A cloud lab with data included, a fast open-source engine and a respected classic compared: cost, licence, level, markets and who each backtesting platform suits.
Quick answers
How much does FinRL cost?
Free and open source. Prices change, so check the official website before you decide.
Is FinRL open source?
Yes. License: MIT.
Who is FinRL for?
Students, researchers and Python-savvy traders who want to learn how reinforcement learning applies to markets.
What is FinRL written in?
FinRL is written in Python.
What should I know before using FinRL?
Positioned for education, benchmarking and research, not production trading; the page points to FinRL-X / FinRL-Trading for live work. Installation is from source (clone, virtual environment, pip install -e .) and the page badge shows an old Python version: check the docs for compatibility. The authors state nothing in the project is financial advice; always test with realistic fees, paper trading and risk limits. The FinRL name and logo are trademarks of FinRL LLC; the MIT license does not cover them.
Want a bot like this when custom bots open? Get notified · All comparisons · Guides
Sources
Every fact on this page comes from these sources, checked on 2026-11-24. If something has changed, the source wins.
- https://github.com/AI4Finance-Foundation/FinRL: purpose, environments, agents, data providers, install steps, disclaimers, successor project
- https://api.github.com/repos/AI4Finance-Foundation/FinRL: MIT license, about 17,000 stars, active (last push 2026-11-18), not archived
Alternatives in Backtesting
NautilusTrader
High-performance algorithmic trading platform (Rust core, used from Python) that runs the same strategy code in backtests and live.
Qlib
Microsoft's open-source quantitative research platform that covers data processing, machine-learning model training and backtesting in one workflow, driven by config files or Python code.
Riskfolio-Lib
Python library for portfolio optimization built on CVXPY and Pandas, with mean-risk, risk parity, hierarchical clustering and Black-Litterman models plus reports and charts.
skfolio
Python library for portfolio optimization and risk management built on scikit-learn, with cross-validation tools to test portfolio models on walk-forward and purged splits.