STOCK PREDICTION PERFORMANCE OPTIMIZATION: ENHANCING COVARIANCE MATRIX WITH KNN - Saputra , Iskandar Abdul Azis; Sidiq, Muhammad Rais; Guritno, Sangaji Suryo; Cahyono, Hasan Dwi (Informatika, Universitas Jenderal Soedirman, 2024)
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.