Sentiment Analysis-Based stock Market Prediction UsingOptimization Algorithm and Machine Learning
-
https://doi.org/10.14419/tp5wwe40
Received date: July 9, 2025
Accepted date: August 22, 2025
Published date: October 27, 2025
-
Stock Market Price Prediction; Time Series; Random Forest; Flamingo Search Algorithm; Sentiment Analysis; Feature Extraction; Data Preprocessing. -
Abstract
Stock prediction is the crucial model in online applications to sell the products to the customers based on their requirements. The main problem in stock prediction is the high error rate and pattern recognition. In this paper, proposed a Flamingo Search Algorithm with Random Forest (FSA-RF) for improving the performance of SMP with sentiment analysis. Moreover, historical stock dataset and stock news dataset are collected from the net source and trained in the system. The datasets are updated to the developed FSA-RF model. Initially data preprocessing is employed for synchronising the text through converting it into lowercase characters. Then polarity-based detection is processed using stock news data for classifying the positive and negative polarities. Hereafter, sentiment analysis is executed to classify the negative and positive sentiments based on the news dataset polarities. Sentiment analysis phase is used for accurate classification of positive, neutral and negative sentiments that useful for predicting stock prices. Both datasets are combined and feature extraction is performed to extract the relevant features related to stock market prices. Update the FSO fitness in random forest classification layer which classify the stock prices accurately in the output layer. The designed model is implemented in python tool and the gained outcomes are validated with other prevailing models in terms of accuracy, sensitivity, speciality, precision, and mean square error.
-
References
- Xiao C, Xia W & Jiang J (2020), Stock price forecast based on combined model of ARI-MA-LS-SVM. Neural Computing and Applications 32, 5379-88. https://doi.org/10.1007/s00521-019-04698-5.
- Huy DT, Nhan VK, Bich NT, Hong NT, Chung NT &Huy PQ (2020), Impacts of internal and external macroeconomic factors on firm stock price in an expansion econometric model—a case in Vietnam real estate industry. Data science for financial econometrics 14, 189-205. https://doi.org/10.1007/978-3-030-48853-6_14.
- Gurjar M, Naik P, Mujumdar G & Vaidya T (2018), Stock market prediction using ANN. International Research Journal of Engineering and Tech-nology 5, 2758-61.
- Van Nguyen T, Zhou L, Chong AY, Li B & Pu X (2020), Predicting customer demand for remanufactured products: A data-mining approach. Eu-ropean Journal of Operational Research 281, 543-58. ht.tps://doi.org/10.1016/j.ejor.2019.08.015
- Nabipour M, Nayyeri P, Jabani H, Mosavi A, Salwana E & S S (2020), Deep learning for stock market prediction. Entropy 22, 840. https://doi.org/10.3390/e22080840.
- Poldrack RA, Huckins G &Varoquaux G (2020), Establishment of best practices for evidence for prediction: a review. JAMA psychiatry 77, 534-40. https://doi.org/10.1001/jamapsychiatry.2019.3671.
- Hu Z, Zhao Y & Khushi M (2021), A survey of forex and stock price prediction using deep learning. Applied System Innovation 4, 9. https://doi.org/10.3390/asi4010009.
- Jiang W (2021), Applications of deep learning in stock market prediction: recent progress. Expert Systems with Applications 184, 115537. https://doi.org/10.1016/j.eswa.2021.115537.
- Chicco D & Jurman G (2020), The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC genomics 21, 6. https://doi.org/10.1186/s12864-019-6413-7.
- Shi L, Teng Z, Wang L, Zhang Y & Binder A (2018), DeepClue: visual interpretation of text-based deep stock prediction. IEEE Transactions on Knowledge and Data Engineering 31, 1094-108. https://doi.org/10.1109/TKDE.2018.2854193.
- Matsunaga D, Suzumura T&Takahashi T (2019), Exploring graph neural networks for stock market predictions with rolling window analysis. arXiv preprint arXiv:1909.10660.
- Moghar A &Hamiche M (2020), Stock market prediction using LSTM recurrent neural network. Procedia computer science 170, 1168-73. https://doi.org/10.1016/j.procs.2020.03.049.
- Zhu Y, Zhang W, Chen Y & Gao H (2019), A novel approach to workload prediction using attention-based LSTM encoder-decoder network in cloud environment. EURASIP Journal on Wireless Communications and Networking 2019, 274. https://doi.org/10.1186/s13638-019-1605-z.
- Toharudin T, Pontoh RS, Caraka RE, Zahroh S, Lee Y & Chen RC (2023), Employing long short-term memory and Facebook prophet model in air temperature forecasting. Communications in Statistics-Simulation and Computation 52, 279-90. https://doi.org/10.1080/03610918.2020.1854302.
- Burton M, Lyon L, Erdmann C & Tijerina B (2018), Shifting to data savvy: the future of data science in libraries.
- Haiyun Z &Yizhe X (2020), Sports performance prediction model based on integrated learning algorithm and cloud computing Hadoop plat-form. Microprocessors and Microsystems 79, 103322. https://doi.org/10.1016/j.micpro.2020.103322.
- Liu H & Long Z (2020), An improved deep learning model for predicting stock market price time series. Digital Signal Processing 102, 102741. https://doi.org/10.1016/j.dsp.2020.102741.
- Wang Q, Bu S & He Z (2020), Achieving predictive and proactive maintenance for high-speed railway power equipment with LSTM-RNN. IEEE Transactions on Industrial Informatics 16, 6509-17. https://doi.org/10.1109/TII.2020.2966033.
- Guo R, Fu D & Sollazzo G (2022), An ensemble learning model for asphalt pavement performance prediction based on gradient boosting decision tree. International Journal of Pavement Engineering 23, 3633-46. https://doi.org/10.1080/10298436.2021.1910825.
- Chung H & Shin KS (2018), Genetic algorithm-optimized long short-term memory network for stock market prediction. Sustainability 10, 3765. https://doi.org/10.3390/su10103765.
- Hoque KE&Aljamaan H (2021), Impact of hyperparameter tuning on machine learning models in stock price forecasting. IEEE Access 9, 163815-30. https://doi.org/10.1109/ACCESS.2021.3134138.
- Marcjasz G (2020), Forecasting electricity prices using deep neural networks: A robust hyper-parameter selection scheme. Energies 13, 4605. https://doi.org/10.3390/en13184605.
- Yan X, Weihan W & Chang M (2021), Research on financial assets transaction prediction model based on LSTM neural network. Neural Compu-ting and Applications 33, 257-70. https://doi.org/10.1007/s00521-020-04992-7.
- Kumar K & Haider MT (2021), Enhanced prediction of intra-day stock market using metaheuristic optimization on RNN–LSTM network. New Generation Computing 39, 231-72. https://doi.org/10.1007/s00354-020-00104-0.
- Sun L, Xu W & Liu J (2021), Two-channel attention mechanism fusion model of stock price prediction based on CNN-LSTM. Transactions on Asian and Low-Resource Language Information Processing 20, 1-2. https://doi.org/10.1145/3453693.
- Wang H, Wang J, Cao L, Li Y, Sun Q & Wang J (2021), A stock closing price prediction model based on CNN‐BiSLSTM. Complexity 2021, 5360828. https://doi.org/10.1155/2021/5360828.
- Gao Y, Wang R & Zhou E (2021), Stock prediction based on optimized LSTM and GRU models. Scientific Programming 2021, 4055281. https://doi.org/10.1155/2021/4055281.
- Lu W, Li J, Li Y, Sun A & Wang J (2020), A CNN‐LSTM‐based model to forecast stock prices. Complexity 2020, 6622927. https://doi.org/10.1155/2020/6622927.
- Suman SK, Kumar D &Bhagyalakshmi L (2014), SINR pricing in non cooperative power control game for wireless ad hoc networks. KSII Transac-tions on Internet & Information Systems 8. https://doi.org/10.3837/tiis.2014.07.005.
- Bhagyalakshmi L, Suman SK &Sujeethadevi T (2020), Joint routing and resource allocation for cluster based isolated nodes in cognitive radio wire-less sensor networks. Wireless Personal Communications 114, 3477-88. https://doi.org/10.1007/s11277-020-07543-4.
- Mahalakshmi K, Kousalya K, Shekhar H, Thomas AK, Bhagyalakshmi L, Suman SK, Chandragandhi S, Bachanna P, Srihari K &Sundramurthy VP (2021), Public auditing scheme for integrity verification in distributed cloud storage system. Scientific Programming 2021, 8533995. https://doi.org/10.1155/2021/8533995.
- Suman SK, Arivazhagan N, Bhagyalakshmi L, Shekhar H, Shanmuga Priya P, Helan Vidhya T, Jagtap SS, Mohammad GB, Chikte SD, Chandra-gandhi S &Yeshitla A (2022), Detection and prediction of HMS from drinking water by analysing the adsorbents from residuals using deep learn-ing. Adsorption Science & Technology 2022, 3265366. https://doi.org/10.1155/2022/3265366.
- Lakshminarayanan B &Krishanan M (2014), Avoiding energy holes problem using load balancing approach in wireless sensor network. KSII Trans-actions on Internet & Information Systems 8. https://doi.org/10.3837/tiis.2014.05.007.
- Zhiheng W & Jianhua L (2021), Flamingo search algorithm: a new swarm intelligence optimization algorithm. IEEE Access 9, 88564-82. https://doi.org/10.1109/ACCESS.2021.3090512.
- NYSE Historical Stock Prices (2025), https://www.kaggle.com/datasets/borismarjanovic/price-volume-data-for-all-us-stocks-etfs.
- Financial News (2025), https://www.kaggle.com/datasets/hengzheng/financial-news.
- Kaggle (2025),https://www.kaggle.com/datasets/arindamdasgupta/daily-stock-prices.
- Kaur J&Sohal RS (2024), Noise estimation and removal in natural language processing. InHandbook of Vibroacoustics, Noise and Harshness 18,693-717. https://doi.org/10.1007/978-981-97-8100-3_38.
- Sun Z, Wang G, Li P, Wang H, Zhang M & Liang X (2024), An improved random forest based on the classification accuracy and correlation meas-urement of decision trees. Expert Systems with Applications 237, 121549. https://doi.org/10.1016/j.eswa.2023.121549.
-
Downloads
-
How to Cite
Solleti, D. P. K., Nagavarapu, D. ., Kavita, D., Selvakanmani, D. S. ., Mathumohan, D., & subbarayudu, yerragudipadu . (2025). Sentiment Analysis-Based stock Market Prediction UsingOptimization Algorithm and Machine Learning. International Journal of Basic and Applied Sciences, 14(6), 570-585. https://doi.org/10.14419/tp5wwe40
