STOCK PREDICTION PERFORMANCE OPTIMIZATION: ENHANCING COVARIANCE MATRIX WITH KNN

  • Iskandar Abdul Azis Saputra Faculty of Information Technology and Data Science, Universitas Sebelas Maret, Indonesia
  • Muhammad Rais Sidiq Faculty of Information Technology and Data Science, Universitas Sebelas Maret, Indonesia
  • Sangaji Suryo Guritno Faculty of Information Technology and Data Science, Universitas Sebelas Maret, Indonesia
  • Hasan Dwi Cahyono Faculty of Information Technology and Data Science, Universitas Sebelas Maret, Indonesia
Keywords: K-Nearest Neighbours, Multi-Layer Perceptron, NASDAQ, Stock Price Prediction

Abstract

Stock price prediction is a fundamental yet complex challenge in quantitative finance. With the increasing availability of data and advancements in machine learning techniques, various models have been developed to capture intricate patterns in stock price movements. While complex neural network models such as Recurrent Neural Networks (RNNs), Graph Neural Networks (GNNs), and Transformers have shown potential in handling stock market data, they often face optimization difficulties and performance limitations, especially when data is scarce. This paper explores the use of simpler and more accessible prediction methods, specifically Linear Regression (LR) and K-Nearest Neighbors (KNN), alongside more advanced models like Temporal Spatial Transformer (TST) and a Multi-Layer Perceptron (MLP) model called Stockmixer. The NASDAQ dataset is utilized in this study, providing a comprehensive view of stock market dynamics with high variability. Results indicate that KNN, among the evaluated models, exhibits superior and more stable performance in predicting validation data compared to MLP. KNN achieved a low Mean Squared Error (MSE) at 100 epochs, and demonstrated positive Information Coefficient (IC) and Return Information Coefficient (RIC) values. Additionally, it showed high Precision at 10 (P@10) and Sharpe Ratio (SR), making it a robust choice for stock price prediction tasks. In contrast, MLP, despite its sophistication, revealed some weaknesses, particularly in the alignment between predictions and actual values. These findings offer valuable insights into the effectiveness of various models for stock price prediction and suggest that simpler models like KNN can provide competitive results compared to more complex models.

Downloads

Download data is not yet available.

References

A. O. Indarso and A. B. Pangaribuan, “Penggunaan Metode Multilayer Perceptron Pada Prediksi Indeks Saham LQ45,” Informatik : Jurnal Ilmu Komputer, vol. 17, no. 1, p. 38, May 2021, doi: 10.52958/iftk.v17i1.2225.

RR. K. N. Sari, W. Sutisna, M. J. M. Wororomi, and V. R. Tjahjono, “Komparasi Model Gerak Brown Geometrik Termodifikasi dan Model Kecerdasan Buatan untuk Prediksi Harga Saham Sektor Kesehatan di Indonesia,” JST (Jurnal Sains dan Teknologi), vol. 12, no. 2, Oct. 2023, doi: 10.23887/jstundiksha.v12i2.48960.

W. R. U. Fadilah, D. Agfiannisa, and Y. Azhar, “Analisis Prediksi Harga Saham PT. Telekomunikasi Indonesia Menggunakan Metode Support Vector Machine,” Fountain of Informatics Journal, vol. 5, no. 2, p. 45, Sep. 2020, doi: 10.21111/fij.v5i2.4449.

W. Y. Rusyida and V. Y. Pratama, “Prediksi Harga Saham Garuda Indonesia di Tengah Pandemi Covid-19 Menggunakan Metode ARIMA,” Square : Journal of Mathematics and Mathematics Education, vol. 2, no. 1, p. 73, Apr. 2020, doi: 10.21580/square.2020.2.1.5626.

E. Eka Patriya, “IMPLEMENTASI SUPPORT VECTOR MACHINE PADA PREDIKSI HARGA SAHAM GABUNGAN (IHSG),” Jurnal Ilmiah Teknologi dan Rekayasa, vol. 25, no. 1, pp. 24–38, Apr. 2020, doi: 10.35760/tr.2020.v25i1.2571.

