Fluctuating oil prices require a prediction model that can capture complex patterns more accurately than traditional methods. This study aims to apply the Long Short-Term Memory (LSTM) model to predict crude oil prices by assessing the effect of the training-test data ratio and window size on model performance. Daily data from 2000 to 2023 were taken from Yahoo Finance, which was then trained and tested on five data ratios and various window sizes. The evaluation was carried out using Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and R². The results show that the 90:10 ratio with a window size of 3 provides the best performance, with an MSE of 6.2100, RMSE of 2.4920, MAE of 1.8430, MAPE of 2.1363%, and R² of 0.9606. These findings confirm that LSTM can effectively capture temporal dependencies and outperform traditional statistical methods.
Copyrights © 2024