This study contributes to predicting stock prices. In this paper, we have provided a novel machine learning and deep learning technique for stock prediction, which capitalizes on the complex emotional patterns of investors that can be extracted from Twitter data. By joining two separate datasets, such as Twitter sentiments and the associated stock prices, we have applied complex algorithms and evaluated this method, which classifies a user’s sentiment into a positive and negative one. It was possible to address the complexity of investor behavior within the highly unstable stock market environment. One of the most important problems that are encountered by developers is gaining the possibility to properly capture stock price fluctuations in the temporal dimension. It implies the necessity to utilize such reliable evaluation metrics as precision-recall factors for classification purpose and root mean squared error for regression purpose. by using these metrics, the performance of the predictive model can be evaluated in detail, which allows to draw meaningful permanent conclusions within the context of how well it reflects the complex relationship between investor sentiment and market dynamics. The results of the evaluation conducted as part of the process of validating the proposed hypothesis show that, indeed, the predictive accuracy improves significantly from the use of machine learning and deep learning algorithms if paired with Twitter users’ emotional sentiment data. This combination enhances the predictive capacity of the model and provides meaningful insights into how the changes in stock prices are impacted by the sentiment of investors. Moreover, in the process of this study, the explanation and detail consideration of the algorithms for feature engineering and data processing were provided, which stands crucial for increasing the predictive model’s accuracy The study has a valuable implication for both the financial analysis and technical spheres due to the resolution of these methods and presents a model for further research activities in stock prediction. To conclude, this interdisciplinary strategy that combines sentiment analysis and stock prediction not only advances our understanding of the investor behavior but also brings the opportunity for novel applications in the emerging field at the juncture of technology and finance. As a result, the current research sheds light on the intricate connection between the dynamics of the stock market and investor sentiment, thus offering new insights that can better inform predictive modeling research in the financial industry.