A powerful stock price prediction system built with LSTM neural networks, featuring real-time data from yfinance, interactive model training, and comprehensive performance metrics through a user-friendly Streamlit interface.
- ๐ Real-time Data: Fetches real-time stock data using yfinance
- ๐ Interactive Training: Fine-tune model parameters through an intuitive interface
- ๐ค Advanced LSTM Architecture: Multi-layer LSTM with dropout for robust predictions
- ๐ Comprehensive Metrics: Track MSE, RMSE, MAE, and Rยฒ scores
- ๐ฏ Future Predictions: Generate price predictions with confidence intervals
- ๐ Performance Tracking: Monitor model performance over time
- ๐ฑ Responsive UI: User-friendly interface built with Streamlit
Technology | Purpose |
---|---|
Python | Core language |
TensorFlow | Deep learning framework |
Streamlit | Web interface |
yfinance | Stock data source |
Pandas | Data manipulation |
Matplotlib | Data visualization |
Scikit-learn | Model evaluation |
Docker | Containerization |
Render | Cloud hosting |
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ โ โ โ
โ Web Interface โโโโโโถโ Data Fetching โโโโโโถโ Preprocessing โ
โ (Streamlit) โ โ (yfinance) โ โ โ
โ โ โ โ โ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ
โ โ
โ โผ
โ โโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โ โ LSTM Training โ
โ โ โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโ
โ โ
โ โผ
โ โโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โ โ Model Evaluation โ
โ โ โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ Price Prediction โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Python 3.8 or higher
- No API key required (yfinance is used)
- Clone the repository:
git clone https://github.com/VisionExpo/Stock_price_prediction.git
cd Stock_price_prediction
- Run the setup script:
For Windows:
setup_env.bat
For macOS/Linux:
chmod +x setup_env.sh
./setup_env.sh
This script will:
- ๐จ Create a virtual environment
- โก Activate the virtual environment
- ๐ฆ Install dependencies
- ๐ Create a .env file from the example if it doesn't exist
- No API keys are required for this project
- Clone the repository:
git clone https://github.com/VisionExpo/Stock_price_prediction.git
cd Stock_price_prediction
- Create and activate a virtual environment:
For Windows:
python -m venv venv
venv\Scripts\activate
For macOS/Linux:
python -m venv venv
source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Set up your environment variables:
cp .env.example .env
No API keys are required for this project.
streamlit run app.py
Then open http://localhost:8501 in your web browser.
View historical stock data with interactive charts:
- Price trends
- Volume analysis
- Moving averages
- Technical indicators
Train custom LSTM models with:
- Adjustable look-back periods
- Customizable layer architecture
- Hyperparameter tuning
- Early stopping options
Generate and visualize predictions:
- Short-term forecasts
- Long-term trends
- Confidence intervals
- Downloadable prediction data
Evaluate model performance with:
- Error metrics (MSE, RMSE, MAE)
- Rยฒ scores
- Prediction vs. actual comparisons
- Model version tracking
This application can be deployed on Render. You can access it at: https://stock-price-prediction.onrender.com/
For detailed deployment instructions, see DEPLOYMENT.md.
To run tests:
python -m pytest tests/
This project is licensed under the MIT License - see the LICENSE file for details.
- TensorFlow team for the deep learning framework
- Streamlit team for the web app framework
- yfinance for providing stock data access
- The open-source community for various libraries used in this project
For questions or feedback, please open an issue on GitHub or contact the maintainer at [email protected].
Made with โค๏ธ by Vishal Gorule