Advanced Stock Predictor AI is a sophisticated machine learning-powered web application built with Streamlit that provides real-time stock analysis, technical indicators, and AI-driven price predictions for Indian penny stocks. The application combines traditional technical analysis with cutting-edge machine learning algorithms to deliver comprehensive investment insights.
- Real-time Stock Data: Live market data integration using Yahoo Finance API
- Technical Analysis: Advanced indicators including RSI, MACD, Bollinger Bands, and Moving Averages
- AI Predictions: Multiple machine learning models for price forecasting
- Interactive Charts: Dynamic, responsive visualizations with Plotly
- User Authentication: Secure login system with demo and registered user support
- Market Overview: Real-time market snapshot with key metrics
- Random Forest Regressor: Ensemble learning for robust predictions
- Gradient Boosting: Sequential learning for capturing complex patterns
- Linear Regression: Baseline model for trend analysis
- Feature Engineering: 20+ technical indicators and derived features
- Model Confidence Scoring: Reliability metrics for each prediction
- Ensemble Predictions: Combined model outputs for enhanced accuracy
- RSI (Relative Strength Index): Momentum oscillator for overbought/oversold conditions
- MACD: Trend-following momentum indicator
- Moving Averages: SMA and EMA for trend identification
- Bollinger Bands: Volatility and price level analysis
- Volume Analysis: Trading volume patterns and trends
- Price Patterns: Support/resistance levels and trend detection
Category | Technology | Version |
---|---|---|
Backend | Python | 3.12.4 |
Web Framework | Streamlit | 1.32.0 |
Data Processing | Pandas | 2.2.2 |
Numerical Computing | NumPy | 1.26.4 |
Machine Learning | Scikit-learn | 1.4.2 |
Data Visualization | Plotly | 5.22.0 |
Market Data | yfinance | 0.2.65 |
UI Styling | Custom CSS | - |
- Python 3.12+
- Anaconda or Miniconda (recommended)
- Git
-
Clone the Repository
git clone https://github.com/yourusername/advanced-stock-predictor-ai.git cd advanced-stock-predictor-ai
-
Create Virtual Environment
conda create -n stock-predictor python=3.12 conda activate stock-predictor
-
Install Dependencies
pip install -r requirements.txt
-
Run the Application
streamlit run main.py
-
Access the App Open your browser and navigate to
http://localhost:8504
๐ฆ Advanced Stock Predictor AI
โโโ ๐ main.py # Main Streamlit application
โโโ ๐ ml_predictor.py # Machine learning models and predictions
โโโ ๐ login.py # User authentication system
โโโ ๐ requirements.txt # Python dependencies
โโโ ๐ README.md # Project documentation
โโโ ๐ .vscode/ # VS Code configuration
โ โโโ ๐ settings.json # Python interpreter settings
โโโ ๐ .git/ # Git repository
โโโ ๐ .venv/ # Virtual environment (if using venv)
Real-time stock metrics with animated gradient background and glass-morphism design
Comprehensive market analysis with real-time data and key performance indicators
Interactive candlestick charts with moving averages, RSI, MACD, and volume analysis
Machine learning model performance comparison and future price predictions with confidence metrics
The application currently supports these Indian penny stocks:
- YESBANK.NS (Yes Bank)
- SUZLON.NS (Suzlon Energy)
- PNB.NS (Punjab National Bank)
- IDEA.NS (Vodafone Idea)
- RPOWER.NS (Reliance Power)
- JPPOWER.NS (Jaiprakash Power)
- IRFC.NS (Indian Railway Finance)
- ONGC.NS (Oil and Natural Gas)
- IOB.NS (Indian Overseas Bank)
- TATAPOWER.NS (Tata Power)
- Technical Indicators: Adjustable periods for RSI, MACD, and moving averages
- Chart Timeframes: 3 months to 2 years of historical data
- ML Model Settings: Confidence thresholds and ensemble options
- Prediction Horizons: 1 to 365 days ahead forecasting
- Launch the Application: Run
streamlit run main.py
- Login: Use demo credentials or register as a new user
- Select Stock: Choose from the dropdown list of supported stocks
- Configure Analysis: Set technical indicator parameters and prediction settings
- View Results: Analyze charts, technical indicators, and AI predictions
- View real-time candlestick charts with volume
- Analyze RSI for momentum and overbought/oversold conditions
- Monitor MACD for trend changes and momentum shifts
- Track moving averages for trend identification
- Train multiple ML models on historical data
- Compare model performance metrics (RMSE, Rยฒ, confidence)
- Generate future price predictions with confidence intervals
- View feature importance for model interpretability
- Get trading recommendations based on AI analysis
- Adjust technical indicator parameters
- Set prediction timeframes and confidence thresholds
- Enable/disable ensemble predictions
- Configure chart display options
Model | Type | Features | Strengths |
---|---|---|---|
Random Forest | Ensemble | 20+ technical indicators | Handles non-linearity, robust to overfitting |
Gradient Boosting | Sequential | Price patterns, volume data | High accuracy, learns from errors |
Linear Regression | Linear | Moving averages, ratios | Fast, interpretable, good baseline |
- Price Features: Open, High, Low, Close, Volume
- Technical Indicators: RSI, MACD, Bollinger Bands, Momentum
- Moving Averages: SMA(5,10,20,50), EMA(12,26)
- Derived Features: Price ratios, volatility, lag features
- Time Features: Day of week, month seasonality
- RMSE: Root Mean Square Error for prediction accuracy
- MAE: Mean Absolute Error for average prediction deviation
- Rยฒ Score: Coefficient of determination for model fit quality
- Confidence Score: Custom metric based on prediction reliability
- Modern UI: Glass-morphism design with animated gradients
- Responsive Layout: Optimized for desktop and mobile viewing
- Interactive Elements: Real-time updates and smooth transitions
- Color Psychology: Strategic use of colors for different signal types
- Accessibility: High contrast ratios and clear visual hierarchy
- Gradient Backgrounds: Animated color transitions
- Glass Cards: Translucent containers with backdrop blur
- Signal Colors: Green (bullish), Red (bearish), Orange (neutral)
- Typography: Poppins font for modern, readable text
- Icons: Contextual emojis for intuitive navigation
IMPORTANT: This application is designed for educational and research purposes only.
Investment Risks:
- Past performance does not guarantee future results
- Stock market investments carry inherent risks
- AI predictions are based on historical patterns and may not account for unforeseen events
- Always conduct your own research and consult with qualified financial advisors
- Never invest more than you can afford to lose
Model Limitations:
- Predictions are probabilistic, not certainties
- Market volatility can exceed model expectations
- External factors (news, events, policy changes) may impact accuracy
- Model performance may vary across different market conditions
We welcome contributions to improve the Advanced Stock Predictor AI! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Make your changes
- Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- New ML Models: Implement LSTM, Prophet, or other time series models
- Additional Indicators: Add new technical analysis tools
- Market Expansion: Support for international markets
- Performance Optimization: Improve computational efficiency
- UI/UX Enhancements: Design improvements and new features
- Testing: Unit tests and integration tests
- Documentation: Improve code documentation and user guides
- Follow PEP 8 Python style guidelines
- Use meaningful variable and function names
- Add docstrings for all functions and classes
- Comment complex algorithms and business logic
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Advanced Stock Predictor AI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- Issues: Report bugs or request features via GitHub Issues
- Discussions: Join the community discussions on GitHub Discussions
- Documentation: Visit our Wiki for detailed guides
- Real-time WebSocket data feeds
- Advanced LSTM neural networks
- Sentiment analysis from news/social media
- Portfolio optimization tools
- Risk management dashboard
- Mobile app development
- Multi-asset support (crypto, forex, commodities)
- Algorithmic trading integration
- Advanced backtesting framework
- Cloud deployment options
- API for external integrations
- Yahoo Finance: For providing free market data API
- Streamlit Team: For the amazing web app framework
- scikit-learn: For robust machine learning tools
- Plotly: For interactive visualization capabilities
- Open Source Community: For the incredible tools and libraries that make this project possible
โญ Star this repository if you find it helpful!
๐ด Fork it to create your own version!
๐ Report issues to help us improve!
Last updated: August 31, 2025