Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Stock-prediction-ai-application

AI Stock Predictor AI Stock Predictor combines ML models and Gemini AI to predict stock prices, explain trends, and analyze news sentimentโ€”giving users clear insights, not just numbers.

๐ŸŽฏ Live Demo Watch the project in action:

๐Ÿ“บ YouTube Demo ๐Ÿ“– Inspiration The stock market is complex and often overwhelming, especially for beginners. Most tools either provide raw data or predictions, but very few explain why something is happening. We wanted to build a system that not only predicts stock prices but also explains trends, analyzes news, and helps users make informed decisions using AI.

โœจ What it does StockPredictor-AI is a full-stack web application that:

๐Ÿ“ˆ Predicts stock prices using LSTM and ARIMA models ๐Ÿค– Uses Google Gemini AI to generate human-readable insights ๐Ÿ“ฐ Fetches real-time news and performs sentiment analysis โš ๏ธ Classifies risk levels based on trends and news sentiment ๐Ÿ’ฌ Includes an AI chatbot for user queries and recommendations ๐Ÿ“Š Provides an interactive dashboard with charts and watchlist ๐Ÿ” Transforms raw financial data into clear, understandable insights ๐Ÿ› ๏ธ Tech Stack Frontend React.js - Responsive fintech dashboard Backend FastAPI - API handling and ML integration Machine Learning LSTM - Long Short-Term Memory for time-series prediction ARIMA - Statistical forecasting models Python - Data processing and model training AI Integration Google Gemini API for: Insights generation Prediction explanation Sentiment analysis Data Sources Yahoo Finance (yfinance) - Stock price data NewsAPI - Real-time news and sentiment Database PostgreSQL - User accounts and watchlist storage ๐Ÿ—๏ธ Architecture Frontend (React.js) โ†“ FastAPI Backend โ†“ โ”œโ”€ ML Models (LSTM, ARIMA) โ”œโ”€ Gemini AI API โ”œโ”€ News API Integration โ””โ”€ PostgreSQL Database ๐Ÿš€ Key Features Stock Price Prediction

LSTM neural network for deep learning predictions ARIMA for statistical forecasting Multiple time-horizon predictions AI-Powered Insights

Gemini API generates human-readable trend explanations Automatic pattern recognition Contextual market analysis News Sentiment Analysis

Real-time news fetching from NewsAPI Sentiment scoring and classification Impact assessment on stock movements Risk Classification

Combines ML predictions with news sentiment Assigns risk levels (Low, Medium, High) Provides actionable warnings Interactive Dashboard

Real-time price charts Prediction trends visualization News feed integration Customizable watchlist AI Chatbot

Answers user queries about stocks Provides personalized recommendations Explains complex market concepts ๐ŸŽ“ What We Learned How to integrate machine learning models into production applications Effective prompt engineering techniques with Generative AI Handling complex API orchestration and data pipelines Importance of UX/UI in technical fintech projects Real-world limitations and challenges of stock prediction models ๐Ÿ† Accomplishments โœ… Successfully combined ML + AI + real-time news in one cohesive platform โœ… Built a system that prioritizes explainability over raw predictions โœ… Implemented end-to-end functionality from user authentication to insights โœ… Designed a clean, modern fintech-style dashboard โœ… Created a technically robust yet user-friendly application

๐Ÿ”ง Challenges Solved โšก Integrating real-time data with ML models efficiently ๐ŸŽฏ Designing effective prompts for structured, useful insights ๐Ÿ“Š Handling inconsistent news sentiment across multiple sources โš–๏ธ Balancing prediction accuracy with performance requirements ๐ŸŽจ Creating a UI that is both simple and information-rich ๐Ÿ“ Installation & Setup Prerequisites Python 3.8+ Node.js 14+ PostgreSQL 12+ Google Gemini API Key NewsAPI Key Yahoo Finance access Backend Setup cd backend python -m venv env source env/bin/activate # On Windows: env\Scripts\activate pip install -r requirements.txt python ai.py Frontend Setup cd frontend npm install npm start ๐Ÿ“š Configuration Create a .env file in the root directory:

GEMINI_API_KEY=your_gemini_api_key NEWS_API_KEY=your_newsapi_key DATABASE_URL=postgresql://user:password@localhost/stockpredictor ๐Ÿ”ฎ What's Next We have exciting plans for future enhancements:

๐Ÿ“ก Real-time updates using WebSockets for live price streaming ๐Ÿ“Š Advanced technical indicators (RSI, MACD, Bollinger Bands) ๐Ÿง  Improved sentiment scoring with historical correlation analysis ๐Ÿ“ฑ Mobile app version for on-the-go tracking ๐ŸŒ Global market support (crypto, forex, international stocks) ๐Ÿค– Smarter AI assistant with personalized recommendations ๐Ÿ’พ Model versioning and A/B testing framework ๐Ÿค Contributing Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License This project is open source and available under the MIT License.

๐Ÿ‘ฅ Team Built with โค๏ธ for the Hack Day competition.

๐Ÿ“ž Support For questions or issues, please open an issue on the repository or contact the development team.

Note: Stock predictions are educational and should not be used as sole investment advice. Always consult with a financial advisor before making investment decisions.

Built With

Share this project:

Updates