Developed by: Ugochukwu Belusochim
A comprehensive financial analysis web application with AI-powered insights, portfolio management, and market analysis. Built with React, Node.js, and modern web technologies.
- Smart Portfolio Upload: Upload portfolio files (PDF, CSV, Excel, TXT) with RAG-powered AI extraction
- Portfolio Management: Track and manage your stock holdings with real-time performance data
- AI Financial Advisor: Chat with an AI-powered (fine-tuned) financial advisor for personalized insights
- Market Dashboard: Real-time market data, news, and comprehensive analytics
- Interactive Visualizations: Beautiful charts and graphs for portfolio performance analysis
- RAG (Retrieval-Augmented Generation): Intelligent document processing for portfolio extraction
- LangChain Integration: Advanced natural language processing for financial documents
- OpenAI GPT Integration: Conversational AI for financial advice and insights
- Sentiment Analysis: Market sentiment analysis using FinBERT models
- LSTM Predictions: Advanced machine learning models for stock price predictions and forecasting
- React 18 - Modern React with hooks and functional components
- Tailwind CSS - Utility-first CSS framework
- Recharts - Beautiful and responsive charts
- React Router - Client-side routing
- Axios - HTTP client for API calls
- React Hot Toast - Toast notifications
- React Dropzone - File upload with drag & drop
- Heroicons - Beautiful SVG icons
- Node.js - JavaScript runtime
- Express.js - Web application framework
- JWT - JSON Web Tokens for authentication
- bcryptjs - Password hashing
- Multer - File upload handling
- pdf-parse - PDF text extraction
- xlsx - Excel file processing
- Socket.io - Real-time communication
- Helmet - Security middleware
- Yahoo Finance API - Real-time stock data
- Python - Machine learning backend
- LangChain - LLM application framework
- OpenAI API - GPT models for AI features
- FAISS - Vector database for semantic search
- TensorFlow/Keras - LSTM models for predictions
- pandas - Data manipulation and analysis
- yfinance - Yahoo Finance data extraction
-
Node.js (v16 or higher)
-
npm or yarn
-
Git
git clone <repository-url> cd Financial-Analysis
- Install dependencies
# Install server dependencies npm install # Install client dependencies cd client npm install cd ..
- Node.js (v16 or higher)
- npm or yarn package manager
- Python (v3.8 or higher) for AI features
- Git for version control
-
Clone the repository
git clone https://github.com/Phillips-Ugo/Alpha-Quant.git cd Alpha-Quant
-
Install dependencies
# Install backend dependencies npm install # Install frontend dependencies cd client npm install cd .. # Install Python dependencies for AI features cd ml pip install -r requirements.txt cd ..
-
Environment Configuration
# Create and configure environment file cp .env.example .env # Edit .env with your API keys (see configuration section below)
-
Start the application
# Start the backend server (from root directory) npm start # In a new terminal, start the frontend (optional - already served by backend) cd client npm start
-
Access the application
- Application: http://localhost:5000
- API Documentation: http://localhost:5000/api
Create a .env
file in the root directory with the following variables:
# Server Configuration
PORT=5000
NODE_ENV=development
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
# OpenAI Configuration (Required for AI features)
OPENAI_API_KEY=your-openai-api-key-here
# Stock API Configuration (Optional - demo data available)
ALPHA_VANTAGE_API_KEY=your-alpha-vantage-api-key
YAHOO_FINANCE_API_KEY=your-yahoo-finance-api-key
# News API Configuration (Optional)
NEWS_API_KEY=your-news-api-key
# File Upload Configuration
MAX_FILE_SIZE=10485760
UPLOAD_PATH=./uploads
To enable full functionality, you'll need:
-
OpenAI API Key (Required for portfolio upload AI features)
- Sign up at: https://openai.com/
- Required for RAG-powered document processing
-
Alpha Vantage (Optional - for enhanced stock data)
- Sign up at: https://www.alphavantage.co/
-
News API (Optional - for market news)
- Sign up at: https://newsapi.org/
-
Portfolio Management
- Manual Entry: Add stocks individually with symbol, shares, and purchase details
- Smart Upload: Upload portfolio files (PDF, CSV, Excel, TXT) for automatic extraction
- Real-time Tracking: View current prices, gains/losses, and portfolio performance
- Interactive Charts: Visualize portfolio allocation and performance trends
-
AI-Powered Features
- RAG Upload: Upload any portfolio document and let AI extract the data
- Financial Chat: Ask questions about your portfolio and market trends
- Smart Analysis: Get AI-generated insights and recommendations
- Sentiment Analysis: Market sentiment from news and social media
-
Market Dashboard
- Real-time Data: Live stock prices and market indicators
- News Feed: Latest financial news and market updates
- Market Analysis: Technical indicators and trend analysis
The app supports intelligent extraction from multiple file formats:
Supported Formats:
- π PDF: Brokerage statements, portfolio reports
- π Excel (.xlsx): Spreadsheets with portfolio data
- π CSV: Comma-separated value files
- π Text: Plain text files with stock information
Extraction Process:
- Upload your file using drag & drop or file picker
- AI-powered RAG system analyzes the document
- Extracts stock symbols, shares, prices, and dates
- Validates data and fetches current market prices
- Adds validated stocks to your portfolio
Example Portfolio Format:
My Portfolio Holdings:
AAPL: 100 shares at $150 per share
MSFT: 50 shares purchased at $300 each
TSLA - 25 shares, bought for $250 per share
Alpha Quant/
βββ client/ # React frontend application
β βββ public/ # Static files and assets
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ contexts/ # React context providers
β β βββ pages/ # Main page components
β β βββ App.js # Root application component
β βββ package.json # Frontend dependencies
βββ server/ # Node.js backend server
β βββ data/ # JSON data storage
β βββ routes/ # API route handlers
β β βββ auth.js # User authentication
β β βββ portfolio.js # Portfolio management
β β βββ stocks.js # Stock data APIs
β β βββ ai.js # AI chat functionality
β β βββ news.js # News and market data
β β βββ upload.js # File upload & processing
β βββ services/ # Business logic services
β βββ index.js # Server entry point
βββ ml/ # Python AI/ML components
β βββ rag_portfolio.py # RAG document processing
β βββ lstm_*.py # LSTM prediction models
β βββ bert_*.py # BERT sentiment analysis
β βββ requirements.txt # Python dependencies
βββ .env # Environment configuration
βββ package.json # Root package.json
βββ README.md # Project documentation
- Authentication: JWT-based secure user authentication
- Data Protection: bcrypt password hashing and validation
- API Security: Rate limiting, CORS, and Helmet security headers
- File Validation: Secure file upload with type and size validation
- Error Handling: Comprehensive error handling and logging
- Performance: Caching, compression, and optimized database queries
# Build the React frontend
cd client
npm run build
cd ..
# Set production environment
export NODE_ENV=production
# Start the production server
npm start
For production, ensure these environment variables are set:
NODE_ENV=production
JWT_SECRET
(strong secret key)OPENAI_API_KEY
(for AI features)PORT
(default: 5000)
- Real-time Updates: Live stock price updates via WebSocket
- Caching: Intelligent caching of market data and user sessions
- Lazy Loading: Components and routes loaded on demand
- Optimized Queries: Efficient database queries and API calls
- Responsive Design: Optimized for all device sizes
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Follow the existing code style and conventions
- Add comments for complex logic
- Update documentation for new features
- Test thoroughly before submitting
Ugochukwu Belusochim
- GitHub: @Phillips-Ugo
- Project: Alpha Quant Financial Analysis Platform
- OpenAI for GPT models and AI capabilities
- Yahoo Finance for real-time market data
- LangChain for RAG implementation
- React and Node.js communities for excellent frameworks
- All contributors and users of Alpha Quant
Built with β€οΈ by Ugochukwu Belusochim
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Recharts for beautiful chart components
- Tailwind CSS for the utility-first CSS framework
- Heroicons for the beautiful icon set
- React Hot Toast for elegant notifications
For support and questions:
- Create an issue in the GitHub repository
- Email: ugochukwubelusochim.stu@gmail.comcom
Note: This is a demonstration project. For production use, ensure you have proper API keys, database setup, and security measures in place.