FinRL_Crypto: FinRL 的加密货币交易
For financial reinforcement learning (FinRL), we provide a way to address the dreaded overfitting trap and increase your chances of success in the wild world of cryptocurrency trading. Our approach has been tested on 10 different currencies and during a market crash period, and has proven to be more profitable than the competition. So, don't just sit there, join us on our journey to the top of the crypto mountain!
Our paper
This repository is ready for work with Binance API for cryptocurrency trading using Deep Reinforcement Learning (DRL).
✅ Updated Dependencies - All packages are compatible with Python 3.8+ (and recommended for Python 3.10).
✅ Fixed Deprecated Methods - Code is compatible with new versions of pandas and numpy.
✅ Added Error Handling - Improved stability during execution.
✅ Optimized Performance - Replaced outdated pandas methods with more efficient alternatives.
For Python 3.10 (Recommended):
pip install -r requirements-python310.txtFor Python 3.11+:
pip install -r requirements.txtconfig_api.py and replace placeholders:API_KEY_BINANCE = 'YOUR_PUBLIC_API_KEY'
API_SECRET_BINANCE = 'YOUR_SECRET_API_KEY'Main settings are configured in config_main.py:
'5m' - 5-minute candlesticks ['BTC', 'ETH'])) python 0_dl_trainval_data.py # Download training/validation data
python 0_dl_trade_data.py # Download trade dataChoose one of the following optimization schemes:
python 1_optimize_cpcv.py python 1_optimize_kcv.py python 1_optimize_wf.py python 2_validate.py python 4_backtest.py config_main.py: Main configuration file. config_api.py: Binance API keys. processor_Binance.py: Data processing for Binance API. environment_Alpaca.py (Note: Alpaca is a separate trading environment; this project focuses on Binance). drl_agents/: DRL algorithms (e.g., PPO, A2C, DDPG, TD3, SAC).config_main.py.config_api.py # Install TA-Lib (if needed)
conda install -c conda-forge ta-lib # For Anaconda
# or for macOS:
brew install ta-lib Results are saved in the /plots_and_metrics/ folder.
config_main.py config_main.pyIf you encounter issues:
pip install -r requirements.txt or pip install -r requirements-python310.txt). config_api.py.**Ready to Go! **
This project is fully configured for cryptocurrency trading on Binance using advanced Deep Reinforcement Learning algorithms.
暂无开放 Issues,或尚未同步最近议题。