Research Article

Evaluating the effectiveness of elastic net model in predicting stock closing price

Haoyang Ding*
The University of Manchester, Oxford Road, Manchester, M13 9PL, United Kingdom

* Corresponding author: [email protected]

Abstract

Accurate stock price prediction is important for financial investors, as it directly influences investment strategies and decision-making. In this study, the author focuses on evaluating the effectiveness of the Elastic Net model in forecasting the closing prices of Apple Inc.'s stock. The dataset, spanning from 2014 to 2023, is sourced from Kaggle and includes both historical prices and a range of technical indicators, thereby ensuring the accuracy and reliability of the research data. To enhance the predictive accuracy of the model, this paper carefully selects the 14-day moving average of the closing prices along with a set of relevant technical indicators as the key input variables. This selection aims to capture the underlying trends and patterns in the stock's price. The predictive performance of the Elastic Net model is evaluated using multiple evaluation metrics, including Mean Squared Error (MSE) and R-squared values, which quantify the model's accuracy and explanatory power. Additionally, this paper utilizes the Autocorrelation Function (ACF) plot to analyze the residuals and further validate the model's effectiveness. The results demonstrate that the Elastic Net model is well-suited for handling high-dimensional financial data, exhibiting strong performance in predicting Apple Inc.'s stock prices. However, it also underscores the model's potential problem as a valuable tool for investors seeking to make proper decisions in real-life conditions.

Keywords: Stock price; elastic net model; prediction.
Published: November 1, 2024
DOI: 10.54254/2753-8818/51/2024CH0198
Volume: TNS Vol.51
pp. 172-178
Download PDF

References

  1. Nazir M S, Muhammad M N and Usman J G 2010 Relationship between economic growth and stock market development. African journal of business management, 16, 3473.
  2. Soni P, Yogya T and Deepa K 2022 Machine learning approaches in stock price prediction: a systematic review. Journal of Physics: Conference Series, 2161.
  3. Hawkins D M 2004 The problem of overfitting. Journal of chemical information and computer sciences, 44, 1-12.
  4. Mehtab S, Jaydip S and Abhishek D 2020 Stock price prediction using machine learning and LSTM-based deep learning models. Machine Learning and Metaheuristics Algorithms, and Applications: Second Symposium. Chennai, India, 14-17.
  5. Burton A L 2021 OLS (Linear) regression. The Encyclopedia of Research Methods in Criminology and Criminal Justice. John Wiley & Sons, Inc. Hoboken, NJ, America, 509-514.
  6. Yeniay Ö 2005 Penalty function methods for constrained optimization with genetic algorithms. Mathematical and computational Applications, 10, 45-56.
  7. Ranstam J and Jonathan A C 2018 LASSO regression. Journal of British Surgery, 10, 1348-1348.
  8. Cule E and Maria D I 2013 Ridge regression in prediction problems: automatic choice of the ridge parameter. Genetic epidemiology, 7, 704-714.
  9. Ding G Y and Qin L X 2020 Study on the prediction of stock price based on the associated network model of LSTM. International Journal of Machine Learning and Cybernetics, 11, 1307-1317.
  10. Zou H and Trevor H 2005 Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society Series B: Statistical Methodology, 2, 301-320.