Stock Prices Prediction Using Machine Learning

Selly Margaretha Sudiyandi, Robertus Setiawan Aji Nugroho

Abstract


Prediction of stock price movements in the future will be an area that is widely researched. There is a hypothesis that it is considered impossible to predict stock prices, but it can also show that stock price forecasts can achieve a fairly high level of accuracy if properly formulated and modeled. This is because equity trading is one of most important investment activities. Modeling and forecasting future stock prices based on current financial information can be very helpful to investors. They want to know if inventories go up or down in the short or long term. In this research, the author wants to analyze the comparison of accuracy and train the dataset using linear regression, lasso regression, LSSVM, LSTM, and CNN, then the accuracy will be calculated from the Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE). This can be used by investors in predicting stock prices using a more accurate algorithm. The findings reveal that the CNN model has a substantially lower accuracy value, while LSTM also performs well on specific datasets. However, there is one difference between these two models: the LSTM training time is slower than the CNN model. This is because computations in CNNs may occur in parallel (the same filter is applied to numerous circumstances at the same time), but LSTMs need to be processed sequentially, because the next step depends on the prior time.

Keywords


stock prices; regression; lstm; cnn; lssvm

Full Text:

PDF

References


S. Mehtab and J. Sen, “A Time Series Analysis-Based Stock Price Prediction Using Machine

Learning and Deep Learning Models,” IJBFMI, vol. 6, no. 4, p. 272, 2020, doi:

1504/IJBFMI.2020.115691.

B. Pavlyshenko, “Machine-Learning Models for Sales Time Series Forecasting,” Data, vol.

, no. 1, p. 15, Jan. 2019, doi: 10.3390/data4010015.

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, Dec. 2018, pp. 1394–1401. doi:

1109/ICMLA.2018.00227.

N. Milosevic, “Equity forecast: Predicting long term stock price movement using machine

learning.” arXiv, Nov. 22, 2018. doi: 10.48550/arXiv.1603.00751.

J. Sen, “Stock Price Prediction Using Machine Learning and Deep Learning Frameworks”,

Accessed: Dec. 14, 2022. [Online]. Available:

https://www.academia.edu/38029599/Stock_Price_Prediction_Using_Machine_Learning_a

nd_Deep_Learning_Frameworks.

E. Mussumeci and F. C. Coelho, “Machine-learning forecasting for Dengue epidemics -

Comparing LSTM, Random Forest and Lasso regression,” Public and Global Health,

preprint, Jan. 2020. doi: 10.1101/2020.01.23.20018556.

B. Abdualgalil, S. Abraham, W. M. Ismael, and D. George, “Modeling and Forecasting

Tuberculosis Cases Using Machine Learning and Deep Learning Approaches: A Comparative

Study,” in Data Management, Analytics and Innovation, vol. 137, S. Goswami, I. S. Barara,

A. Goje, C. Mohan, and A. M. Bruckstein, Eds. Singapore: Springer Nature Singapore, 2023,

pp. 157–171. doi: 10.1007/978-981-19-2600-6_11.

S. Mehtab, J. Sen, and A. Dutta, “Stock Price Prediction Using Machine Learning and LSTMBased Deep Learning Models,” in Machine Learning and Metaheuristics Algorithms, and

Applications, vol. 1366, S. M. Thampi, S. Piramuthu, K.-C. Li, S. Berretti, M. Wozniak, and

D. Singh, Eds. Singapore: Springer Singapore, 2021, pp. 88–106. doi: 10.1007/978-981-16-

-5_8.

S. Ismail and A. Shabri, “Time Series Forecasting using Least Square Support Vector

Machine for Canadian Lynx Data,” Jurnal Teknologi, vol. 70, no. 5, Sep. 2014, doi:

11113/jt.v70.3510.

P. J. Bastos, “Thesis Title: Bear Market Prediction Using Logistic Regression, Random

Forest, and XGBoost”, November. 2019, Available:

https://fenix.tecnico.ulisboa.pt/downloadFile/1689244997259684/thesis80959pb.pdf.

A. Triyono, R. B. Trianto, and D. M. P. Arum, “Penerapan Least Squares Support Vector

Machines (LSSVM) dalam Peramalan Indonesia Composite Index,” JIUP, vol. 6, no. 1, p.

, Mar. 2021, doi: 10.32493/informatika.v6i1.10237.




DOI: https://doi.org/10.24167/proxies.v9i1.13269

Copyright (c) 2025 Proxies : Jurnal Informatika



View My Stats