I. Akil and I. Chaidir, “Prediksi Harga Saham Twitter Dengan Long Short-Term Memory Recurrent Neural Network,” INTI Nusa Mandiri, vol. 17, no. 1, pp. 1–7, Aug. 2022, doi: 10.33480/inti.v17i1.3277.

D. Matsunaga, T. Suzumura, and T. Takahashi, “Exploring Graph Neural Networks for Stock Market Predictions with Rolling Window Analysis,” Sep. 2019, [Online]. Available: http://arxiv.org/abs/1909.10660

I. Idham, M. Ghudafa Taufik Akbar, S. Panggabean, and M. Noor, “Perbandingan Prediksi Harga Saham Dengan Menggunakan LSTM GRU Dengan Transformer,” Smart Comp: Jurnalnya Orang Pintar Komputer, vol. 11, no. 1, pp. 44–47, Jan. 2022, doi: 10.30591/smartcomp.v11i1.3185.

M. A. D. Suyudi, E. C. Djamal, and A. Maspupah, “Prediksi Harga Saham menggunakan Metode Recurrent Neural Network,” in Seminar Nasional Aplikasi Teknologi Informasi (SNATI), 2019.

E. R. Tauran, “PREDIKSI HARGA SAHAM PT BANK CENTRAL ASIA TBK BERDASARKAN DATA DARI BURSA EFEK INDONESIA MENGGUNAKAN METODE K-NEAREST NEIGHBORS (KNN),” TeIKa, vol. 11, no. 2, pp. 123–129, Oct. 2021, doi: 10.36342/teika.v11i2.2609.

P. C. Hartono and A. D. Widiantoro, “Analisis Prediksi Harga Saham Unilever Menggunakan Regresi Linier dengan RapidMiner,” Journal of Computer and Information Systems Ampera, vol. 5, no. 3, 2024, doi: 10.51519/journalcisa.v5i3.481.

V.SARALA and G. N. V. P. BHUSHAN, “Stock Market Trend Prediction Using K-Nearest Neighbor (KNN),” Journal of Engineering Sciences, vol. 13, no. 8, pp. 249–256, 2022, doi: 10.15433/JES.2022.V13I08.43P.39.

E. Fitri and D. Riana, “ANALISA PERBANDINGAN MODEL PREDICTION DALAM PREDIKSI HARGA SAHAM MENGGUNAKAN METODE LINEAR REGRESSION, RANDOM FOREST REGRESSION DAN MULTILAYER PERCEPTRON,” METHOMIKA Jurnal Manajemen Informatika dan Komputerisasi Akuntansi, vol. 6, no. 1, pp. 69–78, Apr. 2022, doi: 10.46880/jmika.Vol6No1.pp69-78.

J. Fan and Y. Shen, “StockMixer: A Simple Yet Strong MLP-Based Architecture for Stock Price Forecasting,” Proceedings of the AAAI Conference on Artificial Intelligence, vol. 38, no. 8, pp. 8389–8397, Mar. 2024, doi: 10.1609/aaai.v38i8.28681.

X. Wei and Y. Li, “Fuzzy alternating automata over distributive lattices,” Inf Sci (N Y), vol. 425, pp. 34–47, Jan. 2018, doi: 10.1016/j.ins.2017.10.015.

Z. Zhu, “Research on Parameter Optimization in Collaborative Filtering Algorithm,” Communications and Network, vol. 10, no. 03, pp. 105–116, 2018, doi: 10.4236/cn.2018.103009.

“Books received,” Brittonia, vol. 36, no. 3, pp. 222–222, Jul. 1984, doi: 10.1007/BF02812122.

J. Lines and A. Bagnall, “Time series classification with ensembles of elastic distance measures,” Data Min Knowl Discov, vol. 29, no. 3, pp. 565–592, May 2015, doi: 10.1007/s10618-014-0361-2.

Published
2024-12-28
How to Cite
[1]
I. A. A. Saputra, M. R. Sidiq, S. S. Guritno, and H. D. Cahyono, “STOCK PREDICTION PERFORMANCE OPTIMIZATION: ENHANCING COVARIANCE MATRIX WITH KNN”, J. Tek. Inform. (JUTIF), vol. 5, no. 6, pp. 1561-1567, Dec. 2024.