Evaluating Prediction of Stock Price using Machine Learning


Authors : Amit Kumar Yadav; Rohit Sharma; Swastik Bainsla

Volume/Issue : Volume 9 - 2024, Issue 11 - November


Google Scholar : https://tinyurl.com/5n67usum

Scribd : https://tinyurl.com/shx8xtjx

DOI : https://doi.org/10.5281/zenodo.14413363


Abstract : The extrapolation of stock prices is an essential and unresolved problem in the sphere of finance because the results of an accurate forecast can produce considerable economic consequences and the nature of the markets makes the task difficult. This research aims at applying the concept of machine learning in forecasting of stock price for Google shares using historical data of the company’s stock for the last20 years. The qualitative aspect of the research is the collection of data with the use of the yfinance API, data preprocessing with the handling of missing values and removal of outliers. If further feature engineering, then the technical indicators included the simple moving averages and daily returns in order to improve on the capability of the model. Three types of machine learning models – Linear Regression, Random Forest, and Long Short-Term Memory (LSTM) Networks – were built experimentally and compared based on MAE and RMSE performance indices. Out of these, LSTM model provided better performance because it deals with temporal issues well by capturing temporal dependency and non linear trends in the data. In so doing, this research establishes the significance of state-of-the- art generous learning models in monetary prediction while stressing the efficacy of data origination and feature engineering. The results are quite informative for investors and financial analysts, as well as for improving the creation of further prediction models. Future work can also complement internal information with external variables like sentiment analysis and macroeconomic factors to improve their models.

Keywords : Stock Prediction, Machine Learning, LSTM, Stock Price Forecasting, Feature Engineering, Financial Time Series, Yfinance.

References :

  1. Mehtab, S., Sen, J., Dutta, A. (2021). Stock Price Prediction Using Machine Learning and LSTM-Based Deep Learning Models. In: Thampi, S.M., Piramuthu, S., Li, KC., Berretti, S., Wozniak, M., Singh, D. (eds) Machine Learning and Metaheuristics Algorithms, and Applications. SoMMA 2020. Communications in Computer and Information Science, vol 1366. Springer, Singapore.
  2. Sen J, Chaudhuri TD. Stock price prediction using machine learning and deep learning frameworks. InProceedings of the 6th International Conference on Business Analytics and Intelligence, Bangalore, India 2018 Dec 20 (pp. 20-22).
  3. Soni, P., Tewari, Y., & Krishnan, D. (2022). Machine learning approaches in stock price prediction: a systematic review. In Journal of Physics: Conference Series (Vol. 2161, No. 1, p. 012065). IOP Publishing.
  4. Jeevan, B., Naresh, E. and Kambli, P., 2018, October. Share price prediction using machine learning technique. In 2018 3rd International Conference on Circuits, control, communication and computing (i4c) (pp. 1-4). IEEE.
  5. Mokalled, W. E. H. M., & Jaber, M. (2019, September). Automated stock price prediction using machine learning. In Proceedings of the Second Financial Narrative Processing Workshop (FNP 2019) (pp. 16-24).
  6. Shahi TB, Shrestha A, Neupane A, Guo W. Stock price forecasting with deep learning: A comparative study. Mathematics. 2020 Aug 27;8(9):1441. Shahi TB, Shrestha A, Neupane A, Guo W. Stock price forecasting with deep learning: A comparative study. Mathematics. 2020 Aug 27;8(9):1441.
  7. Milosevic N. Equity forecast: Predicting long term stock price movement using machine learning. arXiv preprint arXiv:1603.00751. 2016 Mar 2.
  8. Tsai CF, Wang SP. Stock price forecasting by hybrid machine learning techniques. InProceedings of the international multiconference of engineers and computer scientists 2009 Mar 18 (Vol. 1, No. 755, p. 60).
  9. Emioma CC, Edeki SO. Stock price prediction using machine learning on least-squares linear regression basis. InJournal of Physics: Conference Series 2021 (Vol. 1734, No. 1, p. 012058). IOP Publishing.
  10. Vijh M, Chandola D, Tikkiwal VA, Kumar A. Stock closing price prediction using machine learning techniques. Procedia computer science. 2020 Jan 1;167:599-606.
  11. Chen J, Wen Y, Nanehkaran YA, Suzauddola MD, Chen W, Zhang D. Machine learning techniques for stock price prediction and graphic signal recognition. Engineering Applications of Artificial Intelligence. 2023 May 1;121:106038.
  12. Sonkavde G, Dharrao DS, Bongale AM, Deokate ST, Doreswamy D, Bhat SK. Forecasting stock market prices using machine learning and deep learning models: A systematic review, performance analysis and discussion of implications. International Journal of Financial Studies. 2023 Jul 26;11(3):94.
  13. Habib, Honey, Gautam Siddharth Kashyap, Nazia Tabassum, and Nafis Tabrez. "Stock price prediction using artificial intelligence based on LSTM–deep learning model." In Artificial Intelligence & Blockchain in Cyber Physical Systems, pp. 93-99. CRC Press, 2023.
  14. Abe M, Nakagawa K. Cross-sectional stock price prediction using deep learning for actual investment management. InProceedings of the 2020 Asia Service Sciences and Software Engineering Conference 2020 May 13 (pp. 9-15).
  15. Cho CH, Lee GY, Tsai YL, Lan KC. Toward stock price prediction using deep learning. InProceedings of the 12th IEEE/ACM International Conference on Utility and Cloud Computing Companion 2019 Dec 2 (pp. 133-135).
  16. Kumari J, Sharma V, Chauhan S. Prediction of stock price using machine learning techniques: A survey. In2021 3rd International conference on advances in computing, communication control and networking (ICAC3N) 2021 Dec 17 (pp. 281-284). IEEE

The extrapolation of stock prices is an essential and unresolved problem in the sphere of finance because the results of an accurate forecast can produce considerable economic consequences and the nature of the markets makes the task difficult. This research aims at applying the concept of machine learning in forecasting of stock price for Google shares using historical data of the company’s stock for the last20 years. The qualitative aspect of the research is the collection of data with the use of the yfinance API, data preprocessing with the handling of missing values and removal of outliers. If further feature engineering, then the technical indicators included the simple moving averages and daily returns in order to improve on the capability of the model. Three types of machine learning models – Linear Regression, Random Forest, and Long Short-Term Memory (LSTM) Networks – were built experimentally and compared based on MAE and RMSE performance indices. Out of these, LSTM model provided better performance because it deals with temporal issues well by capturing temporal dependency and non linear trends in the data. In so doing, this research establishes the significance of state-of-the- art generous learning models in monetary prediction while stressing the efficacy of data origination and feature engineering. The results are quite informative for investors and financial analysts, as well as for improving the creation of further prediction models. Future work can also complement internal information with external variables like sentiment analysis and macroeconomic factors to improve their models.

Keywords : Stock Prediction, Machine Learning, LSTM, Stock Price Forecasting, Feature Engineering, Financial Time Series, Yfinance.

Never miss an update from Papermashup

Get notified about the latest tutorials and downloads.

Subscribe by Email

Get alerts directly into your inbox after each post and stay updated.
Subscribe
OR

Subscribe by RSS

Add our RSS to your feedreader to get regular updates from us.
Subscribe