AI4Finance-Foundation / FinRL
- четверг, 24 марта 2022 г. в 00:32:09
FinRL: The first open-source project for financial reinforcement learning. Please star. 🔥
Our Mission: to efficiently automate trading. We continuously develop and share codes for finance.
Our Vision: AI community has accumulated an open-source code ocean over the past decade. Applying these intellectual and engineering properties to finance will initiate a paradigm shift from the conventional trading routine to an automated machine learning approach, even RLOps in finance.
FinRL (website) is the first open-source project to explore the great potential of deep reinforcement learning in finance. We help practitioners pipeline a trading strategy using deep reinforcement learning (DRL).
The FinRL ecosystem is a unified framework, including various markets, state-of-the-art algorithms, financial tasks (portfolio management, cryptocurrency trading, high-frequency trading), live trading, etc.
Roadmap | Level | Users | Example | Desription |
---|---|---|---|---|
0.0 (Preparation) | preparation | practitioners of financial big data | FinRL-Meta | a universe of market environments |
1.0 (Proof-of-Concept) | entry-level | beginners | this repo | demonstration, education |
2.0 (Professional) | intermediate-level | full-stack developers, professionals | ElegantRL | financially optimized DRL algorithms |
3.0 (Production) | advance-level | investment banks, hedge funds | Podracer | cloud-native solution |
FinRL has three layers: applications, drl agents, and market environments.
For a trading task (on the top), an agent (in the middle) interacts with an environment (at the bottom), making sequential decisions.
Run FinRL_StockTrading_NeurIPS_2018.ipynb step by step for a quick start.
A video about FinRL library at the AI4Finance Youtube Channel.
Correspondingly, the main folder finrl has three subfolders apps, drl_agents, finrl_meta.
We employ a train-test-trade pipeline by three files: train.py, test.py, and trade.py.
FinRL
├── finrl (main folder)
│ ├── applications
│ ├── cryptocurrency_trading
│ ├── high_frequency_trading
│ ├── portfolio_allocation
│ ├── stock_trading
│ └──
│ ├── agents
│ ├── elegantrl
│ ├── rllib
│ └── stablebaseline3
│ ├── finrl_meta
│ ├── data_processors
│ ├── env_cryptocurrency_trading
│ ├── env_portfolio_allocation
│ ├── env_stock_trading
│ ├── preprocessor
│ ├── data_processor.py
│ └── finrl_meta_config.py
│ ├── config.py
│ ├── config_tickers.py
│ ├── main.py
│ ├── plot.py
│ ├── train.py
│ ├── test.py
│ └── trade.py
│
├── tutorial (tutorial notebooks and educational files)
├── unit_testing (make sure verified codes working on env & data)
│ ├── test_env
│ └── test_env_cashpenalty.py
│ └── test_marketdata
│ └── test_yahoodownload.py
├── setup.py
├── requirements.txt
└── README.md
Data Source | Type | Range and Frequency | Request Limits | Raw Data | Preprocessed Data |
---|---|---|---|---|---|
Alpaca | US Stocks, ETFs | 2015-now, 1min | Account-specific | OHLCV | Prices&Indicators |
Baostock | CN Securities | 1990-12-19-now, 5min | Account-specific | OHLCV | Prices&Indicators |
Binance | Cryptocurrency | API-specific, 1s, 1min | API-specific | Tick-level daily aggegrated trades, OHLCV | Prices&Indicators |
CCXT | Cryptocurrency | API-specific, 1min | API-specific | OHLCV | Prices&Indicators |
IEXCloud | NMS US securities | 1970-now, 1 day | 100 per second per IP | OHLCV | Prices&Indicators |
JoinQuant | CN Securities | 2005-now, 1min | 3 requests each time | OHLCV | Prices&Indicators |
QuantConnect | US Securities | 1998-now, 1s | NA | OHLCV | Prices&Indicators |
RiceQuant | CN Securities | 2005-now, 1ms | Account-specific | OHLCV | Prices&Indicators |
tusharepro | CN Securities, A share | -now, 1 min | Account-specific | OHLCV | Prices&Indicators |
WRDS | US Securities | 2003-now, 1ms | 5 requests each time | Intraday Trades | Prices&Indicators |
YahooFinance | US Securities | Frequency-specific, 1min | 2,000/hour | OHLCV | Prices&Indicators |
OHLCV: open, high, low, and close prices; volume. adjusted_close: adjusted close price
Technical indicators: 'macd', 'boll_ub', 'boll_lb', 'rsi_30', 'dx_30', 'close_30_sma', 'close_60_sma'. Users also can add new features.
@article{finrl2020,
author = {Liu, Xiao-Yang and Yang, Hongyang and Chen, Qian and Zhang, Runjia and Yang, Liuqing and Xiao, Bowen and Wang, Christina Dan},
title = {{FinRL}: A deep reinforcement learning library for automated stock trading in quantitative finance},
journal = {Deep RL Workshop, NeurIPS 2020},
year = {2020}
}
@article{liu2021finrl,
author = {Liu, Xiao-Yang and Yang, Hongyang and Gao, Jiechao and Wang, Christina Dan},
title = {{FinRL}: Deep reinforcement learning framework to automate trading in quantitative finance},
journal = {ACM International Conference on AI in Finance (ICAIF)},
year = {2021}
}
We published FinTech papers, check Google Scholar, resulting in this project. Closely related papers are given in the list.
Welcome to the AI4Finance Foundation community!
Join to discuss FinRL: AI4Finance mailing list, AI4Finance Slack channel:
Please check Contributing Guidances.
Thanks!
Welcome gift money to support AI4Finance, a non-profit academic community. Use the links in the right, or scan the following vemo QR code:
Detailed sponsorship records can be found at Issue #425
MIT License
Disclaimer: Nothing herein is financial advice, and NOT a recommendation to trade real money. Please use common sense and always first consult a professional before trading or investing.