OPTIMIZATION OF STOCK PRICE PREDICTION WITH RIDGE REGRESSION AND HYPERPARAMETER SELECTIONS
Abstract
Stock price prediction is a topic that has garnered significant attention in the investment world and has been the subject of various studies. Despite the massive attention, predicting stock price movements using algorithms remains challenging as the algorithms must be agile and highly adaptive to movement trends. Recent studies using deep learning methods for stock price prediction show that deep learning methods have high reliability. However, their computational complexity limits widespread implementation. This study aims to predict Netflix stock prices using a linear regression model with ridge and hyperparameter optimisation. The research consists of three stages: data preprocessing, building a linear regression model with ridge, and predicting and visualizing results. The dataset used is historical Netflix stock price data from 2017 to 2022. In the preprocessing stage, the data was normalized using MinMaxScaler and split into training and test sets. A ridge regression model was built with hyperparameter alpha optimization using GridSearch. Predictions were compared to stock prices and evaluated using Root Mean Squared Error (RMSE). The ridge regression model with hyperparameter optimization performed best with an RMSE of 13.8082. Although the linear regression model demonstrated the fastest execution time of 0.7717 seconds, the ridge regression model with hyperparameter optimization provided an optimal balance between prediction accuracy and time efficiency.
Downloads
References
I. H, ‘Netflix Stock Price Trend Prediction Using Recurrent Neural Network’, J. CoreIT J. Has. Penelit. Ilmu Komput. Dan Teknol. Inf., vol. 8, no. 2, p. 97, Dec. 2022, doi: 10.24014/coreit.v8i2.16599.
B. Gülmez, ‘Stock price prediction with optimized deep LSTM network with artificial rabbits optimization algorithm’, Expert Syst. Appl., vol. 227, p. 120346, Oct. 2023, doi: 10.1016/j.eswa.2023.120346.
Department of Banking and Finance, College of Management and Social sciences Rhema University Aba, Nigeria and Dr. O. U. Godfrey, ‘Money Supply and Stock Prices – A Case Study of Nigeria’, J. Econ. Finance Manag. Stud., vol. 04, no. 10, Oct. 2021, doi: 10.47191/jefms/v4-i10-10.
E. A. Shams and A. Rizaner, ‘A novel support vector machine based intrusion detection system for mobile ad hoc networks’, Wirel. Netw., vol. 24, no. 5, pp. 1821–1829, Jul. 2018, doi: 10.1007/s11276-016-1439-0.
J. Li, W. Chen, Z. Zhou, J. Yang, and D. Zeng, ‘DeepAR-Attention probabilistic prediction for stock price series’, Neural Comput. Appl., May 2024, doi: 10.1007/s00521-024-09916-3.
M. A. D. Suyudi, E. C. Djamal, and A. Maspupah, ‘Prediksi Harga Saham menggunakan Metode Recurrent Neural Network’, Semin. Nas. Apl. Teknol. Inf. SNATI, Jul. 2019.
D. C. Montgomery, E. A. Peck, and G. G. Vining, Introduction to Linear Regression Analysis. Wiley-Interscience, 2001.
D. S. Ramadhansyah, ‘Perbandingan Metode Seleksi Fitur Filter, Wrapper, Dan Embedded Prediksi Kandungan Vitamin C Pada Buah Mangga Meggunakan Metode Linear Regression Dan Random Forest Regression’, Dspace.uii.ac.id, 2022.
G. Bathla, R. Rani, and H. Aggarwal, ‘Stocks of year 2020: prediction of high variations in stock prices using LSTM’, Multimed. Tools Appl., vol. 82, no. 7, pp. 9727–9743, Mar. 2023, doi: 10.1007/s11042-022-12390-5.
S. Behera, C. Prakash, and N. Sharma, ‘A Combined Model for INDEX Price Forecasting Using LSTM, RNN, and GRU’, in Advances in Data-Driven Computing and Intelligent Systems, vol. 890, S. Das, S. Saha, C. A. C. Coello, H. Rathore, and J. C. Bansal, Eds., in Lecture Notes in Networks and Systems, vol. 890. , Singapore: Springer Nature Singapore, 2024, pp. 499–514. doi: 10.1007/978-981-99-9531-8_40.
C. Che, H. Hu, X. Zhao, S. Li, and Q. Lin, ‘Advancing Cancer Document Classification with R andom Forest’, Acad. J. Sci. Technol., vol. 8, no. 1, pp. 278–280, Nov. 2023, doi: 10.54097/ajst.v8i1.14333.
N. Kumar, R. Chauhan, and G. Dubey, ‘Forecasting of Stock Price Using LSTM and Prophet Algorithm’, in Applications of Artificial Intelligence and Machine Learning, vol. 778, A. Choudhary, A. P. Agrawal, R. Logeswaran, and B. Unhelkar, Eds., in Lecture Notes in Electrical Engineering, vol. 778. , Singapore: Springer Singapore, 2021, pp. 141–155. doi: 10.1007/978-981-16-3067-5_12.
V. Vimal, A. Singh, and P. Meel, ‘Human Activity Recognition Using Long Short-Term Memory’, in Proceedings of 6th International Conference on Recent Trends in Computing, vol. 177, R. P. Mahapatra, B. K. Panigrahi, B. K. Kaushik, and S. Roy, Eds., in Lecture Notes in Networks and Systems, vol. 177. , Singapore: Springer Singapore, 2021, pp. 613–623. doi: 10.1007/978-981-33-4501-0_57.
H. Abbasimehr and R. Paki, ‘Improving time series forecasting using LSTM and attention models’, J. Ambient Intell. Humaniz. Comput., vol. 13, no. 1, pp. 673–691, Jan. 2022, doi: 10.1007/s12652-020-02761-x.
F. Gao, J. Zhang, C. Zhang, S. Xu, and C. Ma, ‘Long Short-Term Memory Networks with Multiple Variables for Stock Market Prediction’, Neural Process. Lett., vol. 55, no. 4, pp. 4211–4229, Aug. 2023, doi: 10.1007/s11063-022-11037-8.
S. Siami-Namini, N. Tavakoli, and A. Siami Namin, ‘A Comparison of ARIMA and LSTM in Forecasting Time Series’, in 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL: IEEE, Dec. 2018, pp. 1394–1401. doi: 10.1109/ICMLA.2018.00227.
D. P. Mishra, H. K. Gupta, G. Saajith, and R. Bag, ‘Optimizing Heart Disease Prediction Model with GridsearchCV for Hyperparameter Tuning’, in 2024 1st International Conference on Cognitive, Green and Ubiquitous Computing (IC-CGU), Bhubaneswar, India: IEEE, Mar. 2024, pp. 1–6. doi: 10.1109/IC-CGU58078.2024.10530772.
L. Yang and A. Shami, ‘On hyperparameter optimization of machine learning algorithms: Theory and practice’, Neurocomputing, vol. 415, pp. 295–316, Nov. 2020, doi: 10.1016/j.neucom.2020.07.061.
Y. I. Kurniawan, A. Rahmawati, N. Chasanah, and A. Hanifa, ‘Application for determining the modality preference of student learning’, J. Phys. Conf. Ser., vol. 1367, no. 1, p. 012011, Nov. 2019, doi: 10.1088/1742-6596/1367/1/012011.
Y. I. Kurniawan, E. Soviana, and I. Yuliana, ‘Merging Pearson Correlation and TAN-ELR algorithm in recommender system’, presented at the HUMAN-DEDICATED SUSTAINABLE PRODUCT AND PROCESS DESIGN: MATERIALS, RESOURCES, AND ENERGY: Proceedings of the 4th International Conference on Engineering, Technology, and Industrial Application (ICETIA) 2017, Surakarta, Indonesia, 2018, p. 040028. doi: 10.1063/1.5042998.
Y. Guo, S. Han, Y. Li, C. Zhang, and Y. Bai, ‘K-Nearest Neighbor combined with guided filter for hyperspectral image classification’, Procedia Comput. Sci., vol. 129, pp. 159–165, 2018, doi: 10.1016/j.procs.2018.03.066.
M. Obthong, N. Tantisantiwong, W. Jeamwatthanachai, and G. Wills, ‘A Survey on Machine Learning for Stock Price Prediction: Algorithms and Techniques’:, in Proceedings of the 2nd International Conference on Finance, Economics, Management and IT Business, Prague, Czech Republic: SCITEPRESS - Science and Technology Publications, 2020, pp. 63–71. doi: 10.5220/0009340700630071.
I. Nabillah and I. Ranggadara, ‘Mean Absolute Percentage Error untuk Evaluasi Hasil Prediksi Komoditas Laut’, JOINS J. Inf. Syst., vol. 5, no. 2, pp. 250–255, Nov. 2020, doi: 10.33633/joins.v5i2.3900.
Copyright (c) 2024 Adeline Fellita Marwa

This work is licensed under a Creative Commons Attribution 4.0 International License.