AdityaaXD commited on
Commit
d7b268e
·
verified ·
1 Parent(s): 46d764a

Update Model Card (README.md)

Browse files
Files changed (1) hide show
  1. README.md +74 -0
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: stable-baselines3
3
+ tags:
4
+ - reinforcement-learning
5
+ - finance
6
+ - stock-trading
7
+ - deep-reinforcement-learning
8
+ - dqn
9
+ - ppo
10
+ - a2c
11
+ model-index:
12
+ - name: RL-Trading-Agents
13
+ results:
14
+ - task:
15
+ type: reinforcement-learning
16
+ name: Stock Trading
17
+ metrics:
18
+ - type: sharpe_ratio
19
+ value: Variable
20
+ - type: total_return
21
+ value: Variable
22
+ ---
23
+
24
+ # 🤖 Multi-Agent Reinforcement Learning Trading System
25
+
26
+ This repository contains trained Deep Reinforcement Learning agents for automated stock trading. The agents were trained using `stable-baselines3` on a custom OpenAI Gym environment simulating the US Stock Market (AAPL, MSFT, GOOGL).
27
+
28
+ ## 🧠 Models
29
+
30
+ The following algorithms were used:
31
+ 1. **DQN (Deep Q-Network)**: Off-policy RL algorithm suitable for discrete action spaces.
32
+ 2. **PPO (Proximal Policy Optimization)**: On-policy gradient method known for stability.
33
+ 3. **A2C (Advantage Actor-Critic)**: Synchronous deterministic policy gradient method.
34
+ 4. **Ensemble**: A meta-voter that takes the majority decision from the above three.
35
+
36
+ ## 🏋️ Training Data
37
+
38
+ The models were trained on technical indicators derived from historical daily price data (2018-2024):
39
+ * **Returns**: Daily percentage change.
40
+ * **RSI (14)**: Relative Strength Index.
41
+ * **MACD**: Moving Average Convergence Divergence.
42
+ * **Bollinger Bands**: Volatility measure.
43
+ * **Volume Ratio**: Relative volume intensity.
44
+ * **Market Regime**: Bull/Bear trend classification.
45
+
46
+ ## 🎮 Environment (`TradingEnv`)
47
+
48
+ * **Action Space**: Discrete(3) - `0: HOLD`, `1: BUY`, `2: SELL`.
49
+ * **Observation Space**: Box(10,) - Normalized technical features + portfolio state.
50
+ * **Reward**: Profit & Loss (PnL) minus transaction costs and drawdown penalties.
51
+
52
+ ## 🚀 Usage
53
+
54
+ ```python
55
+ import gymnasium as gym
56
+ from stable_baselines3 import PPO
57
+
58
+ # Load the environment (custom wrapper required)
59
+ # env = TradingEnv(df)
60
+
61
+ # Load model
62
+ model = PPO.load("ppo_AAPL.zip")
63
+
64
+ # Predict
65
+ action, _ = model.predict(obs, deterministic=True)
66
+ ```
67
+
68
+ ## 📈 Performance
69
+
70
+ Performance varies by ticker and market condition. See the generated `results/` CSVs for detailed Sharpe Ratios and Max Drawdown stats per agent.
71
+
72
+ ## 🛠️ Credits
73
+
74
+ Developed by **Adityaraj Suman** as part of the Multi-Agent RL Trading System project.