Universitas Syiah Kuala | ELECTRONIC THESES AND DISSERTATION

Electronic Theses and Dissertation

Universitas Syiah Kuala

    SKRIPSI
Sultan Shalahuddin, PERBANDINGAN PERFORMA ALGORITMA LONG SHORT-TERM MEMORY (LSTM) DAN GATED RECURRENT UNIT (GRU) DALAM PREDIKSI HARGA SAHAM PERUSAHAAN SEKTOR ENERGI PADA INDEKS LQ45. Banda Aceh Fakultas MIPA (S1),2025

Perusahaan sektor energi menjadi perhatian penting mengingat perannya yang vital dalam perekonomian nasional. harga saham perusahaan sektor energi pada indeks lq45 mengalami fluktuasi akibat dinamika ekonomi global yang menyulitkan investor dalam menyusun strategi investasi. penelitian ini bertujuan untuk membandingkan performa algoritma long short-term memory (lstm) dan gated recurrent unit (gru) dalam memprediksi harga penutupan saham perusahaan sektor energi yang tergabung dalam indeks lq45 periode 1 agustus 2024 sampai dengan 31 oktober 2024. penelitian ini menggunakan data perdagangan saham perusahaan dalam rentang waktu 29 juli 2019 hingga 2 oktober 2024. penelitian ini menerapkan prediksi multi-langkah dengan menggunakan konfigurasi input sebesar 60, 90, dan 120 hari sebelumnya, dan output sebesar 5, 10, 20, dan 30 hari kedepan. model lstm dan gru terbaik dari setiap output akan dilakukan hyperparameter tuning menggunakan optuna untuk meningkatkan performa model. evaluasi model dilakukan menggunakan metrik root mean square error (rmse), mean absolute error (mae), mean absolute percentage error (mape), waktu pelatihan, dan waktu inferensi. dari seluruh model terbaik pada setiap output yang totalnya berjumlah 28 model, 16 diantaranya merupakan model yang dilatih menggunakan algoritma gru, sedangkan 12 lainnya merupakan model yang dilatih menggunakan algoritma lstm. hal ini menandakan bahwa model gru menghasilkan performa yang lebih baik pada mayoritas output prediksi harga saham perusahaan sektor energi pada indeks lq45. hasil visualisasi model terbaik dari setiap output pada masing-masing perusahaan sektor energi indeks lq45 menunjukkan bahwa nilai mape cenderung meningkat seiring bertambahnya jumlah hari pada periode output.



Abstract

Energy sector companies are an essential concern given their vital role in the national economy. The stock price of energy sector companies in the LQ45 index fluctuates due to global economic dynamics, which makes it difficult for investors to develop investment strategies. This study aims to compare the performance of the Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) algorithms in predicting the closing price of stocks in energy sector companies that are included in the LQ45 index for the period August 1, 2024, to October 31, 2024. This research uses company stock trading data from July 29, 2019, to October 2, 2024. This research applies multi-step prediction using a configuration of inputs of 60, 90, and 120 days before and outputs of 5, 10, 20, and 30 days ahead. The best LSTM and GRU models from each output will be performed hyperparameter tuning using Optuna to improve model performance. Model evaluation is performed using Root Mean Square Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), training time, and inference time metrics. Of all the best models in each output totalling 28 models, 16 of them are models trained using the GRU algorithm, while the other 12 are models trained using the LSTM algorithm. This indicates that the GRU model performs better in predicting the majority of outputs for energy sector company stock prices on the LQ45 index. The visualization results of the best model from each output on each energy sector company in the LQ45 index show that the MAPE value tends to increase as the number of days in the output period increases.



    SERVICES DESK