This project predicts Microsoft stock prices using a LSTM (Long Short-Term Memory) model.
It is built with Python, TensorFlow/Keras, and data visualization with Matplotlib and Seaborn.
LSTM-STOCK-PREDICTION/
├── main.py
├── MicrosoftStock.csv
├── plots/
│ ├── open_close_prices.png
│ ├── volume_over_time.png
│ ├── feature_correlation.png
│ ├── price_over_time.png
│ └── predictions_vs_actual.png
└── requirements.txt
-
Data Loading & Exploration:
Load Microsoft stock data (MicrosoftStock.csv) and perform basic EDA (head, info, description). -
Visualization:
- Open vs Close Prices
- Trading Volume
- Feature Correlation Heatmap
- Price over Time
-
Data Preprocessing:
- Scale data using
StandardScaler - Create sliding window dataset for LSTM (60 days)
- Scale data using
-
Model Architecture:
- Two LSTM layers
- Dense layer with 128 neurons
- Dropout layer (0.5)
- Output Dense layer (1 neuron for stock price)
-
Training:
- 20 epochs, batch size 32
- Metrics: MAE & RMSE
-
Prediction & Plotting:
- Test set predictions
- Compare predictions with actual stock prices
- Save all plots in the
plots/folder
- Clone this repo:
bash git clone https://github.com/Sparkydev007/LSTM-STOCK-PREDICTION.git cd LSTM-STOCK-PREDICTION
- Install dependencies:
pip install -r requirements.txt
- Run the model:
python main.py
Tech Stack
Python 3.x
TensorFlow / Keras
Pandas, Numpy
Matplotlib, Seaborn
Scikit-learn
Author,
Prathmesh Bunde.
Stock Prediction Projects | ML Enthusiast | Python Developer




