Predicting Market Trends : A Stock Prices Forecasting with Artificial Neural Network for Apple Inc. and Microsoft Corp. - Nur Fazliana, Rahim; Farah Liyana, Azizan; Nur’azra Alia Nisa, Zulpakar (PENERBIT UniMAP, 2025)
Machine learning plays a crucial role in predicting stock prices, as it aids investors in making well-informed decisions amidst the vast array of stocks traded on the stock exchange. The unpredictability of stock price behaviour, influenced by numerous factors, adds complexity to this process. Consequently, numerous studies have explored the use of machine learning for stock price forecasting. Hence, this study employs an Artificial Neural Network model as a machine learning algorithm for forecasting stock prices. The model is based on daily stock prices for Apple Inc. and Microsoft Corp. obtained from Yahoo Finance. Data preprocessing entailed normalizing stock prices to ensure that the input features were on a similar scale. The model was trained using a backpropagation approach, with weights optimized based on the mean square error loss function. The proposed model's performance is evaluated using the Root Mean Square Error (RMSE) and Absolute Error (AE) to assess its effectiveness in analyzing the data. The results show that the ANN model can accurately and reliably forecast stock prices. The RMSE and AE metrics demonstrated that the ANN model could effectively capture the underlying trends in stock price movements, giving investors valuable insights for decision-making.