Skip to content

This project demonstrates how reinforcement learning can be used to analyze market behavior and learn automated stock trading strategies. It integrates technical analysis, data visualization, and RL algorithms to produce an intelligent trading simulation.

Notifications You must be signed in to change notification settings

JAHNAVIDINGARI/Stock-Trading-Agent-using-Deep-Reinforcement-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Stock-Trading-Agent-using-Deep-Reinforcement-Learning.

This project implements an automated stock trading system using Deep Reinforcement Learning techniques such as DQN and PPO. Historical Apple stock data is cleaned, processed, and enriched with multiple technical indicators including moving averages, RSI, MACD, and Bollinger Bands. A custom trading environment simulates real market behavior, allowing RL agents to learn optimal buy–sell–hold strategies through interaction and reward feedback. The project includes data visualization, feature engineering, normalization, cumulative return analysis, and prediction of future price movements, demonstrating how reinforcement learning can be effectively applied to algorithmic trading.

Dataset

apple_stock_data.csv

Reinforcement Learning Algorithms Used

1️ DQN (Deep Q-Network)-- Value-based RL, ε-greedy exploration, Two-layer neural network, Experience replay memory.

2️ PPO (Proximal Policy Optimization)-- Policy-gradient based, Actor–Critic architecture, Clipped objective function , Stable policy updates.

Technical Indicators Extracted

MA5, MA20, MA50, RSI, MACD + Signal Line, Bollinger Bands, Momentum, Volume Moving Averages, Price Variance, Daily Returns.

Visualizations

Closing price over time, OHLC combination plot, Volume plot, RSI curve, Daily return distribution, Agent action plot (Red = Buy, Blue = Sell, Green = Hold), Cumulative returns across episodes.

About

This project demonstrates how reinforcement learning can be used to analyze market behavior and learn automated stock trading strategies. It integrates technical analysis, data visualization, and RL algorithms to produce an intelligent trading simulation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published