# FinRL

Gym-style market environments and deep-RL agents for trading research, MIT-licensed.

**Best for:** students and researchers reproducing financial reinforcement-learning papers on daily US stock bars; not for anyone who needs a current package, a realistic fill model or live execution.

*https://stockmarketstack.com/tools/finrl · Backtesting Frameworks & Algo Trading Libraries*

## Facts

### At a glance

| Field | Value |
| --- | --- |
| Vendor | AI4Finance Foundation |
| Category | Backtesting Frameworks & Algo Trading Libraries |
| Job | research |
| Website | https://finrl.ai |
| Pricing model | open-source |
| Free tier | true |
| Open source | true |
| Licence | MIT |
| Self-hosted | true |
| Tested hands-on | no |
| Claimed by vendor | no |
| Last updated | 2026-10-07 |

### Coverage

| Field | Value |
| --- | --- |
| Asset classes | stocks, etf, crypto, forex |
| Markets | us, asia |
| Works outside the US | true |
| Data latency | none |
| Platforms | library |
| AI features | research |

### Interfaces

| Field | Value |
| --- | --- |
| API | false |
| Webhooks | false |
| Scripting | Python |
| Python | true |
| Spreadsheet add-in | false |
| MCP server | false |
| Export | csv |

### Capabilities

Yes: backtesting, automation, paper_trading

No: charting, screening, scanning, live_trading, portfolio_tracking, broker_import, tax_reporting, alerts, news, options_analysis

*Verified: pricing 2026-10-07; capabilities 2026-10-07; coverage 2026-10-07.*

## What it is

FinRL is the AI4Finance Foundation's library for training deep reinforcement-learning agents on
market data. It is built in three layers. Market environments are gym-style simulators for single
stocks, a multi-stock account, portfolio allocation and crypto. Agent wrappers sit over
Stable-Baselines3, ElegantRL, Ray RLlib and, since September 2026, FastTD3. Applications are worked
examples for stock trading, ensembles and portfolio allocation. The loop is train, test, trade. An
agent sees prices, holdings and indicators, outputs a buy or sell quantity per ticker, and is
rewarded by the change in account value.

The 2026 tutorial is the shape of the whole thing. It downloads a fixed 30-ticker Dow list from
Yahoo and adds MACD, RSI, VIX and a turbulence index. It trains A2C, DDPG, PPO, TD3 and SAC for
20,000 timesteps each on 2014–2025, then backtests them on 1 January to 20 March 2026 against a
mean-variance portfolio and the DJIA.

The repository now describes itself as the "original" framework for education and research. Its
README sends new users to [FinRL-X](https://stockmarketstack.com/tools/finrl-x), a separate Apache-2.0 repository where
strategies return portfolio weights instead of acting inside a gym environment. MIT per the
LICENSE file, about 16,600 stars, not archived, first published in July 2020.

## Pricing

The library is MIT, and the site's FAQ says that commercial use is allowed. finrl.ai also
advertises a Pro tier at $19.90 a month or $199 a year and an Enterprise tier on request, but the
Pro button opens an email rather than a checkout (see the FAQ). The real costs are compute and
data: Alpaca, WRDS and FXMacroData each need an account of their own.

## Data & coverage

The README's table lists fifteen data sources. The `DataProcessor` class, which the pipeline goes
through, accepts only four: `yahoofinance`, `alpaca`, `wrds` and `fxmacrodata`. Anything else
raises "Data source input is NOT supported yet". Processor files for CCXT, EODHD, JoinQuant,
QuantConnect and Sinopac sit in the tree but are not wired in. Separate downloaders cover Tushare
for China, Shioaji for Taiwan and Interactive Brokers through `ib_insync`. Everything is OHLCV bars plus the indicators FinRL computes. It
ships no data of its own.

## Integrations

Python only. Agents come from Stable-Baselines3, ElegantRL (installed from its git master) and
RLlib, and evaluation uses pyfolio-reloaded. The paper-trading class talks to Alpaca through
`alpaca_trade_api`, the older of Alpaca's two Python SDKs, which has had no release since January
2024. It polls on a fixed interval and submits market orders with day time-in-force.

## Limitations

- The environment is the backtest, and its fill model is simple. An order fills at the close in
  the agent's own state, the bar it just observed, plus a flat percentage cost (0.1% each way in
  the tutorial). There is no next-bar delay, no spread and no slippage. The README's comparison
  table calls this "custom hand-rolled evaluation loops".
