Machine Learning Based Stock Price Prediction by Integrating ARIMA model and Sentiment Analysis with Insights from News and Information

University essay from Blekinge Tekniska Högskola/Institutionen för datavetenskap

Abstract: Background: Predicting stock prices in today’s complex financial landscape is asignificant challenge. An innovative approach to address this challenge is integrating sentiment analysis techniques with the well-established Autoregressive IntegratedMoving Average (ARIMA) model. Modern financial markets are influenced by various factors, including real-time news and social media trends, which demand accuratepredictions. This research recognizes the growing importance of market sentiment derived from news and aims to improve stock price prediction by combining ARIMA’sanalytical capabilities with sentiment analysis. This endeavor seeks to provide aclearer understanding of the intricate dynamics of stock price movements in an eramarked by abundant information and rapidly changing market conditions. The integration of these methods has the potential to enhance the accuracy of stock priceforecasts, offering benefits to investors and financial analysts alike. Objectives: The project involves three key components. It begins by gatheringhistorical stock data for a specific stock ticker and conducting essential data preprocessing. Next, it focuses on extracting news headlines from a prominent financial website and conducting a thorough sentiment analysis of these headlines. Thissentiment analysis provides valuable insights into public sentiment surrounding thechosen stocks, with visualizations representing positive, negative, and neutral trends.Finally, the project aims to combine the findings from both components using an Ensemble Method, resulting in a comprehensive suggestion to user whether to buy,holdor sell the stock. These components collectively aim to improve stock price predictions and assess the adaptability of the ARIMA model to changing market conditionsalong the time and significant events. Methods: This project explores an innovative approach to improve stock pricepredictions, combining the ARIMA model with sentiment analysis methods usingfinancial news data. The study involved collecting historical stock data from YahooFinance, employing moving averages like 5-day, 30-day and 90-day windows, andusing advanced models such as ARIMA for predictions. Our analysis also includestime series plots at various intervals, providing valuable perspectives. Through theEnsemble Method, which integrates quantitative predictions and sentiment analysis,we generated practical recommendations for a five-day forecast. Our work addressedgaps in integrating sentiment analysis into stock prediction models and adapting tochanging market conditions, contributing to the advancement of stock forecastingmethodologies. Results: The ensembled predictive model for stock prices demonstrates favorableoutcomes. The Mean Absolute Error (MAE) is 0.8659, indicating accuracy, and theRoot Mean Squared Error (RMSE) is 0.1732, showing the overall prediction error.The Mean Absolute Percentage Error (MAPE) is 1.8541, suggesting precision in comparison to actual stock prices. The R-squared value is 0.9804, indicating the model’sability to explain variation in stock price data. These findings highlight the model’seffectiveness in providing reliable insights for investors in the dynamic stock market. Conclusions: The analysis with the ARIMA model to enhance stock price predictions. It revealed that sentiment analysis complements traditional methods, providing valuable insights for decision-making. Evaluating ARIMA’s long-term performance suggests adaptable forecasting techniques. This work contributes to advancingfinancial analysis and improving stock price predictions.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)