This repository contains the implementation of an advanced stock trading system using reinforcement learning (RL). The system employs several RL algorithms, including Deep Q-Networks (DQN), Advantage Actor-Critic (A2C), and Twin Delayed Deep Deterministic Policy Gradient (TD3), to navigate the complexities of the stock market and maximize financial returns.
Trading stocks effectively in the highly volatile and unpredictable financial markets requires innovative approaches beyond traditional methods. Our project utilizes reinforcement learning to dynamically adapt trading strategies based on real-time market data, aiming to outperform standard trading benchmarks.
- Multiple RL Algorithms: Implements DQN, A2C, and TD3, comparing their effectiveness in stock trading.
- Dynamic Strategy Adaptation: The system learns optimal trading actions directly from market interactions, adapting to changing conditions without human intervention.
- Real-World Data Application: Uses historical stock data from Larsen & Toubro (LnT) provided by Zerodha, covering the period from August 2011 to February 2024.
The architecture is based on three main components:
- Data Preprocessing: Converts raw stock data into a format suitable for RL training, including technical indicators like SMA and EMA.
- RL Environment Setup: Defines the state space, action space, and reward function critical for training the RL agents.
- RL Agents: Implements three distinct RL algorithms to train and evaluate different trading strategies.
For an in-depth explanation of the methodologies, architectures, and findings of this project, please refer to our detailed report available here.