- The tutorial universe is fixed. The list in `config_tickers.py` includes NVDA, AMZN and SHW and
  is applied unchanged to every day from 6 January 2014, so the backtest holds today's index
  members on dates when some were not in the index.
- Packaging is broken in two directions: the PyPI wheel declares no dependencies, and the
  repository's own pins hold yfinance and ccxt a major version behind.
- The hosted docs still build as version 0.3.1, and their install page tells you to install
  Anaconda first.
- "FinRL" is a trademark of FinRL LLC, licensed to the foundation. The MIT licence covers the
  code, not the name.

## Alternatives

[Qlib](https://stockmarketstack.com/tools/qlib) is the closest research pipeline. It does supervised factor models rather than
RL, ships a model zoo and keeps its own data store. [VectorBT](https://stockmarketstack.com/tools/vectorbt) and
[Backtesting.py](https://stockmarketstack.com/tools/backtesting-py) are the tools to reach for once a policy has to survive a
fill model you trust. [FinGPT](https://stockmarketstack.com/tools/fingpt) and [FinRobot](https://stockmarketstack.com/tools/finrobot) are the same
foundation's LLM projects and solve a different problem. [FinRL-X](https://stockmarketstack.com/tools/finrl-x) is the
foundation's successor: it backtests on bt, rebalances through Alpaca and borrows only FinRL's DRL
portfolio environment.

## FAQ

### Is FinRL still maintained?

The repository is, the package less so. On 7 October 2026 the last commit to master was 28 September 2026, a batch of merged bug fixes, and the repository was not archived. The last tagged release, v0.3.8 on 20 March 2026, added the 2026 tutorial scripts. 284 issues and 25 pull requests were open. The README now sends new users to FinRL-X, a separate repository.

### Does `pip install finrl` give me a working install?

No. PyPI holds 0.3.7 from 12 April 2024, and that wheel declares no dependencies at all, so it installs without Stable-Baselines3, PyTorch, yfinance or anything else the code imports. Installing from the repository builds 0.3.8 through `pyproject.toml`, which pins yfinance below 0.3 (PyPI is at 1.7.0), ccxt below 4, alpaca-py to 0.37 and ElegantRL to its git master.

### Can FinRL trade a real account?

It ships a paper-trading loop for Alpaca whose default endpoint is Alpaca's paper API. The README's own comparison table rates FinRL's live trading as "Basic Alpaca support" with risk management limited to "Gym environment constraints only", and points anyone deploying capital to FinRL-X instead.

### What does the paid Pro plan on finrl.ai get you?

We could not find out. The pricing page lists Pro at $19.90 a month or $199 a year, with extended datasets, risk modules and a faster backtest engine, but its button opens a pre-filled email to the project's contact address. There is no checkout, and the site's own FAQ says the MIT licence already permits commercial use.

## Also from AI4Finance Foundation

- [FinGPT](https://stockmarketstack.com/tools/fingpt.md)
- [FinRL-X](https://stockmarketstack.com/tools/finrl-x.md)
- [FinRobot](https://stockmarketstack.com/tools/finrobot.md)

## Also worth comparing

- [Kronos](https://stockmarketstack.com/tools/kronos.md) — Open-weights transformer pre-trained on OHLCV bars. The training corpus is not released.
- [Qlib](https://stockmarketstack.com/tools/qlib.md) — Microsoft's ML factor-research pipeline. The data its CLI downloads stops in late 2020.
- [Backtesting.py](https://stockmarketstack.com/tools/backtesting-py.md) — A single-instrument Python backtester — one OHLC series, one strategy, no live trading.
- [Backtrader](https://stockmarketstack.com/tools/backtrader.md) — An event-driven Python backtester with 122 indicators, frozen since April 2023.
- [bt](https://stockmarketstack.com/tools/bt.md) — Python backtesting for allocation and rebalancing rules, not entries and exits.
- [fastquant](https://stockmarketstack.com/tools/fastquant.md) — A one-call wrapper over Backtrader, dormant since 2023 and broken on PyPI.
