Machine Learning for Electric Vehicle Stock Price Prediction: Analyzing Artificial Neural Network and Random Forest Performance
Main Article Content
Abstract
Forecasting the stock prices of electric vehicle (EV) companies presents a complex challenge due to market volatility and constantly changing external factors. This study aims to address a research gap in the literature, where comparative analyses of multiple machine learning models across several EV companies remain limited. Specifically, the study evaluates and compares the predictive performance of Artificial Neural Networks (ANN) and Random Forest (RF) in forecasting the stock prices of Tesla, BYD, Volkswagen, Geely, and GM using data from January 2018 to June 2023. The dataset comprises key stock market indicators—opening price, highest price, lowest price, volume, and closing price—augmented with COVID-19 pandemic data to reflect external influences on market behavior. Prior to analysis, missing values were handled using mean imputation, and data were normalized using Min-Max scaling to optimize model training. Performance was assessed using Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE), and Mean Bias Error (MBE). The results indicate that RF generally outperforms ANN in forecasting stock prices across most companies, particularly GM (RMSE = 0.3760, MAPE = 0.8238, MBE = 0.0537) and Volkswagen (RMSE = 1.0437, MAPE = 0.6868, MBE = 0.0584). In contrast, ANN performed best for Geely (RMSE = 0.2240, MAPE = 1.4160, MBE = -0.0271), suggesting that ANN may be better suited for datasets with more consistent or specific characteristics, while RF delivered more stable performance across companies. A t-test revealed statistically significant differences in performance between RF and ANN for Volkswagen (p = 0.0050) and GM (p < 0.001), while no significant differences were found for Tesla, BYD, and Geely (p > 0.05), indicating that model selection should consider the specific data characteristics. This research contributes a novel approach by conducting cross-company ML model comparisons in the EV sector while incorporating external variables such as COVID-19, which are rarely addressed in prior work. The findings offer practical insights for investors, analysts, and market intelligence systems, emphasizing the importance of tailoring model selection to the characteristics of individual stock data and supporting the use of AI for more accurate investment decisions.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
All authors need to complete copyright transfer to Journal of Applied Informatics and Technology prior to publication. For more details click this link: https://ph01.tci-thaijo.org/index.php/jait/copyrightlicense
References
Agatonovic-Kustrin, S. and Beresford, R. (2000). Basic concepts of artificial neural network (ANN) modeling and its application in pharmaceutical research. Journal of Pharmaceutical and Biomedical Analysis, 22(5):717–727. DOI: 10.1016/s0731-7085(99)00272-1.
Behera, R., Das, S., Rath, S., Misra, S., and Damasevicius, R. (2020). Comparative study of real time machine learning models for stock prediction through streaming data. JUCS - Journal of Universal Computer Science, 26(9):1128–1147. DOI:
3897/jucs.2020.059.
Biau, G. (2012). Analysis of a random forests model. Journal of Machine Learning Research, 13(1):1063–1095. DOI: 10.5555/2188385.2343682.
Biau, G. and Scornet, E. (2016). A random forest guided tour. TEST, 25(2):197–227. DOI: 10.1007/s11749-016-0481-7.
Breiman, L. (2001). Random forests. Machine Learning, 45(1):5–32. DOI: 10.1023/a:1010933404324.
Chicco, D., Warrens, M. J., and Jurman, G. (2021). The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Computer Science, 7:e623. DOI: 10.7717/peerj-cs.623.
Daori, H., Alharthi, M., Alanazi, A., Alzahrani, G., Aborokbah, M., and Aljehane, N. (2022). Predicting stock prices using the random forest classifier. Preprint. DOI: 10.21203/rs.3.rs-2266733/v1.
Dongare, A. D., Kharde, R. R., and Kachare, A. D. (2012). Introduction to artificial neural network. International Journal of Engineering and Innovative Technology (IJEIT), 2(1):189–194.
El Naqa, I. and Murphy, M. J. (2015). What Is Machine Learning?, page 3–11. Springer International Publishing. DOI: 10.1007/978-3-319-18305-3 1.
Hinton, G. E. (2011). Machine learning for neuroscience. Neural Systems & Circuits, 1(1). DOI: 10.1186/2042-1001-1-12.
Jordan, M. I. and Mitchell, T. M. (2015). Machine learning: Trends, perspectives, and prospects. Science, 349(6245):255–260. DOI:
1126/science.aaa8415.
Larminie, J. and Lowry, J. (2012). Electric Vehicle Technology Explained. Wiley. Lawrence, A., Ryans, J. P., Sun, E., and Laptev, N.
(2017). Earnings announcement promotions: A Yahoo finance field experiment. SSRN Electronic Journal. DOI: 10.2139/ssrn.2940223.
Li, A. W. and Bastos, G. S. (2020). Stock market forecasting using deep learning and technical analysis: A systematic review. IEEE Access, 8:185232–185242. DOI: 10.1109/access.2020.3030226.
Ninjas, A. (2024). Covid-19 api. https://api-ninjas.com/api/covid19. Retrieved December 2024, from https://api-ninjas.com/api/covid19.
Pomboomee, P., Lonlue, P., Praha, P., Mungmor, P., and Khruahong, S. (2023). Classification grading of Nam Dok Mai See-Thong mango by deep learning and transfer learning. In 2023 20th International Joint Conference on Computer Science and Software
Engineering (JCSSE), page 161–166. IEEE. DOI: 10.1109/jcsse58229.2023.10202009.
Pramote, O.-U., Khruahong, S., Jitanan, S., and Kong, X. (2023). Quality grading of crown flowers using convolutional neural network. ICIC Express Letters, 17(2):143–152. DOI: 10.24507/icicel.17.02.143.
Say, K., Srisawatsakul, C., and Boontarig, W. (2025). TalkTutorAI: Empowering English language proficiency through ChatGPT-assisted conversational practice – a case study at Ubon Ratchathani Rajabhat University, Thailand. Journal of Applied Informatics and Technology, 7(1):12–26. https://ph01.tci-thaijo.org/index.php/jait/article/view/254818.
Speiser, J. L., Miller, M. E., Tooze, J., and Ip, E. (2019). A comparison of random forest variable selection methods for classification prediction modeling. Expert Systems with Applications, 134:93–101. DOI: 10.1016/j.eswa.2019.05.028.
Sutheebanjard, P. and Premchaiswadi, W. (2009). Factors analysis on stock exchange of Thailand (SET) index movement. In 2009 7th International Conference on ICT and Knowledge Engineering, page 69–74. IEEE. DOI: 10.1109/ictke.2009.5397320.
Thompson, C. (2024). Analyzing the growth and challenges of the EV industry in the IEA’s global EV outlook 2024. eResearch. Analyst Article, Retrieved January 2025.
Wanjawa, B. W. and Muchemi, L. (2014). ANN model to predict stock prices at stock exchange markets. https://arxiv.org/abs/1502.06434.
Zhang, R., Chen, S., Zhang, Z., and Zhu, W. (2022). Genetic algorithm in multimedia dynamic prediction of groundwater in Open-Pit Mine. Computational Intelligence and Neuroscience, 2022:1–6. DOI: 10.1155/2022/8556103.
Zhao, J., Lee, C.-D., Chen, G., and Zhang, J. (2024). Research on the prediction application of multiple classification datasets based on random forest model. In 2024 IEEE 6th International Conference on Power, Intelligent Computing and Systems (ICPICS), page 156–161. IEEE. DOI: 10.1109/icpics62053.2024.10795875.
Zheng, J., Xin, D., Cheng, Q., Tian, M., and Yang, L. (2024). The Random Forest Model for analyzing and Forecasting the US Stock Market under the background of smart finance, page 82–90. Atlantis Press International BV. DOI: 10.2991/978-94-6463-419-8 11.