This is an interactive Stock Price Prediction System built using Streamlit, LSTM (Long Short-Term Memory) neural networks, and Yahoo Finance API. It enables users to:
- Visualize historical stock prices with moving averages.
- Train a custom LSTM model for stock price prediction.
- Evaluate the trained model using various performance metrics.
- Predict future stock prices.
- 📈 Stock Data Visualization: Fetch and visualize stock data from Yahoo Finance.
- 🚀 Train LSTM Model: Train a custom LSTM model on selected stock data.
- 📊 Performance Evaluation: Evaluate the model using RMSE, MAE, and R-squared scores.
- 🔮 Stock Price Prediction: Predict future prices based on trained models.
- 🛠 Download Model & Scaler: Save and reuse trained models for future predictions.
Ensure you have Python 3.7+ installed and the required dependencies:
pip install streamlit pandas yfinance plotly numpy keras scikit-learn joblibgit clone https://github.com/your-username/stock-price-prediction.git
cd stock-price-predictionstreamlit run app.py- Select a Stock: Choose from available stocks (GOOG, AAPL, AMZN, MSFT) or enter a custom ticker.
- Set Date Range: Select the start and end dates for analysis.
- Visualize Data: View stock trends and moving averages.
- Train the Model: Train an LSTM model on historical stock data.
- Evaluate Performance: Analyze model accuracy with various metrics.
- Make Predictions: Use the trained model to forecast future stock prices.
stock-price-prediction/
│── app.py # Main Streamlit application
│── train_lstm.py # LSTM model training script
│── models/ # Saved trained models
│── data/ # Processed stock data
│── requirements.txt # Required dependencies
│── README.md # Project documentation
Contributions are welcome! Feel free to fork this repository, make changes, and submit a pull request.
This project is licensed under the MIT License.