Skip to content

mrayanghosh/github.com-mrayanghosh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AI-Powered Stock Price Prediction System

This is my project for the Edunet Foundation - AICTE Internship (IBM SkillsBuild, Artificial Intelligence, 6 weeks). The idea is simple - feed a deep learning model 5 years of a stock's price history and let it learn the pattern well enough to predict the next closing price.

I used Google (GOOG) stock for training, but the same code works for any ticker, just change the symbol.

What it does

  • Pulls 5 years of historical price data using yfinance
  • Scales the data with MinMaxScaler (LSTM works much better on 0-1 range)
  • Trains a Sequential model - LSTM + Dropout + Dense layers
  • Plots actual vs predicted prices so you can see how close it gets
  • Wrapped in a small Streamlit app so anyone can try it from the browser

Tech used

  • Python
  • TensorFlow / Keras
  • pandas, numpy
  • scikit-learn (just for MinMaxScaler)
  • matplotlib
  • yfinance
  • Streamlit (for the web app)

Files

  • train_model.py - trains the LSTM model and saves it
  • app.py - the Streamlit app
  • requirements.txt - everything you need to pip install
  • stock_lstm_model.h5 / scaler.save - get created after you run training

How to run it

  1. Install the requirements:
pip install -r requirements.txt
  1. Train the model first (this downloads data and trains, takes a few minutes):
python train_model.py
  1. Once that's done, run the app:
streamlit run app.py

Then just type in a stock ticker (GOOG, AAPL, TSLA, whatever) and hit Run Prediction.

Result

Got around 95% training accuracy and ~91% on validation, RMSE comes out pretty reasonable for GOOG. The predicted curve follows the actual price trend quite closely, which was the main goal.

What I'd add next

  • Add some technical indicators like moving averages or RSI
  • Maybe try sentiment from news headlines
  • Live data instead of just historical
  • Try GRU or transformer based models and compare

Author

Ayan Ghosh JN Institute of Computer and Technology - Master Diploma in Information Technology Edunet Foundation | IBM SkillsBuild | AI Internship, May-June 2026

About

No description, website, or topics provided.

Resources

Stars

14 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages