SentiSwing is an AI-powered stock prediction platform that combines machine learning with real-time news sentiment analysis. The system: Analyzes News Sentiment: Processes thousands of financial news articles using Alpha Vantage's sentiment analysis API ML Predictions: Uses a trained Random Forest model to predict BUY/SELL recommendations with confidence scores Real-time Dashboard: Provides a clean, professional web interface for stock analysis AI Explanations: Generates human-readable explanations for each prediction using OpenAI's GPT-3.5 Top Recommendations: Automatically identifies the top 5 BUY recommendations based on sentiment and confidence Personal Watchlist: Allows users to track their favorite stocks with real-time predictions Projected Returns: Provides AI-generated 1-month return projections with risk assessments How we built it Backend: Python Flask web framework for the API server Random Forest ML model trained on historical sentiment data and stock prices Alpha Vantage API for real-time news sentiment analysis OpenAI GPT-3.5 for generating explanations and descriptions Joblib for model persistence and loading Frontend: HTML5/CSS3 with responsive design JavaScript for dynamic interactions Font Awesome icons for professional UI localStorage for watchlist persistence Data Pipeline: Collected 8,572 historical news articles for training Processed 1,168 recent news items for live predictions Integrated 347 current stock prices Created 7 optimized features to reduce overfitting Challenges we ran into API Rate Limits: Alpha Vantage's free tier limited our data collection, requiring multiple API keys and strategic data gathering Model Overfitting: Initial model achieved 93% accuracy but was overfitted; reduced features from 13 to 7 for better generalization Class Imbalance: Initially struggled with generating SELL recommendations due to predominantly positive sentiment in recent data Real-time Integration: Balancing model complexity with API response times for smooth user experience Sentiment Accuracy: Ensuring sentiment scores from Alpha Vantage accurately reflected market-moving news Accomplishments that we're proud of Built a complete ML pipeline from data collection to deployment in a single hackathon Achieved 89-98% confidence scores on BUY recommendations across major stocks Integrated THREE AI systems: ML predictions, sentiment analysis, and GPT explanations Created a production-ready web application with clean, professional UI Implemented real-time features including watchlist, top recommendations, and live predictions Successfully processed 10,000+ news articles and generated actionable insights Built a scalable architecture that can handle multiple users and real-time updates What we learned Sentiment analysis is powerful but requires careful feature engineering and validation Real-time ML predictions need to balance accuracy with speed API integration requires robust error handling and rate limiting strategies User experience is crucial for financial applications - confidence scores and explanations build trust Data quality matters more than quantity - 7 well-engineered features outperformed 13 raw features OpenAI integration can significantly enhance ML applications by making predictions human-readable What's next for SentiSwing Expand data sources: Integrate Twitter, Reddit, and other social media sentiment Add more time horizons: Include 1-week, 1-month, and 3-month predictions Portfolio optimization: Suggest optimal portfolio allocations based on predictions Risk management: Implement stop-loss and position sizing recommendations Mobile app: Develop iOS/Android apps for on-the-go trading decisions Advanced ML: Experiment with LSTM networks for time-series prediction Real-time alerts: Push notifications for significant sentiment changes Backtesting: Validate predictions against historical performance API monetization: Offer prediction API for institutional traders Regulatory compliance: Add disclaimers and risk warnings for financial advice
Log in or sign up for Devpost to join the conversation.