About the Project

Stock market movements are influenced by both historical data and real-world events. This project detects stock market anomalies by integrating historical stock data with AI-powered sentiment analysis from financial news sources.

Inspiration

Understanding unusual stock price movements is challenging. While historical data provides trends, market sentiment plays a crucial role in stock fluctuations. We wanted to combine both to detect anomalies effectively.

What it does

  1. Data Ingestion: Collected historical stock market data from Yahoo Finance.
  2. Sentiment Analysis: Used LLMs (GPT-4) to analyze financial news headlines for market sentiment.
  3. Anomaly Detection: Identified irregular stock price movements using statistical methods.
  4. Web Dashboard: Built an interactive Streamlit-based dashboard to visualize stock anomalies and sentiment trends.

How we built it

  • Backend: Streamlit was used to build the API for handling data ingestion, sentiment analysis, and anomaly detection.
  • Data Processing: Stock data was retrieved using Yahoo Finance, and financial news was analyzed using GPT-4 for sentiment scoring.
  • Anomaly Detection: Used statistical methods to identify unusual stock movements.
  • Frontend: A Streamlit-based dashboard was developed to visualize market trends and detected anomalies.

Challenges we ran into

  • Yahoo Finance API Issues: The news API was unreliable, requiring alternative methods like RSS feeds and scraping.
  • Aligning Sentiment & Market Data: Ensuring news sentiment timestamps matched stock price data was challenging.
  • Choosing the Right Anomaly Detection Approach: We tested different statistical models to find the best fit.

Accomplishments that we're proud of

  • Successfully integrated sentiment analysis with market data to detect stock anomalies.
  • Overcame API limitations by using alternative data sources.
  • Built a fully functional Streamlit dashboard to visualize market trends in an interactive way.

What we learned

  • Stock price anomalies often correlate with news events, making sentiment analysis valuable.
  • Yahoo Finance API has limitations, and we found workarounds like Google RSS feeds for financial news.
  • Time-series alignment is key—syncing news sentiment with stock data is crucial for accurate insights.

What's next for Stock Market Anomaly Detection

  • Improve anomaly detection using advanced ML models.
  • Enhance the Streamlit dashboard for better user interaction.
  • Explore real-time stock market integration.

Built With

Share this project:

Updates