FinPridict is a comprehensive full-stack application that provides advanced stock market analysis and prediction capabilities across US, Indian, and Cryptocurrency markets. Built with modern web technologies and powered by sophisticated Machine Learning and Deep Learning models, it delivers accurate price predictions and market insights through an intuitive, professional interface.
The platform combines traditional ML algorithms (SVM, Random Forest) with cutting-edge Deep Learning models (LSTM, RNN) and integrates real-time market data with sentiment analysis to provide holistic investment decision support.
- US Stock Market: NASDAQ, NYSE listed stocks with real-time data
- Indian Stock Market: NSE, BSE equities with comprehensive analysis
- Cryptocurrency: Major digital assets (BTC, ETH, ADA, etc.)
- LSTM Networks: Long Short-Term Memory for complex pattern recognition
- RNN Models: Recurrent Neural Networks for sequential data analysis
- SVM: Support Vector Machine for non-linear relationship modeling
- Random Forest: Ensemble learning for robust predictions
- Price Prediction: 5-30 day forecasts with confidence intervals
- Technical Indicators: RSI, Moving Averages, MACD, Bollinger Bands
- Sentiment Analysis: News-based market sentiment evaluation
- Market Overview: Real-time market statistics and trending stocks
- Professional UI/UX: Built with Next.js 14 and Tailwind CSS
- Interactive Dashboards: Real-time charts and data visualization
- Responsive Design: Optimized for desktop, tablet, and mobile
- Dark/Light Theme: User preference-based theme switching
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Next.js β β Flask API β β Data Sources β
β Frontend βββββΊβ Backend βββββΊβ β
β β β β β β’ Yahoo Finance β
β β’ Dashboard β β β’ AI Models β β β’ News APIs β
β β’ Market Views β β β’ Predictions β β β’ Market Data β
β β’ User Auth β β β’ Market Data β β β’ Sentiment β
β β’ Charts β β β’ Sentiment β β β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
Market Data Acquisition β Feature Engineering β Model Training β Prediction Generation β Web Interface
β β β β β
β’ Yahoo Finance API β’ Technical Indicators β’ LSTM/RNN/SVM β’ Price Forecasts β’ React Components
β’ News Sources β’ Sentiment Scores β’ Random Forest β’ Risk Analysis β’ Interactive Charts
β’ Real-time Feeds β’ Data Normalization β’ Ensemble Methods β’ Recommendations β’ User Dashboard
FinPridict/
βββ π frontend/ # Next.js Frontend Application
β βββ src/
β β βββ app/ # Next.js 14 App Router
β β β βββ dashboard/ # Dashboard pages
β β β βββ prediction/ # Prediction interface
β β β βββ us-market/ # US market analysis
β β β βββ indian-market/ # Indian market analysis
β β β βββ crypto-market/ # Crypto market analysis
β β β βββ api/ # API route handlers
β β βββ components/ # Reusable React components
β β β βββ auth/ # Authentication components
β β β βββ dashboard/ # Dashboard widgets
β β β βββ markets/ # Market-specific components
β β β βββ common/ # Shared UI components
β β βββ lib/ # Utilities and configurations
β βββ public/ # Static assets
β βββ package.json # Frontend dependencies
βββ π app.py # Flask API Server
βββ π models.py # AI/ML Model Implementations
βββ π utils.py # Data processing utilities
βββ π scrape_news_sentiment.py # News sentiment analysis
βββ π predict_terminal.py # CLI prediction tool
βββ π predict_crypto_terminal.py # CLI crypto prediction tool
βββ π requirements.txt # Python dependencies
- Framework: Next.js 14 (App Router)
- Language: JavaScript/JSX
- Styling: Tailwind CSS
- UI Components: Custom React components
- Charts: Chart.js / Recharts
- Authentication: Supabase Auth
- State Management: React Context API
- Framework: Flask (Python)
- AI/ML Libraries: TensorFlow, Scikit-learn
- Data Processing: Pandas, NumPy
- Market Data: Yahoo Finance API, Alpha Vantage
- Sentiment Analysis: NLTK, GoogleNews
- API Design: RESTful endpoints with JSON responses
- Stock Data: Yahoo Finance, Alpha Vantage
- News Data: Google News, NewsAPI
- Crypto Data: CoinGecko, Yahoo Finance
- Market Indices: Real-time index data
- Python 3.8+ (for backend)
- Node.js 18+ (for frontend)
- Git (for version control)
- API Keys: Alpha Vantage, NewsAPI (optional)
-
Clone the repository
git clone https://github.com/MaitreyThakar/SGP_2.git cd SGP_2 -
Create Python virtual environment
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install Python dependencies
pip install -r requirements.txt
-
Set up environment variables
# Create .env file in root directory echo "ALPHA_VANTAGE_API_KEY=your_api_key_here" > .env
-
Run Flask backend
python app.py
The API will be available at
http://localhost:5000
-
Navigate to frontend directory
cd frontend -
Install Node.js dependencies
npm install # or yarn install -
Set up environment variables
# Copy environment template cp .env.local.example .env.local # Edit .env.local with your configuration NEXT_PUBLIC_API_URL=http://localhost:5000 NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_key
-
Run development server
npm run dev # or yarn devThe application will be available at
http://localhost:3000
Stock Prediction CLI
python predict_terminal.py
# Enter stock ticker (e.g., AAPL, RELIANCE.NS)
# Enter prediction dateCryptocurrency Prediction CLI
python predict_crypto_terminal.py
# Enter crypto symbol (e.g., bitcoin, ethereum)
# Enter prediction dateNews Sentiment Analysis
python scrape_news_sentiment.py
# Enter company name or stock symbol# Build the frontend
cd frontend
npm run build
# Deploy to Vercel
npm install -g vercel
vercel --prod
# Or deploy to Netlify
npm install -g netlify-cli
netlify deploy --prod --dir=.next# Create Procfile
echo "web: python app.py" > Procfile
# Deploy to Heroku
heroku create finpridict-api
git add .
git commit -m "Deploy to Heroku"
git push heroku main
# Set environment variables
heroku config:set ALPHA_VANTAGE_API_KEY=your_key# Dockerfile for backend
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["python", "app.py"]# Test individual models
python -c "from models import train_lstm_model; print('LSTM model loaded successfully')"
# Test API endpoints
curl -X POST http://localhost:5000/predict \
-H "Content-Type: application/json" \
-d '{"stock_title": "AAPL"}'cd frontend
npm test
npm run test:e2e- Market Overview: Real-time market indices and statistics
- Portfolio Tracking: Personal stock watchlists and performance
- News Feed: Latest market news with sentiment analysis
- Interactive Charts: Candlestick, line, and technical indicator charts
- Multi-Model Ensemble: Combines LSTM, RNN, SVM, and Random Forest
- Confidence Intervals: Prediction accuracy and risk assessment
- Historical Backtesting: Model performance on historical data
- Custom Timeframes: 5, 15, 30-day prediction horizons
- Technical Indicators: RSI, MACD, Bollinger Bands, Moving Averages
- Fundamental Analysis: P/E ratios, market cap, volume analysis
- Sector Performance: Industry-wise market trends
- Gainers/Losers: Top performing and declining stocks
- Responsive Design: Optimized for all device sizes
- Dark/Light Themes: User preference-based theming
- Real-time Updates: Live market data streaming
- Export Capabilities: PDF reports and CSV data export
We welcome contributions to improve FinPridict! Here's how you can contribute:
-
Fork the Repository
git fork https://github.com/MaitreyThakar/SGP_2.git
-
Create Feature Branch
git checkout -b feature/your-feature-name
-
Make Changes
- Follow code style guidelines
- Add tests for new features
- Update documentation
-
Submit Pull Request
- Provide clear description of changes
- Include screenshots for UI changes
- Ensure all tests pass
- Code Style: Follow PEP 8 for Python, Prettier for JavaScript
- Testing: Write unit tests for new backend functions
- Documentation: Update README and inline comments
- Performance: Optimize database queries and API calls
Project Details
- Course: Software Engineering Project (SGP-2)
- Academic Year: 2024-2025
- Semester: 5th Semester
Team Members
- Thakar Maitrey - Backend Development & AI/ML Implementation
- Utsav Savani - Frontend Development & UI/UX Design
Institution Details
- University: Charotar University of Science and Technology (CHARUSAT)
- Institute: Chandubhai S. Patel Institute of Technology (CSPIT)
- Department: Information Technology
- Batch: IT-2-D2
- Year: 3rd Year
Project Supervision
- Faculty guidance and technical mentorship
- Industry best practices implementation
- Agile development methodology
This project is licensed under the MIT License - see the LICENSE file for details.
- This application is for educational and informational purposes only
- Stock market predictions are not guaranteed and should not be considered financial advice
- Always consult with qualified financial advisors before making investment decisions
- Past performance does not guarantee future results
- Market data provided by Yahoo Finance and Alpha Vantage
- News data sourced from Google News and various financial news APIs
- All data is used in accordance with respective terms of service
β If you find this project helpful, please consider giving it a star on GitHub!
π For questions or support, please open an issue on GitHub or contact the development team.