How jung132914/deep-reinforcement-learning-for-automated-stock-trading-ensemble-strategy-icaif-2020 works
This repository implements a Dow 30 deep-reinforcement-learning trading strategy. The run script prepares market data, then coordinates rolling-window training of PPO, A2C, and DDPG, validation by Sharpe ratio, and quarterly trading with the selected agent. Separate Gym environments model training, validation, and trading. The README also documents notebook-based backtesting. Some orchestration details are in omitted portions of source; links are limited to relationships shown in excerpts, the SOURCE INDEX, or README.
Main entry points: models.py Rolling ensemble orchestration · preprocessors.py Preprocess market data · run_DRL.py Run workflow · results Portfolio results
Components 15
Data preparation
- Preprocess market data
preprocessing/preprocessors.py - Data and model config
config/config.py - Dow 30 data
data/dow_30_2009_2020.csv - Turbulence data
data/dow30_turbulence_index.csv
Ensemble strategy
- Run workflow
run_DRL.py - Rolling ensemble orchestration
model/models.py - PPO A2C DDPG
model/models.py - Sharpe model selection
model/models.py
Trading environments
- Training simulator
env/EnvMultipleStock_train.py - Validation simulator
env/EnvMultipleStock_validation.py - Trading simulator
env/EnvMultipleStock_trade.py
Trading outputs
- Saved agents
trained_models - Portfolio results
results - Backtesting notebook
backtesting.ipynb
Other components
- Operator
Connections 16
- Operator → Run workflow: starts
README.md - Run workflow → Preprocess market data: prepares data
run_DRL.py - Preprocess market data → Data and model config: reads settings
preprocessing/preprocessors.py - Preprocess market data → Dow 30 data: loads
- Run workflow → Rolling ensemble orchestration: runs strategy
run_DRL.py - Rolling ensemble orchestration → PPO A2C DDPG: trains
model/models.py - Rolling ensemble orchestration → Training simulator: uses
model/models.py - Rolling ensemble orchestration → Validation simulator: validates in
model/models.py - Rolling ensemble orchestration → Sharpe model selection: compares Sharpe
model/models.py - Sharpe model selection → Trading simulator: selects for trading
model/models.py - PPO A2C DDPG → Saved agents: saves
model/models.py - Training simulator → Portfolio results: writes account values
env/EnvMultipleStock_train.py - Validation simulator → Portfolio results: writes account values
env/EnvMultipleStock_validation.py - Trading simulator → Portfolio results: writes portfolio history
env/EnvMultipleStock_trade.py - Operator → Backtesting notebook: runs backtest
README.md - Preprocess market data → Turbulence data: may use