ADDITIONAL MENU
Comparative Analysis of Support Vector Regression and Linear Regression Models to Predict Apple Inc. Share Prices
Abstract
Stock price prediction is a complex and important challenge for stock market participants. The difficulty of predicting stock prices is a major problem that requires an approach method in obtaining stock price predictions. This research proposes using machine learning with the Support Vector Regression (SVR) model and linear regression for stock price prediction—the dataset used in the daily Apple Inc historical data from 2018 to 2023. The hyperparameter tuning technique uses the Grid Search method with a value of k = 5, which will be tested on the SVR and Linear Regression methods to get the best prediction model based on the number of cost, epsilon, kernel, and intercept fit parameters. The test results show that the linear regression model with all hyperparameters k = 5 with the average taken performs best with a True intercept fit value. The resulting model can get an excellent error value, namely the RMSE value of 0.931231 and MSE of 0.879372. This finding confirms that the linear regression model in this configuration is a good choice for predicting stock prices.
Keywords
Apple Inc.; Linear Regression; Prediction; RMSE; Support Vector Regression
Full Text:
PDFReferences
X. Ji, J. Wang, and Z. Yan, “A stock price prediction method based on deep learning technology,” Int. J. Crowd Sci., vol. 5, no. 1, pp. 55–72, 2021, doi: 10.1108/IJCS-05-2020-0012.
E. Eka Patriya, “Implementasi Support Vector Machine Pada Prediksi Harga Saham Gabungan (Ihsg),” J. Ilm. Teknol. dan Rekayasa, vol. 25, no. 1, pp. 24–38, 2020, doi: 10.35760/tr.2020.v25i1.2571.
Y. Chen, P. Zhao, Z. Zhang, J. Bai, and Y. Guo, “A Stock Price Forecasting Model Integrating Complementary Ensemble Empirical Mode Decomposition and Independent Component Analysis,” Int. J. Comput. Intell. Syst., vol. 15, no. 1, 2022, doi: 10.1007/s44196-022-00140-2.
H. Hewamalage, C. Bergmeir, and K. Bandara, “Recurrent Neural Networks for Time Series Forecasting: Current status and future directions,” Int. J. Forecast., vol. 37, no. 1, pp. 388–427, 2021, doi: 10.1016/j.ijforecast.2020.06.008.
X. Liu, Z. Zhang, and Z. Song, “A comparative study of the data-driven day-ahead hourly provincial load forecasting methods: From classical data mining to deep learning,” Renew. Sustain. Energy Rev., vol. 119, no. November 2019, p. 109632, 2020, doi: 10.1016/j.rser.2019.109632.
A. Hussein, J. Agbinya, and I. Satti, “A Survey on Data mining Techniques for Water Flow Forecasting,” Aust. J. Basic Appl. Sci., vol. 14, no. 3, pp. 13–27, 2020, doi: 10.22587/ajbas.2020.14.3.2.
W. Budiharto, “Data science approach to stock prices forecasting in Indonesia during Covid-19 using Long Short-Term Memory (LSTM),” J. Big Data, vol. 8, no. 1, 2021, doi: 10.1186/s40537-021-00430-0.
R. Julian and M. R. Pribadi, “Peramalan Harga Saham Pertambangan Pada Bursa Efek Indonesia (BEI) Menggunakan Long Short Term Memory (LSTM),” JATISI (Jurnal Tek. Inform. dan Sist. Informasi), vol. 8, no. 3, pp. 1570–1580, 2021, doi: 10.35957/jatisi.v8i3.1159.
S. Tinggi, T. Kedirgantaraan, and Y. Abstrak, “PERAMALAN (FORECASTING) VOLUME PENUMPANG TERHADAP OPTIMALISASI TERMINAL PENUMPANG DI BANDAR UDARA INTERNASIONAL SUPADIO PONTIANAK 1 Ranggie Juliati,” J. Gr. Handl. Dirgant., vol. 4, no. 1, pp. 2460–1594, 2022.
A. Riyandi, I. Nur Ardiansyah, and R. Dany, “Analisis Data Mining Untuk Prediksi Harga Saham: Perbandingan Metode Regresi Linier Dan Pola Historis Data Mining Analysis for Stock Price Prediction: A Comparison of Linear Regression Method and Historical Patterns,” Jtsi, vol. 4, no. 2, pp. 278–288, 2023.
A. Kurniawati and A. Arima, “Analisis Prediksi Harga Saham PT. Astra International Tbk Menggunakan Metode Autoregressive Integrated Moving Average (ARIMA) dan Support Vector Regression (SVR),” J. Ilm. Komputasi, vol. 20, no. 3, pp. 417–423, 2021, doi: 10.32409/jikstik.20.3.2732.
A. Aulia, “Prediksi Harga Emas dengan Menggunakan Algoritma Support Vector Regression (SVR) dan Linear Regression (LR),” J. Ilm. Wahana Pendidik., vol. 8, no. 5, pp. 84–88, 2022, doi: 10.5281/zenodo.6408864.
V. R. Prasetyo, H. Lazuardi, A. A. Mulyono, and C. Lauw, “Penerapan Aplikasi RapidMiner Untuk Prediksi Nilai Tukar Rupiah Terhadap US Dollar Dengan Metode Linear Regression,” J. Nas. Teknol. dan Sist. Inf., vol. 7, no. 1, pp. 8–17, 2021, doi: 10.25077/teknosi.v7i1.2021.8-17.
M. Chiah and A. Zhong, “Tuesday Blues and the day-of-the-week effect in stock returns,” J. Bank. Financ., vol. 133, p. 106243, 2021, doi: 10.1016/j.jbankfin.2021.106243.
A. Ambarwari, Q. J. Adrian, and Y. Herdiyeni, “Analisis Pengaruh Data Scaling Terhadap Performa Algoritme Machine Learning untuk Identifikasi Tanaman,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 4, no. 1, pp. 117–122, 2020, [Online]. Available: http://jurnal.iaii.or.id
H. Muthiah, U. Sa, and A. Efendi, “Support Vector Regression (SVR) Model for Seasonal Time Series Data,” Proc. Second Asia Pacific Int. Conf. Ind. Eng. Oper. Manag., no. September 14-16, 2021, pp. 3191–3200, 2021.
L. M. Ginting, M. M. Sigiro, E. D. Manurung, and J. J. P. Sinurat, “Perbandingan Metode Algoritma Support Vector Regression dan Multiple Linear Regression Untuk Memprediksi Stok Obat,” J. Appl. Technol. Informatics Indones., vol. 1, no. 2, pp. 29–34, 2021, doi: 10.54074/jati.v1i2.36.
A. Rahmi, “Portofolio Optimal Dengan Mempertimbangkan Prediksi Return Menggunakan Metode Support Vector Regression ( SVR ) Program Studi Matematika , Universitas Negeri Padang,” vol. 7, no. March, pp. 23745–23753, 2023.
B. Sravani and M. M. Bala, “Prediction of student performance using linear regression,” 2020 Int. Conf. Emerg. Technol. INCET 2020, pp. 1–5, 2020, doi: 10.1109/INCET49848.2020.9154067.
W. M. B. Dian Pramesti, “Perbandingan Prediksi Jumlah Transaksi Ojek Online Menggunakan Regresi Linier dan Random Forest,” vol. 7, no. 3, pp. 21–30, 2023.
N. Karlsson and N. Karlsson, “Comparison of linear regression and neural networks for stock price prediction for stock price prediction,” 2021.
M. A. Muslim et al., “Support Vector Machine (SVM) Optimization Using Grid Search and Unigram to Improve E-Commerce Review Accuracy,” J. Soft Comput. Explor., vol. 1, no. 1, pp. 8–15, 2020, doi: 10.52465/joscex.v1i1.3.
F. Tang, Y. Wu, and Y. Zhou, “Hybridizing Grid Search and Support Vector Regression to Predict the Compressive Strength of Fly Ash Concrete,” Adv. Civ. Eng., vol. 2022, 2022, doi: 10.1155/2022/3601914.
M. M. Hameed, M. K. AlOmar, W. J. Baniya, and M. A. AlSaadi, “Incorporation of artificial neural network with principal component analysis and cross-validation technique to predict high-performance concrete compressive strength,” Asian J. Civ. Eng., vol. 22, no. 6, pp. 1019–1031, 2021, doi: 10.1007/s42107-021-00362-3.
S. Saud, B. Jamil, Y. Upadhyay, and K. Irshad, “Performance improvement of empirical models for estimation of global solar radiation in India: A k-fold cross-validation approach,” Sustain. Energy Technol. Assessments, vol. 40, no. June, p. 100768, 2020, doi: 10.1016/j.seta.2020.100768.
D. Chicco, M. J. Warrens, and G. Jurman, “The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation,” PeerJ Comput. Sci., vol. 7, pp. 1–24, 2021, doi: 10.7717/PEERJ-CS.623.
DOI: http://dx.doi.org/10.24014/ijaidm.v7i1.28594
Refbacks
- There are currently no refbacks.
Office and Secretariat:
Big Data Research Centre
Puzzle Research Data Technology (Predatech)
Laboratory Building 1st Floor of Faculty of Science and Technology
UIN Sultan Syarif Kasim Riau
Jl. HR. Soebrantas KM. 18.5 No. 155 Pekanbaru Riau – 28293
Website: http://predatech.uin-suska.ac.id/ijaidm
Email: ijaidm@uin-suska.ac.id
e-Journal: http://ejournal.uin-suska.ac.id/index.php/ijaidm
Phone: 085275359942
Journal Indexing:
Google Scholar | ROAD | PKP Index | BASE | ESJI | General Impact Factor | Garuda | Moraref | One Search | Cite Factor | Crossref | WorldCat | Neliti | SINTA | Dimensions | ICI Index Copernicus
IJAIDM Stats