Time Series Analysis using LSTM
This project predicts stock market prices using Long Short-Term Memory (LSTM) networks.
It utilizes Yahoo Finance stock market data, preprocesses it, and trains an LSTM model to predict future stock prices.
✔️ Data Preprocessing – Cleans & normalizes stock prices
✔️ LSTM Model – Predicts stock prices based on historical data
✔️ Visualization – Plots training loss & actual vs predicted prices
✔️ W&B Integration – Logs training metrics & visualizations
📂 yahoo_stock_lstm/
│── 📄 dataload.py # Loads & preprocesses the dataset
│── 📄 model.py # Defines the LSTM model
│── 📄 train.py # Trains the LSTM model
│── 📄 inference.py # Runs inference (predictions)
│── 📄 README.md # Project documentation
│── 📄 requirements.txt # Dependencies (optional)
│── 📄 training_loss.png # Training loss graph
│── 📄 lstm_prediction.png # Prediction results
1️⃣ Clone the repository
git clone https://github.com/your-username/Yahoo-Finance-Stock-Market-Prediction.git
cd Yahoo-Finance-Stock-Market-Prediction
2️⃣ Install dependencies
pip install -r requirements.txt
3️⃣ Set up Weights & Biases (W&B)
Login to W&B with your API key:
wandb login YOUR_WANDB_API_KEY
python train.py
✅ This will:
✔️ Load the dataset
✔️ Train the LSTM model
✔️ Save the trained model as lstm_model.h5
✔️ Log metrics to W&B Training Dashboard
🔗 My Training Logs: View Here
python inference.py
✅ This will:
✔️ Load the trained model
✔️ Make predictions on the test set
✔️ Plot actual vs predicted stock prices
🔗 My Inference Logs: View Here
🔗 Full W&B Project Dashboard:
👉 View All Logs & Visualizations
- Python 🐍
- TensorFlow/Keras 🔥
- Scikit-Learn 📊
- Matplotlib & Seaborn 📉
- Weights & Biases (W&B) 🚀
✅ Implement W&B Sweeps for hyperparameter tuning
✅ Compare GRU-based models
✅ Enhance feature engineering with technical indicators
This project is open-source and available under the MIT License.
👤 Rohan Shenoy
📧 Email: roshenoy30@gmail.com
🔗 GitHub: rohanshenoy30