Abstract
Prediction of financial stock market is a challenging task because of its volatile and non- linear nature. The presence of different factors like psychological, sentimental state, rational or irrational behaviour of investors make the stock market more dynamic. With the inculcation of algorithms based on artificial intelligence, deep learning algorithms, the prediction of movement of financial stock market is revolutionized in the recent years. The purpose of using these algorithms is to help the investors for taking decisions related to the Stock Pricing. A model has been proposed to predict the direction of movement of Indian stock market in the near future. This model makes use of historical Indian stock data of companies in nifty 50 since they came existence along with some financial and social indicators like financial news and tweets related to stocks. After pre-processing and normalization various machine learning algorithms like LSTM, support vector machines, KNearest neighbour, random forest, gradient boosting regressor are applied on this time series data to produce better accuracy and to minimize the RMSE error. This model has the ability to reduce major losses to the investors who invest in stock market. The social indicators will give an insight for predicting the direction of stock market. The LSTM network will make use of historical closing prices, tweets and trading volume.
Similar content being viewed by others
References
Abbasimehr H, Paki R (2022) Improving time series forecasting using LSTM and attention models. J Ambient Intell Human Comput 13:673–691. https://doi.org/10.1007/s12652-020-02761-x
Alghieth M, Yang Y, Chiclana F (2016) Development of a genetic programming-based GA methodology for the prediction of short-to-medium-term stock markets. IEEE Congress on evolutionary computation (CEC), Vancouver, BC. pp 2381–2388. https://doi.org/10.1109/CEC.2016.7744083
Altinbas H, Biskin OT (2015) Selecting macroeconomic influencers on stock markets by using feature selection algorithms. Procedia Econ Financ 30:22–29
Atkins A, Niranjan M, Gerding E (2018) Financial news predicts stock market volatility better than close price. J Financ Data Sci 4(2):120–137
Barak S, Arjmand A, Ortobelli S (2017) Fusion of multiple diverse predictors in stock market. Inf Fusion 36:90–102
Chatzis SP, Siakoulis V, Petropoulos A, Stavroulakis E, Vlachogiannakis N (2018) Forecasting stock market crisis events using deep and statistical machine learning techniques. Expert Syst Appl 112:353–371
Chauhan P, Sharma N, Sikka G (2021) The emergence of social media data and sentiment analysis in election prediction. J Ambient Intell Human Comput 12:2601–2627. https://doi.org/10.1007/s12652-020-02423-y
Chen Y, Hao Y (2017) A feature weighted support vector machine and K-nearest neighbor algorithm for stock market indices prediction. Expert Syst Appl 80:340–355
Chen W, Zhang H, Mehlawat MK, Jia L (2021) Mean–variance portfolio optimization using machine learning-based stock price prediction. Appl Soft Computi 100:106943
Chong E, Han C, Park FC (2017) Deep learning networks for stock market analysis and prediction: methodology, data representations, and case studies. Expert Syst Appli 83:187–205
de Araújo RA, Oliveira ALI, Meira S (2015) A hybrid model for high-frequency stock market forecasting. Expert Syst Appli 42(8):4081–4096
Devi KN, Bhaskaran VM, Kumar GP (2015) Cuckoo optimized SVM for stock market prediction. In: International conference on innovations in information, embedded and communication systems (ICIIECS), Coimbatore. pp 1–5
Ding S, Cui T, Xiong X et al (2020) Forecasting stock market return with nonlinearity: a genetic programming approach. J Ambient Intell Human Comput 11:4927–4939. https://doi.org/10.1007/s12652-020-01762-0
Ding X, Zhang Y, Liu T, Duan J (2015) Deep learning for event-driven stock prediction. In: Proceedings of the twenty-fourth international joint conference on artificial intelligence (IJCAI 2015). pp 2327–2333
Gao G, Bu Z, Liu L, Cao J, Wu Z (2015) A survival analysis method for stock market prediction. In: International conference on behavioral, economic and socio-cultural computing (BESC), Nanjing. pp 116–122
Ghanavati M, Wong RK, Chen F, Wang Y, Fong S (2016) A generic service framework for stock market prediction. In: 2016 IEEE international conference on services computing (SCC), San Francisco, CA. pp 283–290. https://doi.org/10.1109/SCC.2016.44
Golmaryami M, Behzadi M, Ahmadzadeh M (2015) A hybrid method based on neural networks and a meta-heuristic bat algorithm for stock price prediction. In: 2nd International conference on knowledge-based engineering and innovation (KBEI), Tehran. pp 269–275
Goykhman M, Teimouri A (2018) Machine learning in sentiment reconstruction of the simulated stock market. Phys A Stat Mech Appl 492:1729–1740
Gunduz H, Cataltepe Z, Yaslan Y (2017) Stock market direction prediction using deep neural networks. In: 25th Signal processing and communications applications conference (SIU), Antalya. pp 1–4
Gupta A, Dhingra B (2012) Stock market prediction using hidden Markov models. In: Students conference on engineering and systems, Allahabad, Uttar Pradesh. pp 1–4
Henrique BM, Sobreiro VA, Kimura H (2018) Stock price prediction using support vector regression on daily and up to the minute prices. J Financ Data Scie 4(3):183–201
https://towardsdatascience.com/how-not-to-predict-stock-prices-with-lstms-a51f564ccbca
https://towardsdatascience.com/sentiment-analysis-for-stock-price-prediction-in-python-bed40c65d178
Ismail MS, SalmiM MN, Ismail M, Razak FA, Alias MA (2020) Predicting next day direction of stock price movement using machine learning methods with persistent homology: evidence from Kuala Lumpur stock exchange. Appl Soft Computi 93:106422
Izzah A, Sari YA, Widyastuti R, Cinderatama TA (2017) Mobile app for stock prediction using improved multiple linear regression. In: International conference on sustainable information engineering and technology (SIET), Malang. pp 150–154
HS Karthik, VA Nishanth, J Manikandan (2016) Stock market prediction using optimum threshold based relevance vector machines. In: 22nd Annual international conference on advanced computing and communication (ADCOM), Bangalore. pp 21–26. https://doi.org/10.1109/ADCOM.2016.13
Khang PQ, Kaczmarczyk K, Tutak P, Golec P, Kuziak K, Depczyński R, Hernes M, Rot A (2021) Machine learning for liquidity prediction on Vietnamese stock market. Procedia Comput Sci 192:3590–3597. https://doi.org/10.1016/j.procs.2021.09.132
Kraus M, Feuerriegel S (2017) Decision support from financial disclosures with deep neural networks and transfer learning. Decis Supp Syst 104:38–48. https://doi.org/10.1016/j.dss.2017.10.001
Kumar MR, Venkatesh J, Rahman AMJMZ (2021) Data mining and machine learning in retail business: developing efficiencies for better customer retention. J Ambient Intell Human Comput. https://doi.org/10.1007/s12652-020-02711-7
Labiad B, Berrado A, Benabbou L (2016) Machine learning techniques for short term stock movements classification for Moroccan stock exchange. In: 11th International conference on intelligent systems: theories and applications (SITA), Mohammedia. pp 1–6. https://doi.org/10.1109/SITA.2016.7772259
Lee TK, Cho JH, Kwon DS, Sohn SY (2019) Global stock market investment strategies based on financial network indicators using machine learning techniques. Expert Syst Appli 117:228–242
Lee HC, Lee YH, Lu YC, Wang YC (2020) States of psychological anchors and price behavior of Japanese yen futures. N Am J Econ Financ. https://doi.org/10.1016/j.najef.2018.10.016
Leippold M, Wang Q, Zhou W (2021) Machine learning in the Chinese stock market. J Financ Econ. https://doi.org/10.1016/j.jfineco.2021.08.017
Li A, Wu J, Liu Z (2018) Market manipulation detection based on classification methods. Procedia Comput Sci 122:788–795
Li Y, Wang F, Sun R, Li R (2016a) A novel model for stock market forecasting. In: 9th International congress on image and signal processing, biomedical engineering and informatics (CISP-BMEI), Datong. pp 1995–1999. https://doi.org/10.1109/CISP-BMEI.2016.7853046
Li Q, Zhou B, Liu Q (2016b) Can twitter posts predict stock behavior?: A study of stock market with twitter social emotion. In: 2016b IEEE international conference on cloud computing and big data analysis (ICCCBDA), Chengdu. pp 359–364. https://doi.org/10.1109/ICCCBDA.2016.7529584
Liu Q, Wang C, Zhang P, Zheng K (2021) Detecting stock market manipulation via machine learning: Evidence from China Securities Regulatory Commission punishment cases. Int Revi Financ Anal 78. https://doi.org/10.1016/j.irfa.2021.101887.
Luo B, Chen Y, Jiang W (2016) Stock market forecasting algorithm based on improved neural network. In: Eighth international conference on measuring technology and mechatronics automation (ICMTMA), Macau. pp 628–631
Maji G, Mondal D, Dey N et al (2021) Stock prediction and mutual fund portfolio management using curve fitting techniques. J Ambient Intell Human Comput 12:9521–9534. https://doi.org/10.1007/s12652-020-02693-6
Malagrino LS, Roman NT, Monteiro AM (2018) Forecasting stock market index daily direction: a Bayesian network approach. Expert Syst Appl 105:11–22
Mankar T, Hotchandani T, Madhwani M, Chidrawar A, Lifna CS (2018) Stock market prediction based on social sentiments using machine learning. In: International conference on smart city and emerging technology (ICSCET), Mumbai. pp 1–3
Mithani F, Machchhar S, Jasdanwala F (2016) A modified BPN approach for stock market prediction.In: IEEE International Conference on Computational Intelligence and Computing Research (ICCIC), Chennai. pp 1–4. https://doi.org/10.1109/ICCIC.2016.7919718
Murali P, Revathy R, Balamurali S et al (2020) Integration of RNN with GARCH refined by whale optimization algorithm for yield forecasting: a hybrid machine learning approach. J Ambient Intell Human Comput. https://doi.org/10.1007/s12652-020-01922-2
Nayak RK, Mishra D, Rath AK (2015) A naïve SVM-KNN based stock market trend reversal analysis for Indian benchmark indices. Appl Soft Comput 35:670–680
Nayak A, Pai MMM, Pai RM (2016) Prediction models for Indian stock market. Procedia Comput Sci 89:441–449
Nivetha RY, Dhaya C (2017) Developing a prediction model for stock analysis. In: International conference on technical advancements in computers and communications (ICTACC), Melmaurvathur. pp 1–3
Olaniyan R, Stamate D, Ouarbya L, Logofatu D (2015) Sentiment and stock market volatility predictive modelling—a hybrid approach. In: IEEE international conference on data science and advanced analytics (DSAA), Paris. pp 1–10
Oliveira N, Cortez P, Areal N (2016) Stock market sentiment lexicon acquisition using microblogging data and statistical measures. Decis Supp Syst 85:62–73
Oliveira N, Cortez P, Areal N (2017) The impact of microblogging data for stock market prediction: using Twitter to predict returns, volatility, trading volume and survey sentiment indices. Expert Syst Appl 73:125–144
Paniagua DC, Cubillos C, Vicari R, Urra E (2015) Decision-making system for stock exchange market using artificial emotions. Expert Syst Appli 42(20):7070–7083. https://doi.org/10.1016/j.eswa.2015.05.004
Patel J, Shah S, Thakkar P, Kotecha K (2015) Predicting stock market index using fusion of machine learning techniques. Expert Syst Appl 42(4):2162–2172
Patel HR, Parikh SM, Darji DN (2016) Prediction model for stock market using news based different classification, regression and statistical techniques: (PMSMN). In: International conference on ICT in business industry and government (ICTBIG), Indore. pp 1–5. https://doi.org/10.1109/ICTBIG.2016.7892636.
Peng D (2019) Analysis of investor sentiment and stock market volatility trend based on big data strategy. In: International conference on robots and intelligent system (ICRIS), Haikou, China. pp 269–272
Qasem M, Thulasiram R, Thulasiram P (2015) Twitter sentiment classification using machine learning techniques for stock markets. In: International conference on advances in computing, communications and informatics (ICACCI), Kochi. pp 834–840
Rajput VS, Dubey SM (2016) Stock market sentiment analysis based on machine learning.In: 2nd International conference on next generation computing technologies (NGCT), Dehradun. pp 506–510. https://doi.org/10.1109/NGCT.2016.7877468
Rao Y, Zhong X, Lu S (2016) Social network-based stock correlation analysis and prediction. In: 2016 International conference on identification, information and knowledge in the internet of things (IIKI), Beijing. pp 573–576. https://doi.org/10.1109/IIKI.2016.102
Renault T (2017) Intraday online investor sentiment and return patterns in the U.S. stock market. J Bank Financ 84:25–40
Shah D, Isah H, Zulkernine F (2018) Predicting the effects of news sentiments on the stock market. In: IEEE international conference on big data (big data), Seattle, WA, USA. pp 4705–4708
Sharma C, Banerjee K (2015) A study of correlations in the stock market. Phys A Stat Mech Appl 432:321–330
Sharma A, Bhuriya D, Singh U (2017) Survey of stock market prediction using machine learning approach. In: International conference of electronics, communication and aerospace technology (ICECA), Coimbatore. pp 506–509
Singh P, Thakral A (2017) Stock market: statistical analysis of its indexes and its constituents. In: International conference on smart technologies for smart nation (SmartTechCon), Bangalore. pp 962–966
Soni D, Agarwal S, Agarwal T, Arora P, K Gupta (2018) Optimised prediction model for stock market trend analysis. In: Eleventh international conference on contemporary computing (IC3), Noida. pp 1–3
Stock price prediction using LSTM (Long Short-Term Memory) - DataScienceCentral.com- https://www.datasciencecentral.com/stock-price-prediction-using-lstm-long-short-term-memory/#:~:text=LSTM%20is%20an%20appropriate%20algorithm%20to%20make%20prediction,the%20dataset%20has%20a%20huge%20amount%20of%20data
Sun A, Lachanski M, Fabozzi FJ (2016) Trade the tweet: Social media text mining and sparse matrix factorization for stock market prediction. Int Rev Financ Anal 48:272–281
Umadevi KS, Gaonka A, Kulkarni R and Kannan RJ (2018) Analysis of stock market using streaming data framework. In: International conference on advances in computing, communications and informatics (ICACCI), Bangalore. pp 1388–1390
Wang Y, Wang Y (2016) Using social media mining technology to assist in price prediction of stock market.In: IEEE international conference on big data analysis (ICBDA), Hangzhou. pp 1–4. https://doi.org/10.1109/ICBDA.2016.7509794
Waqar M, Dawood H, Guo P, Shahnawaz MB, Ghazanfar MA (2017) Prediction of stock market by principal component analysis. In: 13th International conference on computational intelligence and security (CIS), Hong Kong. pp 599–602
Weng B, Lu L, Wang X, Megahed FM, Martinez W (2018) Predicting short-term stock prices using ensemble methods and online data sources. Expert Syst Appli 112:258–273
Weng W, Liu Y, Wang S, Lei K (2016) A multiclass classification model for stock news based on structured data. In: 2016 Sixth international conference on information science and technology (ICIST), Dalian. pp 72–78. https://doi.org/10.1109/ICIST.2016.7483388.
Yin L, Zhang N, He L, Fang W (2016) A study of relationship between investor sentiment and stock price based on text mining. In: 2016 International conference on identification, information and knowledge in the internet of things (IIKI), Beijing. pp 536–539
Zhao S, Tong Y, Liu X, Tan S (2016) Correlating Twitter with the stock market through non-Gaussian SVAR. In: Eighth international conference on advanced computational intelligence (ICACI), Chiang Mai. pp 257–264. https://doi.org/10.1109/ICACI.2016.7449835
Funding
The authors did not receive support from any organization for the submitted work.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
There is no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Srivastava, S., Pant, M. & Gupta, V. Analysis and prediction of Indian stock market: a machine-learning approach. Int J Syst Assur Eng Manag 14, 1567–1585 (2023). https://doi.org/10.1007/s13198-023-01934-z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s13198-023-01934-z