This study compares the performance of the standard Long Short-Term Memory (LSTM) model with the LSTM model optimized using the Random Search method to predict the stock price of Spark New Zealand Limited. The data used is historical stock price data from Yahoo Finance for the period 2018-2023. Model evaluation is performed using Root Mean Square Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), coefficient of determination (R²), and accuracy metrics. The results showed that the standard LSTM model achieved Test RMSE performance of 0.04, Test MAE of 0.03, Test MAPE of 0.73%, Test R² of 0.8571, and Test Accuracy of 99.27%. While the LSTM model with Random Search optimization achieved Test RMSE performance of 0.04, Test MAE of 0.03, Test MAPE of 0.78%, Test R² of 0.8302, and Test Accuracy of 99.22%. Although both models performed very well, the standard LSTM model was slightly superior in some evaluation metrics on the test data. This research provides insight into the effectiveness of hyperparameter optimization in the context of stock price prediction.
Copyrights © 2025