Sameer Babar
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
RL Trading Agent — screen 1

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

  1. 01Custom Buy / Sell / Hold environment
  2. 02Tabular Q-Learning with state discretisation
  3. 03DQN with replay buffer and target network
  4. 04Configurable ticker, range and episodes
  5. 05Loss, action and profit visualisation

Up next17 / 43

Leaf Recognition

Shape & texture computer vision

Leaf Recognition — screen 1

Contact

Have a project in mind? Let's build it together.

Tell me about your product, timeline and goals. I usually reply within 24 hours.

Email me