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
- 12+
- 14+
- 3.8+
- access
- api
- backend
- finance
- gemini
- key
- newsapi
- node.js
- postgresql
- python
- yahoo
Log in or sign up for Devpost to join the conversation.