# FinRL: the original financial reinforcement learning framework, and what it now points to

> FinRL is the classic three-layer train-test-trade pipeline for financial reinforcement learning, kept for education and research while the project directs new users to FinRL-X. Here is what it installs, what it actually contains, and when it is the wrong tool.

**AI4Finance-Foundation/FinRL** — FinRL®:  Financial Reinforcement Learning. 🔥

- Repository: https://github.com/AI4Finance-Foundation/FinRL
- Website: https://finrl.ai
- Stars: 16,517 · Forks: 3,535
- Language: Jupyter Notebook
- License: MIT
- Published: 2026-09-21 · Updated: 2026-09-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/ai4finance-foundation-finrl

## What FinRL solves, and the audience it was written for

Reinforcement learning on financial time series has an awkward entry cost. You need a market simulator that emits observations and rewards, an agent implementation, and an evaluation loop that turns a trained policy into something resembling a portfolio. Doing that from scratch means writing a gym-style environment before you can test a single algorithm. FinRL packages the whole path: market environments, DRL agents, and financial applications, in the three layers the README names. The intended user is stated plainly. The repository describes itself as the original FinRL library for education, benchmarking, and research prototyping, and its positioning table lists learners, developers and researchers as the target. That framing matters, because the same table assigns professional traders, institutions and hedge funds to FinRL-X. FinRL is a teaching and experimentation artifact, not a deployment stack, and it says so.

## The three-layer architecture and the train-test-trade data flow

The architecture is a coupled monolith rather than a set of swappable services. A market environment wraps historical price data and defines the observation and reward signals; a DRL agent consumes those observations and produces actions; the financial application layer interprets actions as trades and evaluates the resulting portfolio. The README's comparison table lists the supported agents as A2C, DDPG, PPO, SAC and TD3, which matches what stable-baselines3 and elegantrl provide as dependencies. Data comes in through what the README calls 14 manually-wired processors, one per source rather than a single abstraction. Configuration lives in config.py and config_tickers.py, so tickers and date ranges are edited in Python files rather than passed as arguments. Backtesting is described as custom hand-rolled evaluation loops, and live trading as basic Alpaca support. Every one of those choices is defensible for a research prototype and questionable for anything you intend to run unattended. The coupling is the real constraint: changing a data source or a backtest engine means touching the same code that defines the training loop.

## Installing FinRL and running a first training notebook

The package is published on PyPI as finrl, and the README links the PyPI badge and the readthedocs documentation site. The repository also ships requirements.txt and pyproject.toml for source installs. Note that requirements.txt carries a comment for TA-lib stating that it is installed via conda, so a pure pip install of the full requirement set is not the documented path for that one package.

## Where FinRL stops being the right tool

Two limitations are visible from the repository structure alone. First, the project itself now treats this codebase as a previous generation. The README states that FinRL-X is the next-generation evolution designed for AI-native, modular and production-oriented quantitative trading, and that live trading deployment and production-focused development should use FinRL-Trading instead. That is an unusually direct signal from a maintainer: the classic repository is preserved, not extended. Second, risk management is limited to gym environment constraints, according to the comparison table, whereas FinRL-X claims order-level, portfolio-level and strategy-level controls. If your requirement is position limits that survive a restart, or an audit trail of why an order was placed, the classic framework does not provide it. A third practical issue is dependency weight. The install pulls ray with tune, stable-baselines3, ccxt, alpaca-py, wrds, jqdatasdk, selenium and webdriver-manager. That is a large surface for a research environment, and several of those packages change their APIs independently of FinRL.

## FinRL versus FinRL-X, and the FinRL-Meta alternative

The most relevant alternative is not an outside project but the same foundation's next generation. FinRL-X replaces the monolith with decoupled modular layers, swaps the hand-rolled evaluation loops for the bt library engine, and changes configuration from Python files to type-safe Pydantic with .env multi-environment support. Its data layer auto-selects between Yahoo Finance, FMP and WRDS instead of requiring you to wire a processor by hand. Its strategy layer is described as ML selection plus DRL timing, which is a different premise from training a single DRL agent end to end. If your interest is the algorithms themselves rather than the trading pipeline, ElegantRL is positioned in the same roadmap as the algorithm layer, a lightweight home for DRL implementations. If your interest is the environments and benchmarks, FinRL-Meta is positioned as the market environments layer. So the ecosystem splits by concern, and FinRL is the one piece that bundles all three concerns together for teaching purposes. That bundling is exactly why it is a good read and a poor production base.

## Maintenance, licence and what upgrading actually costs

The repository is not archived, and the last push was on 2026-07-13. The most recent release listed is v0.3.8 from 2026-03-20, and both pyproject.toml and setup.py declare version 0.3.8, so the packaged version and the release tag agree. The description strings in both files still reference version 0.3.5 notes, which is a leftover rather than a mismatch in the version field. Licence is MIT, declared in the LICENSE file, in pyproject.toml as license = "MIT", and in setup.py, with the MIT trove classifier in both. MIT is permissive: you can use, modify and redistribute the code, including commercially, provided the copyright notice and permission notice are preserved. That is a statement about the licence text, not legal advice, and the FinRL name carries a registered trademark symbol in the README, which is a separate matter from the code licence. On upgrade cost: because the project is preserved rather than extended, the realistic migration is not from 0.3.8 to 0.3.9 but from FinRL to FinRL-X, and the comparison table already enumerates what changes, including configuration format, backtesting engine and data selection. Budget for that rewrite rather than for incremental version bumps.

## Conclusion

Adopt FinRL if you are learning or teaching financial reinforcement learning and want a working train-test-trade pipeline with notebooks you can read end to end. Do not adopt it if you need production deployment, live multi-account trading or risk controls at the order, portfolio and strategy level: the README routes those needs to FinRL-X / FinRL-Trading. Before writing any code, verify two things in the repository itself: that the example notebook matching your asset class still runs against current data sources, and that pyproject.toml's dependency list resolves in your Python version, since it pins git-sourced elegantrl and a broad set of market data clients.

## FAQ

### How do I install FinRL?

The package is published on PyPI as finrl, so pip install finrl is the shortest path. For a source checkout, clone the repository and install from requirements.txt; note that requirements.txt says TA-lib is installed with conda, so that one dependency is not covered by a plain pip install.

### How do I use FinRL for a trading task?

The workflow has three stages, and the examples directory reflects them with FinRL_StockTrading_2026_1_data.py, FinRL_StockTrading_2026_2_train.py and FinRL_StockTrading_2026_3_Backtest.py. You prepare data, train a DRL agent against a market environment, then backtest the resulting policy.

### What is FinRL?

FinRL is an open source framework for financial reinforcement learning, organized around market environments, DRL agents and financial applications. The repository describes itself as the original FinRL library for education, benchmarking and research prototyping, with FinRL-X positioned as the next generation for production use.

## Sources

- [AI4Finance-Foundation/FinRL on GitHub](https://github.com/AI4Finance-Foundation/FinRL)
- [License: MIT](https://github.com/AI4Finance-Foundation/FinRL/blob/master/LICENSE)
- [Project website](https://finrl.ai)
- [README](https://github.com/AI4Finance-Foundation/FinRL/blob/master/README.md)
- [Releases](https://github.com/AI4Finance-Foundation/FinRL/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/ai4finance-foundation-finrl
