StockSense AI: A Real-Time Stock Market Analysis and Prediction System Using Technical Indicators, Linear Regression, and News Sentiment Analysis
StockSense AI: A Real-Time Stock Market Analysis and Prediction
System Using Technical Indicators, Linear Regression, and News Sentiment Analysis
Rohit Kumar Dr. Gunjan Singh Dr. Siksha Pandey
Integrated BTech + MTech Asst. Professor, Department of CSE Asst. Professor, Department of CSE
Amity University Haryana Amity University, Haryana Amity University, Haryana
Rohit.kumar9@s.amity.edu
Abstract—Stock market prediction is difficult because market prices depend on both numerical trends and external news. This paper presents StockSense AI, which is a Python-based stock market analysis system developed using Streamlit. The system collects two years of historical stock data using the yfinance library and calculates technical indicators such as EMA50, RSI, and MACD. For predicting the next day stock price and generating Buy, Sell, or Hold signals, a Linear Regression model is trained on normalized 60-day closing price data. Additionally, the system also includes a sentiment analysis module using TextBlob. In this module, users can enter financial news headlines, and the system calculates sentiment polarity scores ranging from negative to positive. The complete system is integrated into an interactive dashboard containing multiple tabs such as market data, indicators, prediction results, sentiment analysis, and educational guidance. The model was tested on five S&P 500 stocks and achieved an average RMSE of 0.0261 with approximately 60% directional prediction accuracy over a 30-day period. The sentiment analysis module achieved 72% agreement with manually labelled financial headlines. The results show that lightweight machine learning models and basic NLP techniques can be combined to create a simple, easy to use, and understandable stock market analysis platform for practical use.
Keywords—Stock Prediction, Linear Regression, yfinance, Candlestick Charts, RSI, MACD, EMA, Sentiment Analysis, TextBlob, Streamlit, Buy/Sell/Hold Signal, RMSE, MAE.