All projects16 / 43
AI & Data
RL Trading Agent
Q-Learning vs Deep Q-Network
At a glance
- Discipline
- AI & Data
- Key features
- 5 delivered
- Screens
- 1 in gallery
PythonPyTorchNumPyPandasyfinanceMatplotlib
RL Trading Agent

Overview
Reinforcement learning agents that learn Buy, Sell and Hold decisions on historical AAPL data, comparing tabular Q-Learning with a DQN.
A custom trading environment rewards agents on portfolio performance, with market states represented by normalised 10-day price movements.
The PyTorch DQN uses experience replay, target networks, epsilon-greedy exploration and gradient clipping.
Key features
- 01Custom Buy / Sell / Hold environment
- 02Tabular Q-Learning with state discretisation
- 03DQN with replay buffer and target network
- 04Configurable ticker, range and episodes
- 05Loss, action and profit visualisation
Up next17 / 43
Leaf Recognition
Shape & texture computer vision
