A Python framework for training deep reinforcement learning agents on simulated market environments. It targets education, benchmarking, and research with a train-test-trade workflow and multiple data connectors.
Overview
FinRL organizes quantitative trading research around three layers: market environments where agents act, DRL agent implementations, and application scripts for training, testing, and trading workflows. Users download and preprocess price data, fit policies with algorithms such as A2C, DDPG, PPO, SAC, and TD3, then backtest against baselines like mean-variance optimization or index buy-and-hold.
Environments integrate with Gym-style interfaces and can ingest equities, crypto, and other feeds from sources listed in the project, including Yahoo Finance, Binance, WRDS, and broker APIs mentioned in the ecosystem material. Technical indicators and risk-related signals such as turbulence indexes can augment raw OHLCV features.
The classic FinRL stack emphasizes an end-to-end pipeline with Stable Baselines 3 on PyTorch, custom evaluation loops, and tutorials aimed at learners and researchers. The maintainers note a newer FinRL-X line for production-oriented deployment, while the classic edition keeps the original educational framework.
Installation supports major desktop operating systems via pip, with tutorial scripts that download data, train several agents, and plot backtest comparisons. Documentation and community channels sit under the AI4Finance Foundation umbrella.
Key features
- Gym-style market environments
- PPO, SAC, TD3, DDPG, A2C agents
- Train-test-trade script pipeline
- Multi-source market data ingestion
- Technical indicator preprocessing
- Stable Baselines 3 integration
- Backtest against index baselines
- Equities, crypto, and FX coverage
Use cases
- University finance RL coursework
- Prototype stock trading agents
- Benchmark DRL on historical data
- Compare policies to MVO baselines
- Experiment with turbulence filters