IPB University Logo

SCIENTIFIC REPOSITORY

IPB University Scientific Repository collects, disseminates, and provides persistent and reliable access to the research and scholarship of faculty, staff, and students at IPB University

AI Repository
 
Building and Categories


      View Item 
      •   IPB Repository
      • Final Assignments
      • Undergraduate Final Assignments
      • UF - School of Data Science, Mathematic and Informatics
      • UF - Actuaria
      • View Item
      •   IPB Repository
      • Final Assignments
      • Undergraduate Final Assignments
      • UF - School of Data Science, Mathematic and Informatics
      • UF - Actuaria
      • View Item
      JavaScript is disabled for your browser. Some features of this site may not work without it.

      Prediksi Harga Saham Menggunakan Metode K-Nearest Neighbor Berbasis Graf

      Thumbnail
      View/Open
      Cover (516.5Kb)
      Fulltext (943.3Kb)
      Lampiran (476.2Kb)
      Date
      2026
      Jenis/Type
      Skripsi
      Subtype
      Undergraduate Theses
      Author
      BUQHARI, AHMAD
      Septyanto, Fendy
      Ruhiyat
      Metadata
      Show full item record
      Abstract
      Prediksi harga saham merupakan tantangan akibat kompleksitas pasar, sementara metode K-Nearest Neighbor (KNN) belum memanfaatkan hubungan historis antarsaham dalam proses prediksi. Penelitian ini bertujuan untuk menerapkan metode KNN berbasis graf untuk memprediksi harga saham dan mengevaluasi kinerjanya menggunakan mean absolute percentage error (MAPE), menggunakan data harga penutupan harian 27 saham indeks LQ45 periode Februari 2022 hingga Januari 2025. Graf dibangun melalui transformasi korelasi Pearson antar log return saham menjadi jarak Gower, dengan ambang batas 0,64 dan 15 tetangga optimal. Saham yang tidak terhubung langsung dihitung menggunakan algoritma Dijkstra, kemudian dikonversi menjadi bobot prediksi melalui pendekatan distance-weighted KNN. Hasil penelitian menunjukkan nilai MAPE berkisar antara 1,20% hingga 2,49% untuk seluruh saham yang dianalisis. Namun, kepadatan koneksi suatu saham dalam graf tidak selalu berbanding lurus dengan akurasi prediksinya. Temuan ini menunjukkan bahwa pendekatan KNN berbasis graf dapat menjadi alternatif yang efektif dalam memprediksi harga saham di pasar modal Indonesia.
       
      Stock price prediction is a challenge due to market complexity, while the K-Nearest Neighbor (KNN) method has not yet taken into account historical relationship between stocks in the prediction process. This study aims to apply a graph-based KNN method to predict stock prices and to evaluate its performance using mean absolute percentage error (MAPE). The data used consists of daily closing prices of 27 LQ45 index stocks from February 2022 to January 2025. The graph was constructed by transforming Pearson correlations between stock log returns into Gower distances, with a threshold of 0.64 and optimal neighbor of 15. Distances between stocks that were not directly connected were computed using Dijkstra’s algorithm and then converted into prediction weights through a distance-weighted KNN approach. The results show that MAPE values ranged from 1.20% to 2.49% across all analyzed stocks. However, the density of stock’s connections in the graph does not always correspond to higher prediction accuracy. These findings indicate that the graph-based KNN approach can serve as an effective alternative for predicting stock prices in Indonesian capital market.
       
      URI
      http://repository.ipb.ac.id/handle/123456789/176664
      Collections
      • UF - Actuaria [123]

      Copyright © 2020 Library of IPB University
      All rights reserved
      Contact Us | Send Feedback
      Indonesia DSpace Group 
      IPB University Scientific Repository
      UIN Syarif Hidayatullah Institutional Repository
      Universitas Jember Digital Repository
        

       

      Browse

      All of IPB RepositoryCollectionsBy Issue DateAuthorsTitlesSubjectsThis CollectionBy Issue DateAuthorsTitlesSubjects

      My Account

      Login

      Application

      google store

      Copyright © 2020 Library of IPB University
      All rights reserved
      Contact Us | Send Feedback
      Indonesia DSpace Group 
      IPB University Scientific Repository
      UIN Syarif Hidayatullah Institutional Repository
      Universitas Jember Digital Repository